Category: scalability

Apache vs Nginx

Lest i forget again:

Apache : Process based. Each request handled by a separate thread (and thereby cost)

Nginx (pronounced ‘engine X’): Event based, asynchronous. Architecture here, http://www.aosabook.org/en/nginx.html

Reminds me of working with non blocking sockets a while ago (SocketChannels) in Java. The benefits were huge – we didnt need a newer thread to process each request coming on socket, the data writes/ reads were not blocking and so on. Shame that the project remained in PoC.

Just google for the performance difference between Apache and Nginx and you would see how community supports Nginx and more so when it comes to static content. The wikipedia also has some good links about it.

Advertisements