OJ’s rants What would OJ do?

10Sep/0912

Now Running Nginx

clarkson_faceFor the last couple of years, the server which has powered this site (and a few other sites) has been running the free version of Litespeed web server. After feeling the resource burden of Apache, Litespeed was a breath of fresh air! The fact that the "full" version wasn't free didn't bother me, I was happy to stick with the standard edition as it seemed more than capable of handling the meagre traffic that this site generates.

After a year or so of serving up content, it managed to handle a couple of Reddit submissions without much of a bother! I was suitably impressed.

But there comes a time when you can't help but wonder what else is out there. For me, that time came a little while ago when I boosted the number of plug-ins that I use on this site. Litespeed took longer to serve pages up and I couldn't help but notice it. I'm certainly not blaming Litespeed, because the obvious solution is to remove the plug-ins! But I didn't want to do that as those plug-ins provide features for this site that I don't want to lose. So my quest to find another web server began.

Then recently I started researching ideas for developing software in Erlang. I've been reading up on the language for quite a while and I'm getting to the point where I intend to build something. My first effort is going to be a web application that uses Mochiweb, Webmachine and CouchDB. I know that at some point I'm going to want to have this thing run on the web so that other people can play with it and that would mean that I would have to have a web server available that could also route requests to my Erlang server. Of course, I want it to be quick.

clarkson_faceSo after a bit of deliberation and research, I followed the footsteps of some big players and ended up installing Nginx (which I believe is pronounced "Engine-X"). I kid you not, this thing is amazing! I'm not going to give a full review of it here because I haven't used it enough to know how good it is. But the speed-up for this site in particular is obvious (at least for me).

My mate Dan's site absolutely flies!

On the whole, Nginx gets a huge thumbs up from me thus far. If you're looking for a speedy web server that can do reverse proxying, dish up static content like a maniac and handle forwarding of requests to a variety of other servers then you should seriously consider taking a look at Nginx.

Thank you, Igor!

  • OJ
    I totally agree. I'm a big fan of my VPS, (though I use VPSLink for my host). Shared hosting is a PITA :)
  • sweetsmart99
    VPS Hosting is way better than shared hosting. I am always having problem with configuring files. So I chose to moved in VPS.
  • OJ
    @Keef: Bingo. The only real reason people think that Apache is easy to configure is that there are now a crapload of front-end UIs for it. If you don't use those, it's still a PITA. Also, those front ends don't result in an optimal configuration.

    Nginx is no harder, and runs like the wind :-)
  • Agreed. Apache can hardly be considered "simple". I had a nightmare trying to write the correct redirect rules when I changed my blog software and it still doesn't cope with every possible situation transparently.
  • OJ
    Configuration of any high-performance server application is a nightmare. I didn't find this any harder or painful than configuring Apache for the first time. In fact, it might have been a little easier.

    So in my view, Nginx's configuration pain isn't really a point of contention that's worthy of argument :)
  • Yoann
    looking at the comments it seems nginx is a nightmare config wise, which in a prod environment where things have to change would make life a bit of a nightmare.
  • OJ
    Yeah, I have to admit that the config side is a little rough. There were a few things around the web showing how to do it, but lots of them didn't really do a good job of making things good. Nginx really needs a config front end. Then again, it's hard to make a front-end for something like this.

    But yeah, once it's up, it's rock solid!
  • Dan
    Mate, talk about snappy!

    We use Nginx at work for all our sites (some with disgustingly huge amounts of traffic) and it is pretty awesome! The problems we have had are all around getting the config files right... from what I undertand, the sysadmin(s) have issues at times getting it just so for live deploys. But once it's done.. it's a beautiful thing :)

    /dan
  • OJ
    It totally depends on what you want and how much traffic you get. I share the cost of hosting with my mate Dan, which works out well for both of us. It still puts us each back a couple of hundred in AUD per year, but that's not too bad considering the control we get.

    You can get VPS solutions with pretty low specs fairly cheap! VPS Link have a low barrier of entry. Check 'em out! There's also slicehost which I hear isn't too bad.
  • I agree that shared hosting sucks. However, what else can a broke college student afford? VPS seem to be really expensive ( at least on my budget).
  • OJ
    Yeah mate, it's true. Shared hosting does indeed suck! Get yourself a VPS and take control :)
  • Bah! I'm stuck with Apache unless I start paying for dedicated hosting. Shared hosting sucks!
blog comments powered by Disqus