Rails Hosting On An Inexpensive Virtual Private Server
|
The majority of websites these days are hosted on shared hosting services. This means each site is on a single server with hundreds or thousands of other websites, which is why they are called "shared". Since the web hosting company only has to run one server, they are able to sell these services at a really low cost, typically $4-10 per month.
Shared hosting works good for a simple blog or personal site but there are many disadvantages of using it to host a Ruby on Rails site. Hosting Rails on a shared host could be done, but it's not an easy process.
The main problem with running Rails on a shared host is the resource sharing. Most web servers are built to quickly send the browser a single page and then move onto the next visitor. This lets them multitask and is what lets the other thousand sites run quickly. With Rails though, the web server has to stick around after the page is created. This means that the web server can't send any pages for the other sites, even if your site isn't being used. Once a server has enough of these waiting web servers loaded, no one else will be able to use the server. Now think about if your site was one of the "other" sites that couldn't be reached. Not a good thing at all.
Like most budget or low cost things, the solution is to spend a bit more money.
A technology called virtualization is now used heavily by hosting companies. This lets them sell virtual private servers (VPS). What happens is that a single server runs the virtualization software which splits it into several smaller servers. Each of those smaller servers gets a guaranteed portion of the main server's resources to run whatever it needs to run.
Though this sounds like normal shared hosting, each VPS is separated from all of the other VPSs.
When a VPS is split from the main server, it gets it's own set of resources like CPU, RAM, and disk. These resources are only allowed to be used by the VPS, no one else can use them. Not even the main server can use them or take them back without turning off the VPS. So if you use a VPS for your Rails hosting, it won't be affected by the other hundred sites running on the main server. This means the other sites can't slow down your site or accidentally take it offline.
One disadvantage of a VPS is that they cost more than most shared hosting plans. I've seen some start in the $15-20 per month range for the smaller sizes. You are also paying based on how many resources you need, one with 512MB of RAM will cost less than one with 1024MB of RAM.
The other disadvantage is that you will need to set up the VPS yourself. This means installing and configuring the web server, Ruby, and Rails. Some hosting companies now offer Managed or Pre-Built VPS accounts where they do all of the set up and maintenance for you.
With cheap virtual private servers available, I rarely use shared hosting any more. When your Rails website has to be online 24/7, the peace of mind knowing that your VPS has control over it's own resources will help you rest easy. |
|
Author Resource:-
Most of the best Rails hosts offer virtual private servers now. Lunar Pages Rails is a good example of one you can use.
|
By :
Daniel Quitzon
Submitted
2011-04-02 15:28:46 |
Article From Article Mayhem
Ezine ready view |
|
|
|
Related Articles
|
|
|