Nginx's upstream module turns it into a powerful software load balancer. Define your backend pool, pick a balancing strategy, and let our generator build the config block for you.
List the backends in an upstream and proxy_pass to it. Round-robin is the default.
upstream app {
least_conn;
server 10.0.0.1:8080;
server 10.0.0.2:8080;
}
server {
location / { proxy_pass http://app; }
}round-robin spreads requests evenly, least_conn favors the backend with fewest active connections, and ip_hash pins a client to one backend, which helps when sessions are stored locally.
Open the Load balancer generator
No. It marks a server failed passively via max_fails and fail_timeout. Active health checks need Nginx Plus or an external checker.
Add the down parameter to its server line and reload Nginx.