I
I
Ivan Goncharov2012-04-09 01:52:57
Nginx
Ivan Goncharov, 2012-04-09 01:52:57

250 Ruby on Rails apps on one server?

Faced such task. You need to somehow host 250 rails applications and preferably on one server. Moreover, on each one, a Delayed Job or Rescue may appear later, which is completely confusing. The load on each will be small. But reliability is very important - if one of them falls, it will be very bad.
It is very expensive to run your own unicorn for each application. Even 32 GB of RAM may not be enough.
Phusion Passenger, they say, is not very reliable (or is it not true?). Has anyone encountered such a problem? Is it possible to do all this on one server?
If you have come across, can you still advise how it is easier to administer them later (update from git-rep, check the status - is it working or not)? Or just write your scripts here?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
@
@mgyk, 2012-04-09
@SilentBrain

Tweak it in the passenger so that there is a maximum of one instance per application, and a pool of 100 instances. If the application will use a more or less similar set of gems, then the consumption of operatives in the passenger will not be so big for each of them. That is, the memory occupied by rails should be rummaged between instances.
Deploying all this is best capistrano.
It seems to me that you are trying to make 1 client = one customized version of the application. In this case, it is better to ask yourself the question, how will you support all applications?

G
Georgy Khromchenko, 2012-04-09
@Mox

I didn’t encounter passenger unreliability, but I did encounter memory savings when using Passenger + Ruby EE.
An important point is that it allows you to use only 1 version of Ruby without additional proxying, so this may not work.

A
akzhan, 2012-04-09
@akzhan

Use thin, it is often enough, and to protect against most force majeure, launch its instances through runit and monitor http through monit/god/bluepill.
But based on your initial data, everything can be processed by one application under unicorn.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question