Tag Archives: webserver

Recommended: migrate from apache to nginx

During the last couple of weeks I was having issues with the load on my webservers. The problems were mainly caused by Apache eating a lot of memory. As Apache was already pretty much optimized and I didn’t feel like simply buying more hardware, I started looking for alternatives. After some research, I decided to give the Russian nginx (pronounced ‘Engine X’) a try.

Igor Sysoev started the development of nginx in 2005. It’s now known as a high performance webserver with a very low memory footprint. Already 4% of all webservers are running nginx according to a research done by Google in 2007, well-known sites like WordPress.com and Hulu are some good showcases.

Some of my servers are now running nginx for about a week and the Russian software actually outperformed my expectations!  The load average decreased with 70% and I now have plenty of RAM available during peak-times. I did have to invest quite some time to migrate from Apache, but it saved me a lot of $$$ on buying extra hardware. I believe anyone operating a high traffic website with both static and dynamic content could benefit from a migration to nginx.  To make the migration somewhat easier, here’s a list of resources I used during the migration:

– Howto install nginx with PHP5:

– Convert .htaccess rewrite rules to nginx rewrite:

– Set up loadbalancing with nginx:

– Nginx wiki:

My expectation is that we’ll see nginx showing up more and more serving high traffic websites. It’s a very good alternative for Apache, offering comparable functionality with a huge performance improvement.

Tagged , , ,