Tuesday, June 14, 2011

The maze of finding a good VPS hosting for Drupal and other CMS

I went through the maze of finding a good VPS hosting for a relatively database heavy website (typically any CMS will be in that category, Drupal, Joomla, Plone, Ruby on rails, etc...). So I thought I would write up how the experience, the traps and the final solution I found.

Shared hosting, VPS or dedicated ?
  1. Shared hosting is typically the cheapest alternative, advertised with those super cheap prices (like less than $5 a month). However in practice, unless you just host a few raw HTML pages, your site is going to crawl if you use a MySQL database. If it crawls, most often hosting companies while claiming unlimited this and that will just turn off your website, I've experienced it, many others did.
  2. VPS hosting was recommended to me by my initial hosting company (InMotionHosting) after they unilaterally turned off my website without even notifying me (not to mention I was mad). Their argument was I was using too much resources, time to move to Virtual Private Hosting, which basically is a shared hosting with a fixed amount of resources allocated to you. Now the price varies between $20 to $40 a month for the entry plans between companies.
    • Watch out: there are two types of VPS hosting: managed and unmanaged, I'll explain more about them later.
  3. Dedicated hosting is when you have a full server at your disposal, it will often cost you more than $100 for a entry plan.
So in my situation, I decided that VPS was probably right for me, I don't have a 100.000 connexions a day but at the same time the website is growing and I need a MySQL that responds relatively fast.

What hosting company ?
Now, if you're like me you type "Best VPS hosting" in Google, and you get tons of results that look faked. And they are (faked), many hosting companies pay people in India to post positive reviews about them, that's called backlinking. So they all can claims they are the best. Now in practice, it's far from the truth. Actually a funny event happend, someone posted in my phpBB forums a spam back link for my own hosting company (InMotionHosting), how stupid is that ?

But at first, I fell for the trick and initially signed up for a hosting based on those faked review, the speed was abysmal but I thought naively that it was normal.
  • InMotionHosting:  Then I moved on to another "best hosting", InMotionHosting which basically may be good for shared with basic HTML pages but with Drupal pretty much forced me to go to a VPS. Once on a VPS the performance improved but remained poor, the loading time for the front page on average took 2 seconds and sometimes it would take as much as 60 seconds to load. The customer support could never reproduce the issue (forget about user support for anything that doesn't happend all the time, like an intermittent huge loading time) and they didn't even try. They could have written a script in 5 minutes to load the front page every 10 minutes to measure the load time, they didn't.
  • HostGator: So I decided to finally give a try to the next big name, hostgator. They may be good at shared hosting but while their VPS was faster than InMotionHosting, it still remained slow. Page loading, would take 2 to 8 seconds for my front page. Their VPS comes with CentOs 5.6 and all packages feel obsolete (python 2.4.3, etc... they offer python 2.7 but only for shared hosting...). Their live customer support would deserve an entire blog post to tell the horror stories that have happened to me. Their SQL response time was slow as hell (same config as at my home, the queries took 3 time longer to execute).
These companies are reputed as shared hosters but the VPS value remains low. Their VPS are managed (or semi-managed) which basically means that you get an often incompetent user support to spend hours chatting online. But it's reassuring, someone is helping you even if it's of no help, they provide a chat log so you can show your boss it's not your fault that nothing is working. Yes reassuring.

The world of unmanaged VPS
Here basically you're on your own, you get the server, and you need to install everything without a user support holding your hand. And that's what I finally tried with Linode.

I chose to use the Ubuntu 10.04 Linux VPS (it's a cloud server, but VPS and cloud are pretty much the same thing, just that clouds allows cloning). Installation is simple, you get a SSH shell, you install Apache and whatever you need, it's as simple as apt-get. The packages are up-to-date (being Ubuntu) so you don't really have to compile anything.

In 1 hour, I had the whole site setup and working. The performance is excellent, loading the frontpage takes 250ms. The cost is half of what I was paying with InMotionHosting and HostGator.

Final word
My point here is not to make a commercial for Linode but to relate my experience through years of hosting quest. There are probably others who are offering a good VPS hosting, however I didn't use them so I'm not going to comment on them.

The lesson that I learned:
  • Stay away from big shared hosting companies if you want VPS hosting
  • Go for an unmanaged VPS hosting company, the performance is incomparable, they offer a lot of documents to help you configure your server and you can always find help by going to IRC and chat.
Performance comparison of my page load times
Those times where measured using Firefox:FireBug->Net load time analyzer.
Company Average load time Worst load time
InMotionHosting 1-2s 60s
HostGator 1-2s 8s
Linode 0.25s 0.5s

Thursday, April 21, 2011

Portal 2, an honest review

I don't generally write about games but this time I felt I had to. Because most articles one finds on internet are totally biased and sound more like sponsored infomercials than real objective reviews, and since I don't work for Valve, here's an example of such BS: http://www.rockpapershotgun.com/2011/04/19/review-portal-2/

The good
Technically the game looks good and is fun to play, you really get a sense of achievement when solving some of the harder problems, however none are really that hard. I guess if you played Portal 1, you will find it easier because you're already used to the portal way of thinking.

They have added some new type of technological stuff, like some light bridges, fields and gels which give you more possibilities, however these are not really big game changers. They add variety and it's cool but they never really get used in combination to make you think out of the box. Typically, you just get to deal with 1 or 2 elements at a time, so it's a bit of a let down, they could have pushed the difficulty a bit more.

There are some really nice sound tracks in game, like in other Valve games the music artist(s) deliver super  catchy tunes. With one exception the end-track, read below.

The bad
Slightly disappointing, even though I didn't rush, it only took me 6 hours to complete the single player game. For a $50 game, that felt like being shortchanged, I would have hoped for two to three times that playtime for that price. But that's a general trend in gaming industry, you get less for your money every year.

The story feels weak and predictable compared to Portal 1, but well there's a simple story at least. But I wish it would be a bit more surprising.

The humor felt forced and bitter, to me it felt like the team who did this tried too hard to be funny and ended up failing. In other words, it felt like a job, a mechanical forced way to pack jokes assembled by a group self-centered story-specialist sipping coffee for hours in meetings (anyone who ever worked in a software company will get the picture). In contrast, the humor in portal 1 came progressively and was extremely funny (may be it was the work of smaller team).

The ugly
Ok, the first part with the hyper active "ADSD (Attention Deficit Syndrome)" computer core (that round thingy that keeps on talking stupidly with an english accent) is verging on being obnoxious. This part is so lame and feels so forced, it almost made me close the game or at least to play it without sound. Fortunately this only last for 30% of the game, after that things settle down. To put an image it feels like those Walt Disney 3D animations where the characters are over-scenarized and keep talking.

The ending song, I realize they tried to do a superb song like for Portal 1 (which was so catchy and addictive and fitted the story so well) but let's be honest, they failed miserably. To their defense, it's hard to do a hit song on-demand, even rock stars can't do that. So I don't want to be overly harsh on them, just honest.