I use mysql as a backend for a very busy postfix mail/apache web infrastructure. While the apache setup is really in-house, the mail setup is pretty standard. We serve as a mail host for hundreds of domains using a mysql database to house all of the hosted domains and user accounts (mail is stored in maildirs). Having the accounts stored in the DB allows us to split the mail server tasks across many servers (imap, pop, smtp, virus/spam scans, etc.) can be done on different servers as the database is replicated to them and can be read locally (mail can be passed from system to system which all have a consistent DB). It also eliminates the need for system accounts, which is nice. It was a little tricky to get everything setup and working on it's own, but it has been just the tool for the job.

We have been using this setup for several years and it has been very reliable.

The master/slave relationship needs to be monitored, but generally runs well if left to it's own devices.

Failover works well because we have multiple systems and control failover between them from a nagios monitoring server (this was some cool voodoo but it works really well).

We never considered ldap as an alternative so I can't comment on it's performance, but for us, mysql has never been a bottleneck.


paul k�lle said the following:
Hi all,

we are in the process setting up a new server (on gentoo) for the usual
web/mail/db stuff with cyrus/postfix/apache/mysql/subversion/... We'd
like to store all accounts in a backend that can be shared by more than
one host and run in an replicated server/slave setup so that one machine
can takeover the service if the other fails.

I've looked around and it seems there is a general choice of using ldap
or mysql for this. I know LDAP and it's shortcomings quite well (hairy
bdb setup, no transactions) otherwise it should be fine for the job. The
other option is mysql. You can have system accounts through pam and nss
modules, there is a backend for SASL, apache can fetch vhosts from mysql
as well as cyrus and postfix can for mail (if not directly it should
always work with nss/pam). Unfortunately I have no practical experience
with mysql for things like that.  I heard about persistent connections,
caches or connections over sockets but haven't tried anything like that
(yet). So I'm really interested in real world experiences...

Does it work reliably?
Does mysql master/slave work reliably?
How do you handle failover?
How does it performs in comparison to LDAP in terms of bind/fetch/unbind
cycle, is that expensive?
Anything I couldn't ask since I'm sooooooooooooo clueless ;)

thanks
 Paul
--
[email protected] mailing list



Reply via email to