Some time ago, we had to move on our servers to another location. With previously unplanned shutdown we though, what else we can do?
Our first servers was equipped by Apache 2.4 series. It was fine, except small differences in .htaccess files incompatible between 2.2 and 2.4. Also we couldn't use SPDY module (actually frozen on SPDY 2 and compatible only up to Apache 2.2).
SPDY is similar to HTTP, with particular goals of reducing web page load latency and improving web security.
So, next step was about choosing different web server. Options was following
- Stay with Apache 2.4 without SPDY
- Downgrade to Apache 2.2
- Lighttpd
- Other proprietary solution
- Nginx
First option isn't best one, as I dug into articles about web servers, it came clear, that Apache is today best compatibility option, but nothing more. In terms of scaling on more cores it proved almost worst results. So, why waste our CPU time.
For second option I personally have to say, I hate downgrades! Well, downgrade Apache to get unmaintained SPDY 2 abadoned by Google developers? God why?!
As third option, lighttpd seems really nice, it does what he says - it's light and fast. But no planned SPDY - probably missing HR. And missing Human Resources in web server development is serious problem.
Fourth option was one interesting proprietary webserver, which I can't recall now. I thought about it for few minutes, but then came our winner. Nginx.
Nginx offered stable SPDY 2 support for some time. Very well scalable, simple and understandable configuration.
SPDY 3.1 support is already finished and released with NGINX version 1.5.10
But also with few challenges
- setup php-fpm and integrate php into nginx
- correctly configure websites to work with nginx
Second point is more important. For widely used software are already nginx configuration samples available (beware some configs can work better than others), which makes life much more easy. Only annoying thing is setting up php-fpm - you have to choose if use socket or TCP/IP. We chosen socket, because it should be faster (and less scalable). But don't forget - you'll have to set it in every nginx site configuration, or prepare generic snippet with php-fpm integration to include.
On Gentoo systems you can install it (and unmask it) by typing
# emerge -av =nginx-1.5.10
Sources: SPDY on Wikipedia