[NTLUG:Discuss] "Web site temporarily offline"
Chris Cox
cjcox at acm.org
Sun Apr 19 13:50:40 CDT 2009
Daniel Hauck wrote:
> I have my main web stuff on a VM and occasionally, I like to run backups
> of the VM but it takes at least 20 minutes. During that down time, I
> would like to have another machine detect when the server is down and
> assume the server's IP address so that it can say "Web site down for
> maintenance. Be back soon!"
>
> I imagine running a small VM that would run whatever processes needed.
>
> Anyone know any magic tricks to accomplish this?
One way is via cluster failover techniques with a virtual ip.
You can use heartbeat (usually a set of packages around that for many
distros). When a service on one machine fails, a different box
will answer for that service.
The virtual IP belongs to the host that is working...
So when the main host comes back, you fail the other so the
one you want can take back over the virtual ip.
192.168.1.0/24 (network)
77 (virtual IP)
/\
/ \
11 (vm) 12 (failover)
Everyones uses 192.168.1.77... which starts off being
used by 192.168.1.11... when the service fails there is
switches over to 192.168.1.12... then when .11 comes back,
you'll want to fail .12.
Install heartbeat and read the docs... might have to do
some extra work to make things truly automated.
More information about the Discuss
mailing list