Hi all,

If someone has information on how to take balanced workers gracefully out of service, please let me know! I've been searching the Apache docs in vain, and Google doesn't provide an answer either. Thanks in advance!


THE PROBLEM

I am using mod_proxy to balance requests to two workers. The sessions are made sticky using a cookie CellColor. This works like a charm, so far no problems.

However, here's the problem. I will occasionally need to take a worker out of service, but I will need to do so gracefully. The procedure should be:
* I inform the balancer that the worker will go down eventually
* As for running sessions, the balancer keeps sending them to this worker * But new sessions all go to other workers, which are not marked as "will go down" * I simply wait for an hour or so, until running sessions to the target worker die out
* Then I can stop the worker and service it.


THE CONFIGURATION

Here is the balancer configuration in a lab environment. There are two sample wokers, at localhost:8010 and 8020 (the last two at 8000 and 8001 are hot-standby). Session stickiness is enforced as follows:
* In the webserver at localhost:8010 a cookie is added:
  Header add Set-Cookie CellColor=balancer.red
* And on 8020 it is:
  Header add Set-Cookie CellColor=balancer.blue

Listen                  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 (working, but don't use it).


Thanks in advance..
Karel


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to