Boggy:
If you have one process, it will be gracefully turned off (serve all requests in the queue, which should be only 1 if you use the correct load balancing). The problem is that you cannot start the new server until the old one dies, so your users will queue in the load balancer. What I found successful is a cascade or a rolling restart of the bastards. Instead of stopping them all and starting them all (therefore, queuing requests until one mongrell is complete, stopped, restarted and will not accept connections), you can stop, then start each mongrel sequentially, blocking a call to restart the next mongrel until the previous one backs up (use a real HTTP check on the state / state controller). As your curses are scolded, only one down and you are serving two code bases - if you cannot do this, you should drop the service page for a minute. You should be able to automate this with capistrano or any other deployment tool.
So, I have 3 tasks: cap: deploy - which traditionally restarts everything at the same time with the help of the hook, which places the service page, and then takes it after checking HTTP. cap: deploy: roll - what does this cascade do through the machine (I pull it out of iClassify to find out how many mongrels there are on this computer) without a maintenance page. cap deploy: migrations - which makes the service + migration page, since it is usually a bad idea to start a migration in real time.
W. Andrew Loe III
source share