What is: NginX

What is: NginX

Lately I have been writing a lot about NginX so I thought I would write a small post to describe NginX and what it is.Although I like to write it NginX because its origins are in the Linux world they write it all in lower case nginx (I know, boring right). The name stands for Engine X, well, engine x… It is an HTTP server, reverse proxy server and a mail proxy server. It was written by Igot Sysoev who I believe is Russian. Maybe that’s why some very popular Russian sites like Yandex, Mail.Ru (VKontakte and Rambler) have been using it for a while. On this side of the world we have sites like Netflix and WordPress.com using NginX as their web / proxy server.

Below is the information obtained from NginX.org covering the details of what NginX can do and its features. What I can talk about is how it fits in with our overall architecture when hosting web sites.

We primarily use WordPress so seeing the guys at WordPress.com using NginX told us this was probably if not the best at least the right direction to go. We deployed an architecture that uses a front end reverse proxy with caching, and a back end PHP-FMP web server to serve the dynamic content from WordPress. The results were good, we were able to cache static content serving it much faster and preventing downtime while we make changes to our back end, while the back end is able to handle more traffic without a considerable spike in resource usage.

 

NginX sources and documentation are distributed under the 2-clause BSD-like license.

Basic HTTP server features

 

 

Other HTTP server features

 

 

Mail proxy server features

 

  • User redirection to IMAP or POP3 server using an external HTTP authentication server;
  • User authentication using an external HTTP authentication server and connection redirection to an internal SMTP server;
  • Authentication methods:
    • POP3: USER/PASS, APOP, AUTH LOGIN/PLAIN/CRAM-MD5;
    • IMAP: LOGIN, AUTH LOGIN/PLAIN/CRAM-MD5;
    • SMTP: AUTH LOGIN/PLAIN/CRAM-MD5;
  • SSL support;
  • STARTTLS and STLS support.

 

Architecture and scalability

 

  • One master and several worker processes; worker processes run under an unprivileged user;
  • Support for kqueue (FreeBSD 4.1+), epoll (Linux 2.6+), rt signals (Linux 2.2.19+), /dev/poll (Solaris 7 11/99+), event ports (Solaris 10), select, and poll;
  • The support of the various kqueue features including EV_CLEAR, EV_DISABLE (to temporarily disable events), NOTE_LOWAT, EV_EOF, number of available data, error codes;
  • sendfile (FreeBSD 3.1+, Linux 2.2+, Mac OS X 10.5+), sendfile64 (Linux 2.4.21+), and sendfilev (Solaris 8 7/01+) support;
  • File AIO (FreeBSD 4.3+, Linux 2.6.22+);
  • DIRECTIO (FreeBSD 4.4+, Linux 2.4+, Solaris 2.6+, Mac OS X);
  • Accept-filters (FreeBSD 4.1+, NetBSD 5.0+) and TCP_DEFER_ACCEPT (Linux 2.4+) support;
  • 10,000 inactive HTTP keep-alive connections take about 2.5M memory;
  • Data copy operations are kept to a minimum.
Enhanced by Zemanta

You may also like...

1 Response

  1. February 19, 2014

    […] to: Reload your NginX […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.