NGINX Unit 1.16.0 has been released, this version adds two new functions: fallback
routing and round-robin load balancing by configuring upstreams. Developers familiar with nginx should be familiar with these two functions.
fallback
Routing (fallback Routing Option) : When a static file cannot be delivered for some reason, an alternative routing action can be defined.- Poll scheduling load balancing by configuring upstreams: The configuration part where the upstreams object resides can serve as a peer for listeners, applications, routing, and setting objects. upstream is an abstraction that groups multiple servers into a single logical entity to simplify management and monitoring. Normally, you can distribute workloads, assign different roles in upstream, and fine-tune the properties of a single server, but from the outside, it looks and behaves like a single entity.
In NGINX Unit, upstreams are configured as follows:
{
"listeners": {
"*:80": {
"pass": "upstreams/rr-lb"
}
},
"upstreams": {
"rr-lb": {
"servers": {
"192.168.0.100:8080": { },
"192.168.0.101:8080": {
"weight": 2
}
}
}
}
}
For detailed updates, please see the announcement
https://www.nginx.com/blog/nginx-unit-1-16-0-now-available/