[Guest Post by Prateek Dayal, founder of Muziboo – bangalore based startup focusing on music collaboration. What started as an experiment/hobby, turned into serious gold and Muziboo has been able to get users from across the world, to collaborate and create music. In this post, Prateek shares his hosting experiences (and very useful tips) while running (and maintaining) Muziboo servers.]
One of the first lessons I learnt was that $10 hosting is so cool is very misleading. If you do a quick search for cheap hosting will throw up lots of sponsored and unsponsored results. Providers would offer you 100s of GBs of space and terabytes of data transfer and you would do a real quick calculation and figure out that you can support thousands of users on that. You can’t be more wrong and nothing would cause you more pain than realizing it when you site is live and serving some real traffic.
Why is shared hosting so bad
Now let me write some of the reasons why shared hosting is a bad idea. Please feel free to add more reasons or debate the ones listed here.
No performance guarantees
Shared hosting is bad because you simply have no performance guarantees. I am not talking of the 99.99% uptime SLAs here because they are mostly useless anyway. The maximum they would do for you if things go wrong is to refund you a few dollars (thats if you can really win with them). How does that sound for an hour of outage everynow and then leaving your users hanging? One of the most common reasons for your site going down on a shared host is someone else hogging all the resources on the system. This could happen everytime anybody has a traffic surge on the system or there is a mysql restoration going on for another account or probably any other CPU/disk IO intensive stuff.
Think of CPU and RAM
Probably even more important than getting a lot of hard disk space and bandwidth is to get a decent share of CPU and memory. You will not need the 250GB space offered to you anytime soon but you are going to need a lot of CPU cycles as your traffic goes up. You will need more and more RAM if you are hosting using frameworks like ruby on rails.
No long running processes
This is something most newbies have no idea about. Long running processes are used for doing stuff in the background. This could be something like zipping a file in the background after an upload or clearing out old sessions from database every 30 mins or something like that. Mostly they are run using cron and will be needed for almost any big site. Most shared hosts don’t allow this as such processes eat a lot of CPU cycles and RAM. You may not need this as soon as you start your site but you will need them sooner than you think (especially if you are using ruby on rails as it blocks on long requests and you almost always want to move them to the background).
Limit on Emails
Most of the shared hosts have a limit on the number of emails that you can send per hour. So if you have an application that needs to send out lots of emails, make sure you check this with your host. I am talking only of outbound email. For incoming emails, you should try using something like google apps. You can read more about google apps and other helpful webservices here
How do I know if its the system load when my site is slow
If you are on a linux hosting (which you should be), try usingthe commands vmstat (for disk IO usage) and uptime (for CPU usage). This should give you a good idea of whats going wrong. You can also try talking to your service provider but I doubt if it would be helpful.
What’s the solution then
The solution most often is to use a Virtual Private Server (VPS). A dedicated box may be too expensive (specially when you want something with a RAID etc) and you may not need it anytime soon. A VPS offers a good tradeoff between performance and price. A VPS is like a dedicated box but in reality its one system partitioned into many systems. Partitioning include memory, RAM etc so you know there is no overloading there. You always get the resources promised to you. Several features of a VPS are
- A guaranteed performance (even in terms of CPU. Only exception is Disk IO, but blocking there is not very common)
- You know how much RAM you need
- No limits on sending emails etc. Its like your dedicated box and you decide how you wanna use it
- You can run long running processes or whatever you want on it if you have taken one with enough RAM
What’s good about shared hosting
Before I get flamed for talking only bad things about shared hosting, let me talk about whats good. Here are some reasons why you would wanna start out with shared hosting and then get onto a VPS before public launch (yes, even beta)
- Very easy to get started as no system administration skills required
- You can learn a lot when things don’t work 🙂
- You can focus on building the app and let someone else worry about hosting it initially
- You can use it for backups etc as they give you a lot of disk space and bandwidth
- You can use it to host your blogs etc
But make sure that you don’t lock yourself into a one year plan or something while trying out shared hosting
Review of VPSFarm
VPSFarm is based out of US and while researching for VPS providers, I found them to be pretty good. I considered slicehost and other popular VPS choices as well as some cheap dedicated boxes from layeredtech.com etc. This is what I did not like about them
- Most VPS providers take some time to setup your VPS. This should be mostly fine but there is a delay nevertheless
- Providers like Slicehost etc have a waiting time before you can get your VPS. I think after signing up, it took a few weeks before I got an email.
- Cheap dedicated boxes have older processors which may be ok for you but I was not so sure about that. Another thing is that they have a regular hard drive and no RAID protection. Even with backups, I think its good to have RAID so that your server does not go down with a drive failure.
- I found the RAM being offered everywhere else to be almost half for the same price.
I did not find many reviews of VPSFarm when I was trying to signup and I already had not so great experience with two providers before so I was a little concerned. However I went through their docs online and finally ordered. Somethings that I really liked about them then were
- Xen based Virtual Private Servers (from my research I found out that xen is the preferred way)
- No setup time or fees or annual contracts (pay every month by paypal)
- Choice of operating systems (I picked debian as ubuntu was and is still missing)
- You can install/reboot/halt VPS using a web based control panel
- Bandwidth is unmetered (speed depends on your plan) and RAM/price ratio is awesome
- RAID 10 for storage
Something that may be of concern to some people are
- Only one IP address assigned. As far as I know, you cannot currently buy more. This is ok in general but not good if you want to host DNS. I however recommend outsourcing DNS and email.
- Its not possible to move to a higher or lower plan without some kind of downtime or manually setting up the new VPS. If you are ok with downtime however, they would help you move.
So far (last 8 months) my experience with VPSFarm has been awesome. Only once my VPS went down for some 20 minutes but I got an email from them immediately and the issue was fixed. There was once a network outage but it was automatically restored in a minute. I started out with XEN 1024 plan and I am currently on XEN 2048 plan.
Do give VPSFarm a try and let us all know your experience too.[original posts : here and here]