On Feb 27, 2012, at 9:53 AM, Jeroen Koekkoek wrote: > Hi, > > I'm testing my module now, and I wanted to build in some kind of timeout for > reconnecting to the master database. But as far as I can tell SpamAssassin > creates a new connection per incoming message, that would mean that creating > the timeout functionality is useless. Is this conclusion correct? Does > SpamAssassin create a new connection per incoming message?
Yes, but there is a plugin you can use for persistent connection (it hasn't been updated in awhile but I believe that it still works), check the wiki page. Michael > > Best regards, > Jeroen > >> -----Original Message----- >> From: Jeroen Koekkoek [mailto:[email protected]] >> Sent: Tuesday, February 14, 2012 8:38 AM >> To: '[email protected]' >> Subject: bayes module master-slave >> >> Hi, >> >> I have a question regarding a BayesStore module I'm writing. First let >> me explain what I'm trying to accomplish. >> >> I want to build a setup of three servers, one master database, and two >> spam gateways. I want the bayes database to be replicated so that the >> bayes check produces the same result on both servers (more might be >> added in the future). To do this I want to use a master sql database >> that replicates to both mail servers. The BayesStore module should do >> all writes on the master, and all reads on the slave. Although this >> doesn't necessarily improve overall performance, it does allow the >> master to go down without the slaves being interrupted. >> >> My questions: >> 1. Is this even a good idea? >> 2. Splitting on read/write actions might not be a good idea. It might be >> better to read only tokens locally, and token expiration delta etc from >> the master so that we're always working with the most up to date >> information? >> 3. Other pointers? >> >> Best regards, >> Jeroen Koekkoek
