3 ms·
I think the pattern is Public Web -> Reverse Proxy -> Application Server Rather than Public Web -> Nginx -> Node (In his example) You could reasonab
by jinglebells 7y ago
I think the pattern is
Public Web -> Reverse Proxy -> Application Server
Rather than
Public Web -> Nginx -> Node (In his example)
You could reasonably do
Public Web -> Node reverse proxy -> Node Application Server
It doesn't really matter if the reverse proxy is Nginx or Node or something else, it's a good pattern to insert a lightweight service at the front which can redirect the requests upstream. If you need to scale by adding new boxes or services, this can now be your load balancer.
Your reverse proxy can also handle blocking dodgy requests (Fail2Ban) or act as a lightweight static file handler, leaving your application server to do the grunt work.