[Dovecot] Director mailserver health monitoring script
Timo et al;
The last bit of functionality that the Dovecot director is missing compared to our existing load balancers is mailserver health monitoring. As I understand it, if a mailserver goes down, Dovecot does not take any action to route connections around the offline node, and will keep trying to proxy clients to it. Since we're hoping to cut over to Directors soon, but don't want to lose any functionality, I've hacked up a script that:
- Polls the local director for a list of mailservers
- Performs health checks against a list of ports on each mailserver
- Disables or enables mailservers (by altering the vhost count) as necessary
I've published the script on github in hopes that it might be useful to others: http://github.com/brandond/poolmon/
Maybe someday Dovecot will do something like this internally and I won't need the script any more, but for now I'm pretty happy with it.
-Brad
Timo,
-----Original Message----- From: Timo Sirainen [mailto:tss@iki.fi]
Why HOST-SET 0 + HOST-FLUSH, rather than HOST-REMOVE?
The script gets the mailserver list from the director at the beginning of each poll cycle. If I remove a downed host, I'll never check it again to know when it recovers. Instead, I just disable it (vhost=0) and disassociate any active mappings, and then bump the vhost count back up when it's OK again.
-Brad
participants (2)
-
Brad Davidson
-
Timo Sirainen