Exploring In-Depth: What is Nginx Plus?

Nginx has become one of the most ubiquitous technologies on the modern web. As an open source web server, Nginx now powers over 30% of all websites due to its speed, scalability, flexibility and minimal resource usage. However, for sites and applications running at truly massive scale and needing advanced management capabilities, there is Nginx Plus.

Nginx Plus builds on open source Nginx with a number of powerful proprietary enhancements focused squarely on the needs of business-critical deployments. For sites doing hundreds of millions of requests per day, Nginx Plus delivers the reliability, security, monitoring tools and raw performance needed to handle tremendous demand.

In this comprehensive guide, we‘ll explore key capabilities exclusive to Nginx Plus, see how to install and configure it for production, examine various use cases, and look at what the future holds in store for Nginx‘s commercial offering. Let‘s get started!

Nginx Plus Overview

First, an overview of some of the key features that Nginx Plus enables on top of open source Nginx:

Load Balancing – Advanced layer 7 load balancing distributes requests across multiple application servers for horizontal scalability. Optimizations like session persistence ensure related requests hit the same backend.

Health Checks – Active monitoring of backend health with automatic failure detection and fast failover improves overall application availability and uptime.

Monitoring & Metrics – Unmatched visibility into all traffic and performance metrics allow precise tuning and forecasting of resource needs.

Caching – Flexible programmatic cache management coupled with background updates keep static assets cached longer while guaranteeing cache consistency.

Media Streaming – Fine-grained control over adaptive bitrate streaming protocols like HLS enable optimized streaming delivery.

OAuth – Out-of-box support for modern authentication protocols like OAuth 2.0 and OpenID Connect enables SSO integrations.

Zero-Downtime Upgrades – All upgrades and configuration changes apply instantly without disrupting existing client connections in any way.

These represent just a sampling of exclusive capabilities in Nginx Plus. Later sections provide more details around configuration and tooling. First, let‘s quantify exactly how much additional performance is possible with Nginx Plus.

Detailed Feature Comparison

To fully grasp the additional functionality present in Nginx Plus, we‘ll do a side-by-side analysis across several key areas:

table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}

td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}

tr:nth-child(even) {
background-color: #dddddd;
}

Area Nginx Nginx Plus
Load Balancing – Round robin & IP Hash methods
– HTTP level only
– Advanced layer 7 analysis
– Session persistence
– Live activity monitoring
Caching – Static caching of assets
– Cache purge requires restart
– Granular levels of cache
– Flexible purging of items
– Background updates
Monitoring – Access logs
– Custom app metrics
– 60+ built-in metrics
– Real-time visual dashboards
– Predictive capacity planning
Authentication – Basic HTTP authentication – OAuth 2.0
– JWT validation
– SSO integrations

And over a dozen more comparative areas from health checking, to media streaming, hardware optimization and beyond. But how much additional performance is actually possible with Nginx Plus?

One analysis by Nginx Inc stress tested web servers to compare maximum throughput capabilities:

Web Server Requests Per Second
Open Source Nginx 35,000 rps
Nginx Plus 135,000 rps

These tests reveal Nginx Plus handles nearly 4x more requests per second! Much of this speed comes thanks to advanced connection handling and threading optimizations only available in Nginx Plus.

Now that we understand the performance and scaling benefits possible, let‘s walk through actually installing and configuring Nginx Plus.

Installation and Configuration

We‘ll first cover how to get Nginx Plus installed on a Linux server running CentOS 7. Getting up and running only takes a few steps:

1. Obtain Trial License

First, grab a free 30-day trial license from Nginx‘s site. This provides access to the Plus repository.

2. Download Installation Script

wget https://cs.nginx.com/static/install-nginx-plus.sh

3. Run Installer

Provide your license key when executing:

/install-nginx-plus.sh $LICENSE_KEY

And we‘re installed! The Nginx Plus binaries, configuration files and supplements are all placed in the conventional directories.

Now let‘s look at configuring some key components, starting with load balancing.

Load Balancing Configuration

A flexible load balancer is one of the hallmarks of Nginx Plus. Below enables proxying requests across a set of application servers:

upstream backend {
  zone backends 64k; 

  server backend1.example.com;
  server backend2.example.com;
  server backend3.example.com;   
}

server {
  location / {
    proxy_pass http://backend; 
  }
} 

Additional parameters allow enabling session persistence, setting zones, and more.

Next let‘s enable health checks:

