[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1024594: RFP: nginx-unit -- polyglot app server, a reverse proxy, and a static file server



Package: wnpp
Owner: Georg Faerber <georg@debian.org>
Severity: wishlist
X-Debbugs-Cc: debian-devel@lists.debian.org

Package name    : nginx-unit
Version         : 1.28.0
Upstream Author : Nginx team members and contributors
URL             : https://github.com/nginx/unit
License         : Apache Software License (ASL) 2.0
Programming Lang: C
Description     : polyglot app server, reverse proxy, and static file server

nginx-unit is a lightweight and versatile open-source server that has three
core capabilities:

* it is an HTTP reverse proxy,
* a web server for static media assets,
* and an application server that runs code in seven languages.

Key Features

Flexibility

* The entire configuration is managed dynamically over HTTP via a RESTful JSON API
* Updates to the configuration are performed granularly at runtime with zero interruption
* Requests are routed between static content, upstream servers, and local apps
* Request filtering and dispatching uses elaborate matching rules that allow regular expressions
* Apps in multiple languages and language versions run side by side
* Common language-specific APIs for all supported languages run seamlessly
* Upstream server groups provide dynamic load balancing using a weighted round-robin method
* Originating IP identification supports X-Forwarded-For and similar header fields

Performance

* Requests are asynchronously processed in threads with efficient event loops (epoll, kqueue)
* Syscalls and data copy operations are kept to a necessary minimum
* 10,000 inactive HTTP keep-alive connections take up only a few MBs of memory
* Router and app processes rely on low-latency IPC built with lock-free queues over shared memory
* Built-in statistics provide insights into Unit’s performance
* The number of per-app processes is defined statically or scales preemptively within given limits
* App and instance usage statistics are collected and exposed via the API
* Multithreaded request processing is supported for Java, Perl, Python, and Ruby apps

Security & Robustness

* Client connections are handled by a separate non-privileged router process
* Low-resource conditions (out of memory or descriptors) and app crashes are handled gracefully
* SSL/TLS with SNI, session cache and tickets is integrated (OpenSSL 1.0.1 and later)
* Different apps are isolated in separate processes
* Apps can be additionally containerized with namespace and file system isolation
* Static file serving benefits from chrooting, symlink and mount point traversal restrictions

Supported App Languages

* Binary-compiled languages in general: using the embedded libunit library
* Go: by overriding the http module
* JavaScript (Node.js): by automatically overloading the http and websocket modules
* Java: using the Servlet Specification 3.1 and WebSocket APIs
* Perl: using PSGI
* PHP: using a custom SAPI module
* Python: using WSGI or ASGI with WebSocket support
* Ruby: using the Rack API

Upstream docs available via https://unit.nginx.org/.


Reply to: