Utilizing NGINX load balancing features allows requests to be distributed to several ECS systems to enhance performance, scalability, and reliability. NGINX core has support for the following:
- Layer 7 (http) - evaluate the HTTP headers and forward to backend servers based on the content of the user request.
- Layer 4 (tcp) - allows all data traffic to be forwarded directly to backend servers streamlining user requests.
- Load Balancing Algorithms – options available include:
- Round-Robin – default algorithm which selects servers in a rotating basis.
- Least Connected– selects servers based on the least number of connections
- IP-Hash – selects servers based on a hash of the source IP such as the user IP address to ensure request goes to the same server until something changes in the hash (that is, one backend server goes down).
- Weighted load balancing – assigning weight values to particular servers such that requests are distributed based on the weight assigned. For instance, a server with an assigned weight of 3 handles three times the requests than the other servers.
- Sticky Sessions – enables persistence in order for applications to connect to same backend server to process requests.
- Health Check – simple checks to validate if a backend is available and if not, then it is automatically removed from the rotation to process requests until it is restored or becomes healthy.
- Monitoring –simple statistics relating to NGINX are available for monitoring purposes but are limited.