Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on Rails: how to design a SaaS infrastructure?

I'm building a Rails 3 application that I plan on provided as a subscription-based SaaS (Software as a Service) product. Basically, I want users to be able to hit my "Sign up" page, create a new account, and immediately start using the software.

A good example of what I'm trying to accomplish is: http://www.getharvest.com/

Here's what I need to happen when someone signs up:

  1. A MySQL database for them is generated on the db server
  2. A sub-domain is created (e.g., companyx.awesomeapp.com)
  3. The Rails app should know the appropriate database to connect to based on the sub-domain

Are there any good guides out there for setting this stuff up? Even better, are there services that you can purchase to automate this type of thing? Ideally, I'd like to just worry about writing my Rails app and then be able to plop it atop some awesome Rails SaaS infrastructure.

(Also, I need a way to bill them monthly, but I think that's a separate question/problem.)

like image 588
Finch Avatar asked Aug 05 '11 19:08

Finch


People also ask

Is Ruby on Rails good for SaaS?

The question is which framework is best for SaaS and highly recommended by experts. The answer is Ruby on Rails is one of the best and highly recommended.

Why do startups use Ruby on Rails?

It's Open Source. One of the key components that make Ruby and Rails so great and easy to use is the fact that it's Open Source. And a benefit of building a startup in an Open Source language is the community. Closed Source language makes you dependent on the company or organization making those decisions.

Why do companies use Ruby on Rails?

Developers use the web framework to create a web application very quickly. And it isn't just fast; Ruby on Rails simplifies the development process and enables companies using it to scale their project and integrate new features effortlessly.


1 Answers

Heroku would let you get up and running quickly. You can manage the infrastructure using the heroku gem. Here is the documentation to the client which should allow you to manage heroku applications remotely. Using heroku would allow you to scale applications on an individual level and let you focus on the code of the application instead of the hardware.

like image 66
Devin M Avatar answered Oct 13 '22 20:10

Devin M