Circle of 8 – Getting Started with nginx Part III (a)


I has this idea on my mind since sometime and I had been trying hard to figure out what all technologies I could leverage to finally produce a worthwhile result. After a lot of speculation, I stopped with Node as the backend application server, MongoDB as the NoSQL database and nginx for static resource rendering. You can read more about the journey in steps
Circle of 8 – Setting up Node on AWS – Part I

So, the big question: Why nginx

It’s fast

A benchmark test by Marco Polichetti reveals that nginx is really fast at rendering static content, even faster than node with Express/Connect.
Note: At the time of writing this, I’ve not done any benchmark tests myself yet. I’ll design my own benchmark testing tool or select from the popular ones to test with in future. It may not fit the bill to do a test before even getting started.

Simplicity and Familiarity

The best source to get started is the nginx official site itself. It narrates the topics e.g. load balancing, reverse proxy set up etc. with such simplicity that you won’t believe that it is the code that you’ll write in production.

Yes, nginx is that simple. In fact, it is simpler than apache.

And, in case you get trapped, many people know already how to use it. And they use it to their advantage FULLY. There are plenty of tutorials, blogs and answers on various issues. All narrations are satisfactory and thankfully working.

Multi Threading

One of my friends, Parteek, who was working on his personal project with Ruby-on-Rails, also suggested that he was using nginx as a static content provider, load balancer and reverse-proxy since Ruby-on-Rails is single threaded and he couldn’t exploit multi-core processors’ capability to the fullest with rails (without any additional gems).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s