A layer 4 load-balancer takes routing decision based on IPs and TCP or UDP ports.
https://github.com/yaoweibin/nginx_upstream_check_module
Full implementation needs NGINX Plus.
Load balancing of HTTP / TCP connections
Transparent encryption, transformation and cache on edge node.
URL content-based request routing
With cookie-insert, session-learn, and defined-route methods
Round Robin |
---|
Distributed sequentially across the servers |
Fixed Weighted |
If highest weight server falls, the server with the next highest priority number will be available to serve clients. |
IP Hash |
Based on the source and destination IP address of each packet - session persistence |
Least Connections |
The server in the cluster with the least number of active connections automatically receives the next request. |
Least Time |
It selects the service with the least number of active connections and the least average response time. |
By service URL |
Forward request to selected server or group by URL of service |
By Cookie content |
Forward request to selected server or group by cookie |
Mix algorithms with static “weighting” that can be pre-assigned per server is possible.
Rate limiting and connection limits to throttle usage.
Selective URL / service cache for better workload offloading.
Edge server capable of serving 3 - 6 Gbps of live traffic and 20,000 to 50,000 requests per second.
Live binary upgrades to eliminate downtime Graceful restart with non-stop request processing
Mark server as failed while reading from it, and will try to avoid selecting this server for subsequent inbound requests for a while.
Test service, can do some exact function call. If server responds badly (connection, status) then is marked as bad.
upstream backend_hosts { hash $remote_addr$remote_port consistent; server host1.example.com; server host2.example.com; server host3.example.com; }
Load balancing implemented in WSO2 API Manager (session persistent, failover)