Web / NGINX Interview questions
What is load balancing in NGINX?
Load balancing is the practice of distributing incoming requests across multiple backend servers instead of sending all traffic to one. In NGINX, this is done through an upstream block listing the available servers.
upstream backend_app { server 10.0.0.11:8080; server 10.0.0.12:8080; server 10.0.0.13:8080; }
Any request proxied to http://backend_app is routed to one of the three servers according to the configured algorithm. This spreads load evenly, improves fault tolerance if one server goes down, and allows horizontal scaling by simply adding more servers to the group.
More Related questions...