Distributed setup with realtime failover/balancing

Glenn Steen glenn.steen at gmail.com
Thu Jan 11 11:20:53 CET 2007


On 11/01/07, Alex Broens <ms-list at alexb.ch> wrote:
> On 1/11/2007 10:10 AM, jonas at vrt.dk wrote:
> > Hi all
> >
> >
> >
> > I am currently running a MAilscanner/mailwatch system on a single server
> > which works perfect.
> >
> >
> >
> > I however have the need to make my setup distributed, for me meaning the
> > following.
> >
> >
> >
> > I need a 2 node distributed system. Where I have 2 smtp servers(exim), 2
> > mailscanners, 2 mailwatch interfaces and 1 distributed mysql database.
> >
> >
> >
> > I plan on using ultramonkey (http://www.ultramonkey.org
> > <http://www.ultramonkey.org/>  ) to setup load balancing and failover. It
> > uses LVS and heartbeat to do that.
> >
> >
> >
> > I have the mysql problem pretty well figured out. I'm gonna run a so called
> > master-master replication between the 2 servers. Meaning any change in the
> > tables will be instantly replicated to the other server, so should one go
> > down the chance of data loss is very slim.
> >
> >
> >
> > Regarding the quarantine I also need some more or less complex solution,
> > since I don't want to use local quarantine directories for each server. The
> > reason is that I do NOT want a local quarantine directory on each server. I
> > do not want that because then I do not have access to release mails
> > quarantined by the server that is down (Even if if setup some rsync script
> > it isn't real-time so data loss is very likely) There for I plan on using a
> > system like drbd (http://www.drbd.org/ ) or another similar distributed file
> > system. That means you get a so called "network raid mirror" where all disk
> > io is replicated across a network so if 1 server fails all data is still
> > accessible on the other machine. This would enable me to never loose the
> > ability to release quarantined mails.
> >
> >
> >
> > What I am looking for is comments from fellow mailscanner/ mailwatch users
> > regarding this solution. Is it a dumb way to do it? Are there better ways to
> > archive the whole thing, or part of it?
> >
> >
> >
> > I hope somebody has some input.
> >
>
> Whatever, in a master/master mysql setup do not replicate mysql based
> bayes.  Conflicts show up real fast and it will stop all your replication.
>
> Alex
>
Yes, I think Alex is on to the Right Way of it here... You will have
to think long and hard on how to keep things (configs, quarantine etc)
_separate_ in a distributed manner, and what not, for this to be
really usable.

Re: the quarantine, putting all eggs in one basket you run the risk of
id duplication between the systems, with unfortunate effects as a
given result, as well as contending (just a bit) with xml-rpc (since
the database record will reflect what machine FQDN handled the
message, that name/IP has to be there in the failed-over state).

Other than that... you should be fine:-). Seems like a lot of work though:-D
-- 
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se


More information about the MailScanner mailing list