|Summary:||Spamc/Spamd Overload Failover|
|Product:||Spamassassin||Reporter:||Marc Perkel <crap>|
|Component:||spamc/spamd||Assignee:||SpamAssassin Developer Mailing List <dev>|
Description Marc Perkel 2007-05-31 07:10:17 UTC
I would like to see a modification in the behavior of spamc/spamd to allow clean failover when a server overloads. Suppose I have two spamd servers and I want to configure them so that Server A gets all the filtering traffic under normal loads and if the load is high it starts failing over to Server B. The idea is if max-children is reached or if the server load levels get too high, or perhaps the precentage of free memory gets too low then I want spamd to close port 783 to allow the server to process what it is currently working on. This will cleanly signal spamc clients that it is down so that spamc should try the next server in the list. (using spamc -d ServerA,ServerB)
Comment 1 Daryl C. W. O'Shea 2007-05-31 08:28:33 UTC
FWIW, when I needed to do this I just used a firewall to block connections after X number of concurrent connections on port 783.
Comment 2 Marc Perkel 2007-05-31 08:34:21 UTC
That's an interesting alternative solution. However doesn't it seem reasonable that if spamd is maxed out that spamc should know it and go on to the next server? spamc doesn't sem smart enough to do that yet. And - I'd also like it to have limits so that it closes the port on high load levels and low free memory. What is your iptables command that limits connections?
Comment 3 Dale Blount 2008-04-03 13:51:24 UTC
I could use this idea, also. Right now I use spamc -d spamdArecord to process messages. A nice feature would be spamc -d spamdArecord -b backup_spamdArecord where it would only overflow if one or more servers in the first list failed.