Mailing List Archive

wackamole ip wizardy and running apache_backhand...
Greetings,

I wanted to reach both lists to gather information from each end of the
spectrum. My question deals with having wackamole changing the the virtual
ip on a machine and then having an apache server running with mod_backhand
using this _new_ vip on the fly.

Does anyone have any experience or suggestions on how you would allow Apache
to start handling requests by _listening_ to this new IP address on an
interface?

My simple thought in going about doing this would be to create a perl daemon
that checks for a new interface ip alias, every second, then when it sees a
new aliased ip it would launch a new Apache server process with a particular
set of directives in the config file that makes it listen to that ip address
and serve requests. Basically, the same apache server configuration as
would've been running on the _failed_ machine that wackamole determined to
not be active.

I wanted to see if anyone else had any homegrown solution they've built or
could recommend another path of accomplishing what I'm explaining in the
fundamentals.

Cheers,

-.mag
wackamole ip wizardy and running apache_backhand... [ In reply to ]
Unless you are using explicit virtualhost and/or Listen directives,
Apache will always listen to IN_ADDR_ANY, meaning it will bind to the
port, not a VIP:port. So, start apache and when the VIP comes up,
Apache will start accept()ing traffic that arrives there.

If you use VirtualHosts, you may need to bind to all the IPs explicitly
in separate virtualhost directives. But, Apache doesn't bind() based on
virtualhosts, it does that based on Listen directives. So make your
Listen statement "port only" and then add all teh VirtualHosts you ever
planon having... As they come up, they will be available.

VirtualHost directives are processed post-accept(). Based on the
server-side IP address, it chooses which vhost to serve up.

Mark A. Garcia wrote:

>I wanted to reach both lists to gather information from each end of the
>spectrum. My question deals with having wackamole changing the the virtual
>ip on a machine and then having an apache server running with mod_backhand
>using this _new_ vip on the fly.
>
>

--
Theo Schlossnagle
Principal Consultant
OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
Phone: +1 301 776 6376 Fax: +1 410 880 4879
1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7