Production setup recommendations

In the LXD documentation (https://lxd.readthedocs.io/en/latest/production-setup/ ) there is a recommendation to increase the ‘nofile’ parameter in limits.conf. Is it really needed in the modern systemd-based system? I see that lxd.service unit contains “LimitNOFILE=1048576” and it is absolutely correct way to change limits for a service. As far as I understand, the limits configured in limits.conf don’t affect the services starting from particular systemd version (I don’t remember the exact version number).

there is nothing wrong with your post, it was just replied to by someone who probably should have written some off-topic thoughts on his personal blog or Twitter rather than on this forum.
About your question, I also wonder why the doc is this way, it may be a mistake that nobody has taken the time to fix. You could file an issue on github if you care a lot about it.
In the current (snap) version, the systemd service file don’t have this LimitNOFILE entry but it’s probably because at the moment snap services are always run as root (this is planned to change) and as such don’t have limits anyway.

Thank you for clarification. So we don’t really need to change limits.conf in modern distros.
But for some older distros it is still necessary to configure the ‘nofile’ parameter in limits.conf. I just tested it in Debian Jessie. So, the recommendation to adjust limits.conf should appear in the documentation but probably it worth adding a remark that it is not necessary when systemd ver NNN or later is installed. In any case the proposed changes in limits.conf are harmless (I think…).