Mobile app version of vmapp.org
Login or Join
Samaraweera270

: Can someone explain the true landscape of Rails vs PHP deployment, particularly within the context of Reseller-based web hosting (e.g., Hostgator)? Currently, I have a reseller account with the

@Samaraweera270

Posted in: #Php #RubyOnRails #WebHosting

Currently, I have a reseller account with the company HostGator. I design websites, which up until now have occasionally been wrapped in Wordpress CMSs and the like (PHP applications). I then sell hosting (of the site I've designed) to the client, which is pretty simple, in that I can simply click a button and add a new shared hosting account/site with whatever settings I want. Furthermore, I then utilize WHMCS to automate billing and account management.

It's a nice package and pretty simple. I pay something like a month, and can sell a hundred accounts under this (because my clients bandwidth requirements are low).

Now I am finding the need to develop more customized applications, including a minimalist CMS and several proprietary things. I soon anticipate developing these apps for clients as well. Thus, I've spent the past few months learning Rails, and it's coming along well now.

The thing that has nagged at me all along, though, is the deployment issue. I can't wrap my brain around it. It seems like all of the popular options (Heroku, etc) have nice automation with git and are set up in the "Rails Way". I get that (sort of). But it's terribly expensive... a single dyno, a helper, and the cheapest database (which they say is mainly suitable for testing) that isn't limited to 5MB runs . This is for ONE app!!! Throw in a "production" DB and you're over 0. This is like... the same prices as getting a server somewhere, right?

Meanwhile, going back to what I guess is a "traditional" hosting environment with Hostgator, their server only has Ruby 1.8.7 and Rails 2.3.5... No Rails 3. AND, no Passenger (not that I really understand the difference in CGI or mod_rails or whatever, but they say Passenger is the simplest). So I'm to understand that if I build an app in Rails 3, it won't run at all on this host? But damn, I already have these accounts under my reseller account there, all running static html and/or PHP stuff, right? So what now? How do I get all of this under one simple (and affordable) roof?

Forgive my ignorance, but I just don't get it. Managing a VPS is cool and all, but entails learning server admin stuff and security... And it's expensive. I get that a shared and/or reseller "server-based" (forgive the terminology) may be inadequate for large-scale apps that use a lot of bandwidth... But what about for those of us who are building real (but small and low bandwidth) apps (with Rails) and who want to deploy them simply, cheaply, using the same conceptual approach as PHP? Even after learning all of this Ruby and Rails stuff for months, I'm questioning whether it's worth it when it comes to deployment. I want to build a small app, upload it to my home directory on a shared server account, and just make it run. Why should that be so hard? Am I just choosing the wrong language/framework?

Forgive my ignorance in the subject; these questions are not rhetorical; just trying to learn here.

So:

1) I'd appreciate if someone could give me a good rundown of how to understand deployment in Rails vs. PHP.

2) I'd appreciate if someone could address my issue with running a hosting/web business around reseller hosting (Hostgator) while also being able to host Rails apps. Can it be done? And how can a company like Hostgator completely ignore what's current in Rails/Ruby?

Thanks.

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Samaraweera270

3 Comments

Sorted by latest first Latest Oldest Best

 

@Connie744

A good new solution to this old problem is Digital Ocean.

We deployed a Rack app and it is not that hard. Pricing starts at /month/app.

They have a One-Click App for Rails which should make things easier.

10% popularity Vote Up Vote Down


 

@Deb1703797

Although Rails hosting will probably never be as inexpensive as PHP, since the infrastructure requirements are always higher, it is not expensive to host a Rails site.

It does take a certain amount of technical skill to properly deploy a Linux-based server and load on Rails and all the associated database back-end stuff, but this is not an insurmountable obstacle. Any competent programmer could probably get up to speed inside of a few weeks with just a few hours a day and a good reference book. This is the sort of thing that is valuable to know anyway as it helps you tune your deployment environment.

Many "out of the box" Rails hosting systems are expensive. EngineYard, Joyent and Heroku are great examples of that, but in every case they do carry a premium over the self-hosted alternative.

If you have a client that can afford this premium, it's worth taking advantage of their expertise. If you're on a very tight budget, you may not be able to justify this.

The lest expensive Rails hosting solution I know of that works is using Linode with a standard distribution combined with Passenger. With some basic tuning, nothing especially difficult, you can host a small to medium scale site on even their most inexpensive offering. A machine with 512MB of memory can typically host two to three lightly loaded Rails sites or one busy one. By lightly loaded I mean hundreds of visitors per day. Busy is thousands to tends of thousands.

In fact, I have had so much trouble with shared PHP hosting that it's not worth the cost savings to do it that way. Instead I have several VPS systems on Linode that are specifically for PHP hosting, WordPress blogs, typically, and they perform very well. Although you might find it a nuisance that you have to go in and patch the machines once in a while, at least you can schedule that and anticipate potential problems instead of being at the mercy of your provider.

Commodity hosting companies will often break things accidentally and getting service restored can be a time-consuming process of trouble tickets and phone calls.

Deployment of any application, Rails or otherwise, is all about workflow. Many Ruby-oriented tools like Capistrano and Chef can make managing applications much easier than a manual approach.

My take on Rails: It can be a bit more expensive, but it's a lot easier to manage once you get used to the tools and automate your workflow.

10% popularity Vote Up Vote Down


 

@Dunderdale272

Not an answer to your question, but to be very honest, my initial impulse when I read about your business setup was: "Why is he not just sticking with PHP?"

Don't get me wrong: I'm sure Ruby is a beautiful language, and Rails a great framework and much of it is in many ways superior to PHP. It's also great for a developer to explore new fields etc. etc.

But from a purely business perspective, PHP is arguably "where it's at" for three important things at the moment:


Cheap hosting, and
CMS software for every taste, size, skill level and requirement and favourite colour. Some of them are even half-way usable, and
Affordable developers, some of them even half-way capable.


So if I were you, I would look into whether your requirements can be fulfilled with PHP first.

Otherwise, +1 for asking a very thoughtful question, and it's going to be interesting to see the results. I have seen affordable rails hosting but it's few and far between.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme