What does the least connections method do in an NGINX load balancer?
Think about how to balance load by connection count.
The least connections method directs traffic to the server currently handling the fewest active connections, helping balance load dynamically.
Which NGINX configuration snippet correctly enables the least connections load balancing method?
upstream backend {
least_conn;
server backend1.example.com;
server backend2.example.com;
}Look for the directive that specifies least connections.
The least_conn; directive inside the upstream block enables least connections load balancing.
Given this NGINX status output snippet showing active connections per backend server, which server will receive the next request if least_conn is enabled?
backend1.example.com - active connections: 5 backend2.example.com - active connections: 3 backend3.example.com - active connections: 7
Which server has the fewest active connections?
The server with the fewest active connections (3) is backend2.example.com, so it will receive the next request.
You configured NGINX with least_conn load balancing, but one backend server is still overloaded while others are idle. What is the most likely cause?
Think about how connection duration affects load balancing.
Long-lived connections on one server keep its active connection count high, causing least connections to keep sending requests to other servers, but the overloaded server remains busy.
You want to configure NGINX to use least_conn load balancing but also ensure that unhealthy backend servers are not used. Which configuration snippet correctly combines least connections with active health checks?
Look for the combination of least_conn, server fail parameters, and health_check directive.
Option A correctly uses least_conn; with server parameters max_fails and fail_timeout to mark servers as down after failures, plus the health_check; directive to actively check server health.