Announcing NGINX Unit 1.0


NGINX Unit 1.0

Also please see our related blog posts about installing WordPress, a widely used PHP framework and content management tool, along with with NGINX Unit.

Today, April 12, marks a significant milestone in the development of NGINX Unit, our dynamic web and application server. Approximately six months after its first public release, we’re now happy to announce that NGINX Unit is generally available and production‑ready. NGINX Unit is our new open source initiative led by Igor Sysoev, creator of the original NGINX Open Source software, which is now used by more than [ngx_snippet name=’number-sites’] websites.

“I set out to make an application server which will be remotely and dynamically configured, and able to switch dynamically from one language or application version to another,” explains Igor. “Dynamic configuration and switching I saw as being certainly the main problem. People want to reconfigure servers without interrupting client processing.”

NGINX Unit is dynamically configured using a REST API; there is no static configuration file. All configuration changes happen directly in memory. Configuration changes take effect without requiring process reloads or service interruptions.

NGINX runs Go, Perl, PHP, Python, and Ruby together on the same server
NGINX Unit runs multiple languages simultaneously on the same server

“The dynamic switching requires that we can run different languages and language versions in one server,” continues Igor.

As of Release 1.0, NGINX Unit supports Go, Perl, PHP, Python, and Ruby on the same server. Multiple language versions are also supported, so you can, for instance, run applications written for PHP 5 and PHP 7 on the same server. Support for additional languages, including Java, is planned for future NGINX Unit releases.

Note: We have an additional blog post on how to configure NGINX, NGINX Unit, and WordPress to work together.

Igor studied at Moscow State Technical University, which was a pioneer in the Russian space program, and April 12 has a special significance. “This is the anniversary of the first manned spaceflight in history, made by Yuri Gagarin. The first public version of NGINX [0.1.0] was released on [October 4, 2004,] the anniversary of the Sputnik launch, and NGINX 1.0 was launched on April 12, 2011.”

What Is NGINX Unit?

NGINX Unit is a dynamic web and application server, suitable for both stand‑alone applications and distributed, microservices application architectures. It launches and scales application processes on demand, executing each application instance in its own secure sandbox.

NGINX Unit manages and routes all incoming network transactions to the application through a separate “router” process, so it can rapidly implement configuration changes without interrupting service.

“The configuration is in JSON format, so users can edit it manually, and it’s very suitable for scripting. We hope to add capabilities to NGINX Controller and NGINX Amplify to work with Unit configuration too,” explains Igor.

[Editor – NGINX Controller is now F5 NGINX Management Suite.]

The NGINX Unit configuration process is described thoroughly in the documentation.

“Now Unit can run Python, PHP, Ruby, Perl and Go – five languages. For example, during our beta, one of our users used Unit to run a number of different PHP platform versions on a single host,” says Igor.

NGINX Unit’s ability to run multiple language runtimes is based on its internal separation between the router process, which terminates incoming HTTP requests, and groups of application processes, which implement the application runtime and execute application code.

NGINX Unit architecture
NGINX Unit architecture

The router process is persistent – it never restarts – meaning that configuration updates can be implemented seamlessly, without any interruption in service. Each application process is deployed in its own sandbox (with support for Linux control groups [cgroups] under active development), so that NGINX Unit provides secure isolation for user code.

What’s Next for NGINX Unit?

The next milestones for the NGINX Unit engineering team after Release 1.0 are concerned with HTTP maturity, serving static content, and additional language support.

“We plan to add SSL and HTTP/2 capabilities in Unit,” says Igor. “Also, we plan to support routing in configurations; currently, we have direct mapping from one listen port to one application. We plan to add routing using URIs and hostnames, etc.”

“In addition, we want to add more language support to Unit. We are completing the Ruby implementation, and next we will consider Node.js and Java. Java will be added in a Tomcat‑compatible fashion.”

The end goal for NGINX Unit is to create an open source platform for distributed, polyglot applications which can run application code securely, reliably, and with the best possible performance. The platform will self‑manage, with capabilities such as autoscaling to meet SLAs within resource constraints, and service discovery and internal load balancing to make it easy to create a service mesh.

NGINX Unit and the NGINX Application Platform

An NGINX Unit platform will typically be delivered with a front‑end tier of NGINX Open Source or NGINX Plus reverse proxies to provide ingress control, edge load balancing, and security. The joint platform (NGINX Unit and NGINX or NGINX Plus) can then be managed fully using NGINX Controller to monitor, configure, and control the entire platform.

NGINX Application Platform for microservices and monolithic applications with NGINX Controller, NGINX Plus, and NGINX Unit
The NGINX Application Platform is our vision for building microservices

Together, these three components – NGINX Plus, NGINX Unit, and NGINX Controller – make up the NGINX Application Platform. The NGINX Application Platform is a product suite that delivers load balancing, caching, API management, a WAF, and application serving, with rich management and control planes that simplify the tasks of operating monolithic, microservices, and transitional applications.

Getting Started with NGINX Unit

NGINX Unit is free and open source. Please see the installation instructions to get started. We have prebuilt packages for most operating systems, including Ubuntu and Red Hat Enterprise Linux. We also make a Docker container available on Docker Hub.

The source code is available in our Mercurial repository and mirrored on GitHub. The code is available under the Apache 2.0 license. You can compile NGINX Unit yourself on most popular Linux and Unix systems.

If you have any questions, please use the GitHub issues board or the NGINX Unit mailing list. We’d love to hear how you are using NGINX Unit, and we welcome code contributions too.

We’re also happy to extend technical support for NGINX Unit to NGINX Plus customers with F5 Premium support contracts. Please refer to our Support page for details of the support services we can offer.