The open source web server Nginx has been winning an increasing amount of interest among the developer community in recent months. This is the finding of Internet research analysts Netcraft in its January 2012 review of the world web space. Of the 583 million sites now estimated to be on the Internet, Nginx added 6.9 million new hostnames in the last month of 2011.
Acknowledging the existence of competitors in this market, cofounder of Nginx Andrey Alexeev explained that while Apache was always meant to be a general purpose web server, his company's offering has set out to "overcome certain barriers in Apache architecture" as he puts it; i.e., the associated application software. Nginx is said to interact with application servers, with memcached/NoSQL solutions, and can put on a fair job of handling SSL too. It can also do HTTP streaming for FLV/MP4 videos and load balance across backend applications.
Speaking directly to Dr. Dobb's, Alexeev said that Nginx is a good choice to solve concurrency problem and optimize latency at the front end part of a website. One user is quoted as saying, "If it's a lower concurrency site where the bottleneck is down to PHP or Ruby or whatever processing issue, then Nginx is less helpful. In those cases we need to look more into caching of code and data. Once caching is in place, Nginx may be great if it still needs more of a traffic boost."
Alexeev says that many developers are now replacing Apache with Nginx as they want to try something new and "better suited" to a layered architecture. "They want to switch to a different architecture in regards to integration with the applications; that is, switch from mod_php or mod_perl with Apache to php-fpm or fastcgi/perl with Nginx. There are several reasons why it might be a good idea to switch — ranging from a better utilization of hardware resources (and a better performance) to something like improved security and making the entire configuration more flexible," said Alexeev.
He continued, "The Ruby on Rails community appreciated Nginx a while ago, and there have been many followers among Ruby developers. With third-party software vendors like Passenger/mod_rails for Nginx and Unicorn, a lot of Ruby developers switched to Nginx for Ruby. The reasons are much the same — looking for a more scalable architecture with the application servers neatly separated from the 'concurrency/static content' layer, flexible to play around, test, change, launch, and develop further."