> -----Ursprüngliche Nachricht-----
> Von: Karel Kubat
> Gesendet: Dienstag, 19. Juni 2007 16:57
> An: dev@httpd.apache.org
> Betreff: Mod_proxy / mod_proxy_balancer question: How to take 
> workers gracefully out of service
> 
               8030
> <VirtualHost            *:8030>
>       # All URI's go through red or blue cell, sticky by CellColor
>       # except for the purple manager
>       ProxyPass           /purple-manager !
>       ProxyPass           / balancer://purple/ 
> stickysession=CellColor \
>                             maxattempts=3 timeout=5
> 
>       # Web interface to the manager
>       <Location           /purple-manager>
>           SetHandler      balancer-manager
>           Order           allow,deny
>           Allow           from all
>       </Location>
> 
>       # Tag for passing requests
>       Header              add CellColor purple
> 
>       # The workers
>       <Proxy              balancer://purple>
>           BalancerMember  http://localhost:8010 route=red
>           BalancerMember  http://localhost:8020 route=blue
>           BalancerMember  http://localhost:8000 status=+H
>           BalancerMember  http://localhost:8001 status=+H
>       </Proxy>
> </VirtualHost>
> 
> 
> THE QUESTION
> 
> How do I take the worker at http://localhost:8010 gracefully out of
> service, without interrupting already running sessions? Given the
> above config, I can surf to http://localhost:8030/purple-manager and
> set the "red" worker to "disabled", but if I do that, then all
> requests will immediately go to the "blue" worker, even if there's a
> cookie CellColor=balancer.red in the request. It looks as though
> there are only two states ("enabled" or "disabled") while for what I
> want there should be one more (something like: "working, but don't
> use it").
> 

Try

       <Proxy              balancer://purple>
           BalancerMember  http://localhost:8010 route=red lbset=0
           BalancerMember  http://localhost:8020 route=blue lbset=0
           BalancerMember  http://localhost:8000 status=+H lbset=0
           BalancerMember  http://localhost:8001 status=+H lbset=0
       </Proxy>

and then use the balancer manager to set the lbset
for http://localhost:8010 from 0 to 1. After it all sessions for this
worker died, disable it via the balancer manager.
For reactivation just enable it again and set lbset to 0.

Regards

Rüdiger

Reply via email to