Hi Kevin,
splitting dbmail into 50 instances makes no sense, this will prevent you
from using single instance storage (saves a great number of diskspace and
i/o).
If you came to the point where you need to split your database
(performance or disk storage) you should consider to upgrade your
hardware. If this is not possible you can always sync your database to a
second server and split your user base later.
thats only my opinion.
Harald
Am .06.2014, 19:37 Uhr, schrieb KT Walrus <ke...@my.walr.us>:
I’d like to split my dbmail db into 50 dbs in the same mysql instance.
I’m going to do this since I think it will be trivial to move the
largest db to another server when/if my current server runs low on disk
space or CPU power. I figure “pre-sharding” the dbmail database is an
okay thing to do if I am hoping my website needs to scale beyond a
single instance of mysql.
Is the best way to implement this is to start 50 instances of the dbmail
daemons (dbmail-lmtpd, dbmail-imapd, dbmail-pop3d) changing my init
scripts to use -f and -p options to point to separate config files that
listen on different ports and connect to different database names?
I would then have 150 dbmail processes running on the server. I would
then use nginx to reverse proxy for each incoming lmtp, imap, and pop3
connections to the proper port (having the nginx mail auth script lookup
the dbmail listening port for the user)? I’ve never proxied smtp using
nginx before, but I figure nginx can handle this task based on the
destination address. Is nginx able to proxy lmtp requests or do I need
to configure postfix to use a script that I write to use the mail
recipient address to determine the dbmail config file to use for
delivery using dbmail-deliver?
Then, when I want to move one of the 50 dbs to another server, I only
have to move the one db to the new server, edit the conf file that
handles that db’s connections with the new dburi, and restart the dbmail
daemons.
Is this the best way to “pre-shard” dbs? Or, do something else? Or,
not a good idea at all...
Kevin
_______________________________________________
DBmail mailing list
DBmail@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
--
Harald Leithner
ITronic
Wiedner Hauptstraße 120/5.1, 1050 Wien, Austria
Tel: +43-1-545 0 604
Fax: +43-1-786 23 88 26
Mobil: +43-699-123 78 4 78
Mail: leith...@itronic.at | itronic.at
_______________________________________________
DBmail mailing list
DBmail@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail