About NGINX

NGINX is an HTTP server that provides modular functionality for reverse proxying, traffic routing, and application-layer load balancing for HTTP, HTTPS, or TCP/UDP connections. You can use NGINX load balancing and proxy services to distribute traffic for improved performance, scalability, and reliability of applications.

NGINX provides capability for the following load balancing methods:

  • Round Robin: Distributes requests to application servers by going down the list of the servers that are within the group, then forwarding client requests to each server, in turn. After reaching the end of the list, the load balancer repeats this same sequence. Round Robin is the default method used by NGINX.

  • Least Connected. Assigns the next request to the server that has the least number of active connections. With the least-connected method, the load balancer compares the number of active connections to each server, then sends the request to the server with the fewest connections. You set the configuration by using the least_conn directive.

  • IP Hash. Uses a hash-function to decide which server to select for the next request, which is based on the client's IP address. You set the configuration by using the ip_hash directive.

For more information, see Setting Up Load Balancing by Using NGINX.

See also https://docs.nginx.com/nginx/.