I''m happy to announce that ChaCha.com a new search engine that debuted this week and it runs on a mongrel cluster. Warning, promo follows. :) ChaCha.com is unlike any other search engine since it allows you to connect to a "guide" with experience in the field(s) of knowledge you are searching in. (Based on your keywords) Check it out at http://www.chacha.com Now on to my question. How can I run two clusters side by side so that when the site needs to be updated the new code can be deployed, then first one cluster is restarted and then the other, thus preventing any downtime from occuring? BTW: We are using mod_proxy_balancer to load balance between the mongrel servers. I imagine I would have to disable the proxy pass through at the same time, which would mean restarting apache several times. What is the best way to do this on one server? Thanks in advance. -- Jared Brown -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060907/a8b01e27/attachment-0001.html
On Thu, 2006-09-07 at 02:38 -0400, Jared Brown wrote:> I''m happy to announce that ChaCha.com a new search engine that debuted > this week and it runs on a mongrel cluster. > > Warning, promo follows. :) > ChaCha.com is unlike any other search engine since it allows you to > connect to a "guide" with experience in the field(s) of knowledge you > are searching in. (Based on your keywords) Check it out at > http://www.chacha.com >Very cool.> Now on to my question. How can I run two clusters side by side so that > when the site needs to be updated the new code can be deployed, then > first one cluster is restarted and then the other, thus preventing any > downtime from occuring? BTW: We are using mod_proxy_balancer to load > balance between the mongrel servers. I imagine I would have to disable > the proxy pass through at the same time, which would mean restarting > apache several times. What is the best way to do this on one server?I believe most people do this with DNS tricks. Off the top of my head, what you do is you put your proxy out on the internet at chacha.com, and then point it at "prod1", "prod2", "prod3" on three other servers. These names come from an internal DNS. You then have three other servers named "staging1", "staging2", "staging3". You do your work against these three, and when the big day comes, you simply flop the records in your internal DNS so that staging becomes prod and v.v. The proxy server, using the internal DNS starts routing requests at the new IP addresses and old requests finish off as expected. There''s also some fancy load balancers that can do the same thing from a control panel. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.
On Don 07.09.2006 02:38, Jared Brown wrote:> >Now on to my question. How can I run two clusters side by side so that >when the site needs to be updated the new code can be deployed, then >first one cluster is restarted and then the other, thus preventing any >downtime from occuring? BTW: We are using mod_proxy_balancer to load >balance between the mongrel servers. I imagine I would have to disable >the proxy pass through at the same time, which would mean restarting >apache several times. What is the best way to do this on one server?I use for this the haproxy with the following Setup: 1.) haproxy makes a cookie-session stickieness. 2.) haproxy check a /alive.data if the backend server is alive (option httpchk) 3.) haproxy have set the ''option persist and redispatch'' flags Now if you want to make a update you only need to use the following steps: 1.) move the /alive.data to /alive.data.offline 2.) wait that all customers have been logout or after a $TIME 3.) make your maintenance 4.) move the /alive.data.offline to /alive.data 5.) and now it works as before with the *new* App ;-) More ideas/solution you can find here: http://haproxy.1wt.eu/download/1.2/doc/architecture.txt E.g.: 4. Soft-stop for application maintenance Hth && regards Alex