[Ruby] deploy with no down time?

James Moore banshee at banshee.com
Mon Jan 15 20:18:40 PST 2007


> You have multiple processes right?
> 
> Can you get cap to do rolling restarts?  HUP one process, wait 10ish
> seconds, HUP another process, ...?

Or a different flavor of the same idea - two different mongrel clusters,
with two different Rails trees.  Kill one cluster, update its files, start
it again, tell apache that its servers are the valid ones.  Kill the other
cluster, update its files, etc.

Seems like you're going to want a process that mimics what you're going to
do when you scale up a bit; machine A[BCD...] gets taken out of the load
balancer, updated, checked, then the load balancer is told that the freshly
updated server(s) are the only valid ones, then do the rest.

I'd be nervous about having a single rails tree, only because I don't like
the idea of replacing in-use executables.  Rails tries to be lazy about when
it loads files, so it's remotely possible that you could end up with an
unusable mix of files if something gets replaced at the wrong time.

 - James Moore



More information about the Ruby mailing list