My goal is to deploy a secure web server. As far as I know, a web server normally runs on HTTP with a reverse proxy like nginx, that handles HTTPS. However, my server backend can also run on HTTPS.
So I am wondering if I really need a reverse proxy like nginx? Does it provide any necessary security? Or any other benefits? Besides an optional load balancer.
I expect using a reverse proxy would slightly decrease the performance of the server. Especially because nginx uses 1 thread and my backend has multiple threads for handling the connections.
There is no need for a proxy setup if you can just host the HTTPS protocol directly. The benefits of a reverse proxy setup are potential load balancing and centralization of SSL certificate management.
If you don't need either of those, adding in the proxy unnecessarily complicates things.
Especially because nginx uses 1 thread and my backend has multiple threads for handling the connections.
Just as an FYI if not aware, multiple threads is not necessary to handle multiple connections. This shouldn't have much, if any, impact on your service.