Writing hooks for Perlbal
Raistlin Majere
raistlin at e-raist.com
Fri Oct 6 04:45:04 UTC 2006
I've installed and configured perlbal and have run into some
difficulties. I've setup perlbal to be a reverse proxy so that it
correctly proxies virtualhosts to the appropriate servers. (i.e.
vhost1.example.com, vhost2.example.com correctly reverse proxies for
vhost1.com and vhost2.com respectively) This is working perfectly,
and wasn't too difficult to configure.
However now I want to write some code that will:
First verify that the backend server is alive
Second that the backend server can answer requests on the port I'm
trying to talk to
And if it's NOT alive and able to respond to requests that I can
redirect requests to a different server, or execute some code to
bring the downed server up, before retrying.
I've tried to use the Perlbal::ClientProxy "start_proxy_request"
hook, however that seems to affect each and every request (i.e. each
html page, graphic, etc.)
I need to be able to check to see if the backend server is alive, and
if it's not, tell Perlbal: "Whoa hold your horeses" long enough for
me to bring a server up (I can do this with some scripts I have), and
then redirect the request to the new server.
Any help or advice would be greatly appreciated.
More information about the perlbal
mailing list