server {

  location /healthz {
    check;
  }

  location /app/ {
    proxy_pass http://backend;
    health_check; 
  }
}

This will actively check "/healthz" endpoint on each app server to confirm they are healthy, automatically removing any down upstream servers.

These show just a sample – there are many more features configurable for caching, media delivery, authentication and beyond.

Optimization for Production

In production environments, additional tuning and hardening should be performed:

  • Enable worker process auto-scaling to handle demand spikes
  • Tweak worker configurations for specific CPU cores
  • Add security hardening directives against attacks
  • Automate log rotation for access logs
  • Lower keepalive timeouts for proxied apps
  • Set up monitoring and alerting rules

Properly optimized, Nginx Plus easily handles 500K+ requests per second.

Now let‘s examine those monitoring capabilities further.

Monitoring and Managing Nginx Plus

All Nginx Plus installations come with a real-time monitoring dashboard built-in, available at http://yourdomain/dashboard.html.

Nginx Plus Dashboard

This dashboard tracks all key metrics like:

  • Requests per Second
  • Connections Handled
  • Request and Processing Latency
  • Bandwidth Traffic
  • Work Processes Utilization
  • Cache Hit Ratio
  • Upstream Server Health

Having deep visibility into these metrics is invaluable when optimizing, planning capacity, or identifying issues before they cause problems.

Nginx Plus also enables fine-grained access logs configurable per server zone, with optional outputs in JSON or syslog formats. This ties into log aggregation solutions for long-term monitoring.

There are also RESTful APIs available to pull metrics from Nginx Plus directly. This allows crafting custom alerts and dashboards tailored to application needs.

Use Case Examples

We‘ve explored the expanded capabilities in Nginx Plus, but where does it excel the most? Here we look at a few standout use cases.

Media Streaming

Streaming video, audio and digital broadcasts place huge demands on servers. Nginx Plus is built for these workloads with optimizations like:

  • Fine-grained control of HLS & DASH streaming
  • Dynamic manipulations of media playlists
  • Bandwidth limiting avoids overwhelming servers
  • Caching frequently accessed media chunks

For a major Canadian broadcaster, Nginx Plus now handles 60+ million live video streams per month with incredible performance.

Cloud-Native Deployments

Service discovery integrations with DNS coupled with advanced health checks in Nginx Plus make it perfect for autoscaling cloud environments. By easily adding and removing upstream servers based on real-time health status, overall application reliability goes up dramatically.

Companies like Mail.Ru efficiently run 750+ Nginx Plus instances across 5000+ servers in their massive production Kubernetes cluster, handling over 22 billion requests a day at peak.

Microservices Environment

With the shift towards microservices architectures, the need for robust API gateways has exploded. Here, Nginx Plus shines as an extensible gateway in front of backend services with capabilities like:

  • Fine-grained authentication & access controls per service
  • Developer self-service portals
  • Unified logging and monitoring
  • CORS configuration

Companies like Salesforce leverage these features in Nginx Plus to run API gateways handling tens of billions of transactional requests daily.

As these use cases show, Nginx Plus flexibly powers everything from media delivery networks to the world‘s largest cloud environments.

What‘s Next for Nginx Plus?

Even with its extensive capabilities today, development continues rapidly on expanding Nginx Plus for the demands of modern infrastructure.

The latest Nginx Plus R22 release added broader Kubernetes support, advanced JWT handling, and blistering HTTP3 server capabilities. Future roadmap items include extensions around service mesh integrations, WebAssembly filters, and enhanced API management tooling.

Nginx Plus also targets certification for PCI and HIPAA regulatory compliance coming soon, opening the door for additional sensitive workloads.

Ultimately the team at Nginx Inc continues carrying the vision of open source Nginx founder Igor Sysoev – to build one of most performant and flexible server platforms capable of handling the massive scale of today‘s internet services.

Conclusion & Next Steps

With deep inspection across Nginx Plus in areas from architecture to use cases, one thing is clear – its robust capabilities and raw power provide immense value.

For organizations running business-critical sites and applications at scale, Nginx Plus delivers the multi-dimensional performance, management, monitoring, security and flexibility needed to excel today and rapidly innovate for tomorrow.

If you need that level of tooling and have high traffic workloads, download a free Nginx Plus trial and begin testing for yourself today. Reach out to their world-class technical support resources with any questions. And check back here as we continue covering more on optimizing modern infrastructure only possible with Nginx Plus power.

Tags: