NGINX.COM
Web Server Load Balancing with NGINX Plus

We’re really pleased to announce the availability of NGINX Plus Release 6 (R6). This latest release of our application delivery platform gives NGINX Plus users even more to love, including:

Editor – For more details about key new features in NGINX Plus R6, see these related blog posts:

Our customers have expressed overwhelming interest in using NGINX Plus to replace legacy hardware and to further support the adoption of public and private clouds. With the release of R6, NGINX Plus exceeds the capability of traditional hardware load balancers and ADCs, while providing unlimited throughput at a lower cost than our competitors. We believe it is now the ideal choice for application delivery and load balancing, whether for modern web applications or for enterprise applications like relational databases and mail servers.

New “Least Time” Load‑Balancing Algorithm

The new Least Time load‑balancing algorithm monitors both the number of concurrent connections and the average response time from each node in the load‑balanced pool. It uses this information to select the most appropriate node for each request, with the goal of selecting faster and less‑loaded nodes in preference to slower and more heavily loaded ones.

Least Time outperforms other load‑balancing methods when nodes differ significantly in latency. One common use case is load balancing across nodes located in two separate data centers; local nodes tend to have very little latency compared to nodes in a remote data center. Least Time prefers the low‑latency nodes, but NGINX Plus’ health checks ensure failover to the slower nodes if the faster ones fail or go offline.

Least Time can base its load‑balancing decisions on either the time to receive the response headers from the upstream, or the time to receive the entire response. Two counters being added to the set of extended status statistics, header_time and response_time, present the rolling‑average measurements used as the basis for decisions.

Full‑Featured TCP Load Balancing

The TCP load balancing feature introduced in NGINX Plus R5 has been significantly extended to include TCP health checks, dynamic configuration of upstream server groups, full access logs, and SSL/TLS termination and encryption. Many new extended status counters have been added for TCP load balancing, providing the same level of reporting and visibility that you already enjoy for HTTP load balancing.

TCP load balancing has already been proven in a number of use cases, including load balancing and high availability of MySQL and load balancing and high availability of Microsoft Exchange.

High‑traffic TCP‑based services are not the only ones to benefit from TCP load balancing. Even low‑traffic services can benefit from high availability (using health checks and dynamic reconfiguration), improved security (using SSL/TLS wrapping) and improved visibility (using extended status counters and access logging).

Editor –

High Availability

NGINX Plus supports high‑availability clusters using a solution based on the Linux keepalived utility. You can easily create high‑availability pairs of NGINX Plus instances, using the Virtual Router Redundancy Protocol (VRRP) to assign traffic IP addresses to the primary NGINX Plus instance and transfer them automatically to the backup instance if the primary fails.

To enable and configure this feature, install the optional nginx‑ha‑keepalived package. After initial configuration, you can extend the configuration to implement more complex scenarios, including larger clusters of NGINX Plus instances and use of multiple virtual IP addresses.

For more details about the high‑availability package and its installation process, see the NGINX Plus Admin Guide and High Availability in NGINX Plus R6 on our blog.

Updated Dashboard for Live Activity Monitoring

NGINX Plus R6 includes a new, richer status dashboard that charts the health and activity of your NGINX Plus instance using a wealth of live activity monitoring information:

  • Key software information and high‑level alerts relating to the performance and operation of your load‑balanced cluster
  • Real‑time and historical (average) performance data – requests and bandwidth – based on server zones and applications that you define, for the HTTP and TCP services that you configure
  • Detailed performance and health information for each upstream load‑balanced group
  • Instrumentation and diagnostics on the operation of each content cache

As in earlier releases, the live activity monitoring data is provided in JSON format via a RESTful interface so that you can incorporate NGINX statistics directly into your own dashboards and other monitoring tools.

For a live demonstration, check out demo.nginx.com. For a more detailed exploration of the dashboard, see Keeping Tabs on System Health with NGINX Plus Live Activity Monitoring on our blog.

Support for Unbuffered Upload

You can now configure NGINX Plus for unbuffered upload, meaning that it streams large HTTP requests (such as file uploads) to the server as they arrive, rather than buffering and forwarding them only after the entire request is received.

This modification improves the responsiveness of web applications that handle large file uploads, because the applications can react to data as it is received, enabling them, for example, to update progress bars in real time. It also reduces disk I/O and can improve the performance of uploads in some situations. By default, NGINX buffers uploaded data to avoid tying up resources in worker‑based backends while the data arrives, but buffering is less necessary for event‑driven backends like Node.js.

SSL/TLS Enhancements

NGINX Plus R6 can provide a client certificate to authenticate itself when communicating with an upstream HTTPS or uwSGI server. This improves security, particularly when communicating with secure services over an unprotected network.

NGINX Plus R6 supports SSL/TLS client authentication for IMAP, POP3, and SMTP traffic.

Caching Enhancements

The proxy_cache directive now supports variables. This simple change means you can define multiple disk‑based caches and select a cache based on request data.

This feature is most useful when you need to create a very large content cache and use multiple disks to cache content. By creating one cache per disk, you can ensure that temporary files are written to the same disk as their final location and thus eliminate disk‑to‑disk copies.

Upgrade or Try NGINX Plus

If you’re running NGINX Plus, we strongly encourage you to update to Release 6 as soon as possible. You’ll pick up a number of fixes and improvements, and it will help us to help you if you need to raise a support ticket. Installation and upgrade instructions can be found at the customer portal.

If you’ve not tried NGINX Plus, we encourage you to try it out for web acceleration, load balancing, and application delivery, or as a fully supported web server with an API for enhanced monitoring and management. You can get started for free today with a 30‑day trial and see for yourself how NGINX Plus can help you scale out and deliver your applications.

Editor – For more details about key new features in NGINX Plus R6, see these related blog posts:

Hero image
Free O'Reilly eBook: The Complete NGINX Cookbook

Updated for 2024 – Your guide to everything NGINX



About The Author

Owen Garrett

Sr. Director, Product Management

Owen is a senior member of the NGINX Product Management team, covering open source and commercial NGINX products. He holds a particular responsibility for microservices and Kubernetes‑centric solutions. He’s constantly amazed by the ingenuity of NGINX users and still learns of new ways to use NGINX with every discussion.

About F5 NGINX

F5, Inc. is the company behind NGINX, the popular open source project. We offer a suite of technologies for developing and delivering modern applications. Together with F5, our combined solution bridges the gap between NetOps and DevOps, with multi-cloud application services that span from code to customer.

Learn more at nginx.com or join the conversation by following @nginx on Twitter.