Web / NGINX Interview questions
When should you use NGINX purely as a reverse proxy versus also as a load balancer?
A pure reverse proxy setup makes sense when there's only one backend instance - NGINX still adds value by terminating SSL, serving static assets, and hiding the backend, even without distributing traffic across multiple servers.
Load balancing becomes necessary once a single backend instance can't handle the traffic alone, or once availability matters enough that you need redundancy - if one instance goes down, others keep serving requests. At that point you add multiple servers to an upstream block and NGINX starts distributing requests between them.
In practice, most production setups end up doing both at once: NGINX proxies and terminates SSL for external traffic, while also load balancing across two or more backend replicas for redundancy and scale, even in relatively small deployments.
More Related questions...