简体   繁体   中英

What is the best server stack/configuration for Rails SaaS app

您会建议什么是需要托管Rails SaaS应用程序的专用服务器的最佳服务器堆栈(不是很多流量但需要保持选项未来开放)。

Regardless of your application, you're probably going to want certain standard components:

  • nginx/passenger will work for small apps or large apps. You should use it.
  • Unless you have a specific reason to use something else, you should use MySQL since the vast majority of the Rails community uses it and you will be able to get better support.
  • You should have memcached running right away, even if you don't use it for much yet. You're going to want to be able to seamlessly add caching as it's needed.
  • You're going to want to have a process for setting up a new server that is fully automated. That way, if you need to spin up a second server, it's trivial. If you ssh into a box to configure it, this means that if you need another server in a pinch (or the first server gets corrupted), you're going to need to remember all the things you did. Not a good place to be in an emergency.
  • You should be on the very latest version of Ruby on Rails, and upgrade frequently. Keep an eye on deprecations and changes and make the suggested changes as early as possible. When Rails 3 is released, use it.

Engine Yard, where I work, uses an open source tool called chef to manage our automated deployment solution . That's probably a good option.

As ever with a question that broad, it depends. Some things to think about:

  • What does the application do?
  • Does the application use any database vendor-specific SQL?
  • What are the availability requirements?
  • What are the performance requirements?
  • How much data will there be?
  • Which server stacks do you or the person who will be administering it have experience of?
  • What is your budget?

One thing I can say with complete certainty is that you don't want to be using Windows because Rails work best on a Linux/UNIX stack.

A lot of it depends on your needs. If the model isn't very complex and/or your traffic is fairly low, you can probably get away with apache, mongrel, and sqlite on some *nix.

If you start seeing performance issues, you can add some memcached into the mix, upgrade (relatively painlessly) to mysql, and use a different server (passenger/nginx).

There are also alternate ruby implementations that have some performance boosting changes. Rubninous and jRuby come to mind.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM