On Thu, 2010-01-14 at 09:45 -0300, Diego Bello wrote:
> I just subscribed to this list and this is my first question: Is there a way
> to automatically disable a real server?
Many. But the options depend on the reasoning.
> What I need to do is a postgres virtual server, whose realservers' databases
> will be updated once a week. The idea is to disable a real server and
> update, then enable it again. I know I can do it using piranha, but I need
> to do it with a script or something.
"nanny" is a part of the Piranha package. It can manage servers on your
behalf using a number of different tests. Not being that familar with
either nanny or Piranha, I'm not really able to offer any real advice on
how to use it but what I would do is:
1. Make sure nanny is testing the realserver(s) periodically.
2. Use iptables on the realserver to knock out non-established
connections to the service.
3. Wait until all established connections have gone away.
4. Do the update.
5. Remove the iptables rule and allow new connections.
What nanny will do is change the realserver's weight to 0 when you do
(2), so no new connections are sent to it. A more brutal (but quicker)
option is to have nanny remove the realserver from the pool instead.
> Is there any other way?
Many :)
Graeme
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
|