Hi,

The module is finished and works as expected. It actually wasn't that much 
work. I'm hoping that someone is willing to have a quick look and check it for 
(obvious) errors. I put the sources here:

https://github.com/perrit/Mail-SpamAssassin-BayesStore-PgSQL-Slave

Maybe this functionality can be implemented directly in the BayesStore::SQL 
module someday, I think It is very usefull as it makes sure that there's no 
single point of failure while keeping a single consistent copy of the data. 
Anyway, let me know what you think. I'm willing to help port this feature into 
SpamAssassin's sources if people are interested.

Best regards,
Jeroen Koekkoek

> -----Original Message-----
> From: Michael Parker [mailto:[email protected]]
> Sent: Monday, February 27, 2012 6:25 PM
> To: Jeroen Koekkoek
> Cc: '[email protected]'
> Subject: Re: bayes module master-slave
> 
> 
> 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

Reply via email to