3 ms·
I don't understand the benefit of dynamically allocating instances. Why should you be running fewer instance than your server can support?
by sandofsky 16y ago
I don't understand the benefit of dynamically allocating instances. Why should you be running fewer instance than your server can support?
- davidw 16y agoBecause you have multiple applications.
- sandofsky 16y agoHow do you guard against the situation in which both applications require the maximum number of workers?
- davidw 16y agoYou can't, obviously, any more than you can do much more than monitoring and jumping in with a new server instance if your site suddenly gets 1000 times the traffic it normally does.
- sandofsky 16y agoIt doesn't takes 1000 times the traffic to max out your workers. Imagine if your database (or some other dependency) had abnormally long response times for a minute. I would think that by spinning up more workers than you can support, you slow down all responses. This increases the rate of backup, which increases the need for those extra workers, which slow things down, etc. By keeping workers below the ceiling at all times, requests back up, but you don't degrade performance. I think this makes things much easier to recover. Correct me if I'm wrong about your scenario, since I've never deployed it on a high traffic site.
- davidw 16y agoOh, well you certainly keep the total number of workers below a maximum. All I'm saying is that I have N sites that get different amounts of traffic. If more people are hitting one, I want it to get allocated more passenger instances to handle the traffic. With mongrel, I'd have to, a priori, decide how many mongrels each site gets and hope for the best. With passenger, it dynamically allocates them to handle traffic on an ongoing basis.