4 ms·
I'm not a Ruby guy, so this might be a stupid question, but: why would you need to run more than a single instance of an app on a given server?
by jfager 16y ago
I'm not a Ruby guy, so this might be a stupid question, but: why would you need to run more than a single instance of an app on a given server?
- grandalf 16y agoThat just refers to running multiple processes instead of multiple threads. Rails wasn't thread safe until recently and many ruby libraries still aren't (including the mysql driver). So it's common practice to run a "pack of mongrels" (a few processes simultaneously) and then load balance between them in case a long request ties one up for a while. Mongrel2 will let you effectively design part of your app to benefit from Rails (for example) and part to use 0mq and do a more evented style of design. All within one configuration / approach.
- sandofsky 16y agoRuby 1.8 uses green threads, so running multiple processes lets you use all your cores. As mentioned in another post, Rails used to not be thread safe. Right now I'm running a Rails site in production with multithreading enabled, but I'm sure many libraries in Ruby are not thread safe.