Clustering server in freebsd
kraduk at gmail.com
Tue Oct 11 09:10:50 UTC 2011
On 11 October 2011 08:51, Damien Fleuriot <ml at my.gd> wrote:
> On 10/10/11 9:31 PM, elman wrote:
> > Dear all
> > I have plan to cluster server with freebsd 8.2 for mailserver. But I'm
> confusing with the software for clustering. Do you have a reference for me,
> or do you have blog and I can see your blog for reference to create
> clustering with freebsd.
> > Thanks hacker
> > Best regards.
> > Mr. L
> > Powered by Telkomsel BlackBerryŽ
> Your question is very vague.
> - what goal do you want to achieve ?
> - do you want a redundant mail system in case one of your servers goes
> down ?
> - do you want a load balanced system to distribute the load (incurring a
> degraded service if a server goes down) ?
> - what do you mean by "mailserver", is that for outbound and inbound
> email (SMTP), for users to grab their email (POP,IMAP), or both ?
> Basically you're giving us a *means* (clustered servers) to an *end*
> that we do not know/understand.
> You've thus had 2 responses so far which might or might not have been
> helpful because nobody knows what you're trying to do ;)
> If you want meaningful answers, you'll have to be much more specific.
> freebsd-hackers at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
I have built a few resilient mail platform over the past few years, in
highly available, high volume isp environments. In my experience its a bit
more complicated than having a cluster. What you need is a resilient
environment. How much resilience you build in is really down to the business
requirements verses the cost. Some parts of the mail system would make sense
to be clustered, whilst others do not.
SMTP inbound doesnt need clustering resilience takes care of itself by
specifying multiple mx records of the same priority, although a load
balancer does have merit here, but isnt required. Same goes with any spam
filtering you do on the mail. Most mta allow you to specify multiple av/spam
scanners, and round robin their use. Alternatively you can just run them on
localally (not ideal for scalabillity).
SMTP inbound (for pc email clients) you can do dns load balancing but a
proper load balancer is better here.
Pop3, imap, load balanced. You would probably want to make the connections
sticky on relation to the source ip though. You would then get the benefits
of caching etc, by all of the connections from the same user hitting the
same head end. What out from large numbers of users comming from a nated ip
though if you do this.
Webmail head ends - load balanced. Definately need sticky connections here
as session ids get screwed up to easily otherwise.
Webamail back end - Clustered. Most webmail solutions out there require a db
backend (sqwebmail doesnt from what i remember). This has a lot of writes,
therefore needs to be clustered.
Backend authenticaion (webmail/pop3/imap) - depends. If its ldap you can
probably just get away with a master server and multiple slave ldap servers
replicating off this. If its a db (mysql) you could do a similar setup with
reading from some slave servers, or as you most probably have a cluster for
the webmail backend you could use that.
Shared storage: Definitely need to be clustered. Could be a resilient netapp
type thing, sun cluster, red hat cluster, or possibly some kind of hast
solution. Personally I would use a solution based on wafle or zfs. Which you
go for really depends on your budget.
Database clusters: 3 main options here really.
1. Mysql cluster - could run on freebsd (offical mysql cluster commercial)
you can do a diy cluster though there are a few guides out there.
2. redhat cluster - supports most dbs
3. sun cluster -
there are other cluster software available (veritas) but they get very
costly and are probably overkill. WHich ever db solution you go for i'd
recommend you use one that is underpinned with zfs, as it makes backing up
dbs very quick and easy, as well as the data integrity advantages it
Load balancers - there are many commercial options here, although you might
want to look at relayd is you want opensource. Its probably best to run it
on openbsd though as you will get the full range of features then.
As you can see its quite a complicated affair to what seems a simple
question. But it basically boils down to at present there is no proper
clustering solution for freebsd, however there are plenty of roles that
freebsd does an outstanding and cost efficient job in a resilient
More information about the freebsd-hackers