Thursday, 27 October 2011

Speed Up Your Server Performance With Nginx

Apache is one of the best well known web server, that run in all platform, but usually on Linux in production mode. Apache supports a variety of features, many implemented as compiled modules which extend the core functionality. Both static files (css, js, html, image files) and dynamic files (php, pl, py, etc.) are served equally using same amount of resources. Which will cause bottleneck in system performance when your website have lot of static files and lot of traffic.

To prevent this, we can use nginx (read: engine x) to serve static files and use apache to serve dynamic files. To do this you can configure both nginx and apache web server to work together. Where nginx installed as reverse proxy. So nginx will filter all the requests, where static files will serve by nginx and dynamic files will pass to apache.
This technique will certainly improve your server performance, since nginx is incredibly fast in serving static files and apache will use resources efficiently (because only serve dynamic files/server script). And the next step is load balance the nginx with other nginx. So it is possible for you to make your own cdn (content delivery network). So you just need to buy another small server just in another location to serve your visitors from nearest location to your server.
Related Posts Plugin for WordPress, Blogger...