开发者

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开发者_如何学Python 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.)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