I myself am not familiar with doing the nginx worker process config, etc, but I think from the released blog of how phoenix able to reach 2 million conneciton. I am assuming that the having nginx to handle 512/1024 is too small compared to what it can handle.
So normally what is the best config, can a developer use to host phoenix app behind an nginx reverse proxy, to allow it to handle big connection load?
In that case tutorials are doing you a disservice, because you can have Phoenix directly facing the Internet traffic, and LetsEncrypt is easy to tackle with @sasajuric library:
You can also read this article:
The docs for https:
And this example from myself in another post:
Please bear in mind that I posted it in 2018, therefore the ciphers must be updated to match current security standards.
Also bear in mind that when configuring https you need to pass all the configuration, not just the keys you are interested in configuring, because at the core the configuration is not merged, only replaced, thus you can end-up without https or with a less secure configuration.