Nginx JavaScript is ready for prime time

The Nginx Plus R12 server can be programmed using NginScript, a JavaScript-based tool

Nginx has upgraded its web server and load balancer to take advantage of its JavaScript implementation.

The company on Tuesday debuts Nginx Plus R12, the commercially supported version of its technology. This release moves NginScript, a JavaScript-based programming tool, to general availability for production use. Developers can choose NginScript for traffic handling, via a familiar JavaScript syntax. The code can be embedded in Nginx Plus for actions on HTTP, TCP, and UDP traffic.

"JavaScript programmers can actually do the same thing you can do in Lua," which has been used for programming the Nginx server, said Chris Lippi, vice president of products for Nginx. JavaScript is more pervasive than Lua, so users get an expanded programming talent base to choose from for hiring purposes.

NginScript in Nginx Plus 12 features enhancements for ECMAScript 6 math methods and constants, as well as additional string methods. Nginx co-founder Igor Sysoev talked in late 2014 about the company's JavaScript intentions; with the R12 release, those ambitions come to fruition.

R12 also features configuration sharing via a sharing script for pushing configuration from a master Nginx Plus instance to peers. This process is used for backups and verifies the validity of the configuration on remote peer. Enhanced caching, meanwhile, is enabled via Stale-while-Revalidate and Stale-if Error cache extensions. Cache revalidation is done in the background to keep users from being delayed by a round trip to the original server.

To improve health checking, traffic can be delayed to new servers in a load-balancing pool until a health check passes. Servers are added via the API or DNS interfaces, and a slow-start capability enables servers to be gradually introduced to the pool. Nginix also offers greater visibility into application performance, including server response times, error codes for TCP/UPD services, and shared memory zone utilization. These metrics can be viewed via the server's live activity monitoring dashboard, or they can be exported in JSON format into another monitoring tool.

When upgrading to R12, the on-disk cache will be invalid and Nginx Plus automatically refreshes the cache as needed; old cache entries are deleted. Also, connections to upstream servers can be queued if servers are overloaded; the queue directive must be placed after any load-balancing directives. Third-party dynamic modules installed from the Nginx repository will be automatically updated during the upgrade; any third-party modules users built will require manual updates.

Join the Computerworld newsletter!

Error: Please check your email address.

More about Cache

Show Comments

Market Place