NGINX Plus R12 Brings Master-Peer Configuration Sharing, Improved Scripting, and More
Nginx has announced release 12 of NGINX Plus, the paid version of the popular NGINX open source web server. NGINX Plus R12 brings a new configuration-sharing feature aimed to simplify clustering, official support for the nginScript language, and improvements in monitoring and instrumentation, caching, and reliability.
Configuration sharing is a new mechanism that allows to push the same configuration across a cluster of NGINX nodes. Node clustering is used to ensure high availability, such as when using an active-passive configuration, where one or more inactive NGINX nodes were added to provide redundancy to the primary node, or an active-active, where two or more NGINX nodes are used to handle traffic at the same time. NGINX Plus R12 introduces a new cluster configuration, where one node plays the role of master, while the rest act as peers. The master’s configuration can be shared across all peers using the new
nginx-sync.sh command, which makes sure the configuration is valid for each peer and restarts them, or rolls it back in case of problems. This feature can also be used to reliably push configuration from a staging server to a cluster of production servers.
As mentioned, NGINX Plus R12 also brings improvements in the following areas:
- Statistics: new metrics are available such as server response times, shared memory zone utilization, and error codes for TCP/UDP services.
- Caching: the RFC 5861
stale-if-errorpolicies are now supported and cache revalidate can be executed in the background.
- Health-check: to improve reliability, NGINX Plus 12 can delay sending traffic to newly added nodes until they pass the configured health check.
NGINX Plus 12 also includes some changes in behavior, such as the internal cache format, changes to configuration syntax when using the
queue directive, and more. Make sure you read about them in the official announcement.