While dorking around, I found you can disable/enable mongrel instances in apache via curl. I added these two functions to my mongrel init file:
enable_mongrel () { curl -s -o /dev/null http://127.0.0.1:8888/balancer-manager\?b=mongrel_cluster\&w=http://127.0.0.1:$1\&dw\=ENABLE } disable_mongrel () { curl -s -o /dev/null http://127.0.0.1:8888/balancer-manager\?b=mongrel_cluster\&w=http://127.0.0.1:$1\&dw\=DISABLE } in the case statement: enable) enable_mongrel $2 RETVAL=$? ;; disable) disable_mongrel $2 RETVAL=$? ;; They accept the port number as an option. I use this as part of my monit system to keep things in check. I have a very high traffic site and I found proxy_balancer didn't react quick enough. usage: service monit disable 8081 service monit enable 8081 On Feb 22, 1:51 pm, Peter Cooper <[EMAIL PROTECTED]> wrote: > On Feb 19, 10:05 am, digitalronin <[EMAIL PROTECTED]> wrote: > > > > Is there a way to dynamically add/remove mongrel instances from Apache > > > mod_proxy_balancer. It seems that I'd have to manually change the > > > configuration file and restart apache whenever I add/remove a new > > > mongrel. > > > [snip] > > > Yet another option would be to use switchpipe (http://switchpipe.org/ > > ) to manage things. > > Yep, that's exactly what SwitchPipe does. Dynamically launches, > manages, and kills backend processes that speak HTTP. Even better than > that, it'll kill Mongrels that aren't in use for a certain period of > time.. so rather than having, say, 3 Mongrels running ALL the time on > a quiet app, it'll scale it back to zero Mongrels after X seconds of > inactivity if you like. Alternatively you can make it keep 1 Mongrel > up to pick up requests before scaling up to meet demand. Whatever you > want to do, it does it. > > Cheers, > Peter Cooperhttp://www.petercooper.co.uk/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Deploying Rails" group. To post to this group, send email to rubyonrails-deployment@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment?hl=en -~----------~----~----~----~------~----~------~--~---