[Dovecot] multiple sql servers - loadbalancing and failover
Hi,
Is there a way for dovecot to use a pool of sql (mysql) servers and load balance queries between these?
Also fallback to next available sql server if connection to previous one fails.
Can dovecot do such things currently? (If not this is feature request).
-- Arkadiusz Miśkiewicz PLD/Linux Team arekm / maven.pl http://ftp.pld-linux.org/
You can try mysql-proxy:
http://dev.mysql.com/downloads/mysql-proxy/index.html
On Fri, 27 Mar 2009 11:20:37 +0100 Arkadiusz Miskiewicz <arekm@maven.pl> wrote:
Hi,
Is there a way for dovecot to use a pool of sql (mysql) servers and load balance queries between these?
Also fallback to next available sql server if connection to previous one fails.
Can dovecot do such things currently? (If not this is feature request).
-- Arkadiusz Mi?kiewicz PLD/Linux Team arekm / maven.pl http://ftp.pld-linux.org/
__________ Information from ESET NOD32 Antivirus, version of virus signature database 3968 (20090327) __________
The message was checked by ESET NOD32 Antivirus.
-- Xueron Nee http://www.xueron.com
On Friday 27 of March 2009, Xueron Nee wrote:
You can try mysql-proxy:
This introduces single point of failure.
Support for switching to next mysql server in list if previous fails would be enough.
Arkadiusz Miśkiewicz PLD/Linux Team arekm / maven.pl http://ftp.pld-linux.org/
Arkadiusz Miskiewicz wrote:
On Friday 27 of March 2009, Xueron Nee wrote:
You can try mysql-proxy:
This introduces single point of failure.
http://forge.mysql.com/wiki/MySQL_Proxy#Load_Balancing_.26_Failover
On Friday 27 of March 2009, Seth Mattinen wrote:
Arkadiusz Miskiewicz wrote:
On Friday 27 of March 2009, Xueron Nee wrote:
You can try mysql-proxy:
This introduces single point of failure.
http://forge.mysql.com/wiki/MySQL_Proxy#Load_Balancing_.26_Failover
If I get this right if mysql proxy fails I still get nothing. Hm, I would have to run mysql proxy on every machine that has dovecot installed. Then it would make some sense.
Ok, that should work.
Arkadiusz Miśkiewicz PLD/Linux Team arekm / maven.pl http://ftp.pld-linux.org/
Arkadiusz Miskiewicz wrote:
On Friday 27 of March 2009, Seth Mattinen wrote:
Arkadiusz Miskiewicz wrote:
On Friday 27 of March 2009, Xueron Nee wrote:
You can try mysql-proxy:
http://dev.mysql.com/downloads/mysql-proxy/index.html This introduces single point of failure. http://forge.mysql.com/wiki/MySQL_Proxy#Load_Balancing_.26_Failover
If I get this right if mysql proxy fails I still get nothing. Hm, I would have to run mysql proxy on every machine that has dovecot installed. Then it would make some sense.
Ok, that should work.
I used to do it that way (using sqlrelay) before switching to hardware load balancers. It's not really much a single point of failure since it's running on the same machine; it's no different than Dovecot having do the work itself. Simpler than creating a HA cluster, too.
~Seth
On Fri, 2009-03-27 at 13:26 +0100, Arkadiusz Miskiewicz wrote:
On Friday 27 of March 2009, Xueron Nee wrote:
You can try mysql-proxy:
This introduces single point of failure.
Support for switching to next mysql server in list if previous fails would be enough.
Use UltraMonkey to do your load balancing, and not have a 'middle man' for any services.
Arkadiusz Miskiewicz wrote:
On Friday 27 of March 2009, Xueron Nee wrote:
You can try mysql-proxy:
This introduces single point of failure.
Plus use of heartbeat, HA, etc.
On Friday 27 of March 2009, Seth Mattinen wrote:
Arkadiusz Miskiewicz wrote:
On Friday 27 of March 2009, Xueron Nee wrote:
You can try mysql-proxy:
This introduces single point of failure.
Plus use of heartbeat, HA, etc.
This makes thing much more complicated than it can be especially in setup like mine where servers are not only doing mysql serving but another thasks and the "failure" can be so simple like "service mysql stop".
-- Arkadiusz Miśkiewicz PLD/Linux Team arekm / maven.pl http://ftp.pld-linux.org/
On Mar 27, 2009, at 3:20 AM, Arkadiusz Miskiewicz wrote:
Is there a way for dovecot to use a pool of sql (mysql) servers and
load balance queries between these?Also fallback to next available sql server if connection to previous
one fails.Can dovecot do such things currently? (If not this is feature
request).
Yes, it can! Just add more multiple host= parameters to connect
string. It's actually even documented in the dovecot-sql-example.conf:
# MySQL supports multiple host parameters for load balancing / HA.
I guess it's not mentioned in the wiki though.
On Friday 27 of March 2009, Timo Sirainen wrote:
On Mar 27, 2009, at 3:20 AM, Arkadiusz Miskiewicz wrote:
Is there a way for dovecot to use a pool of sql (mysql) servers and load balance queries between these?
Also fallback to next available sql server if connection to previous one fails.
Can dovecot do such things currently? (If not this is feature request).
Yes, it can! Just add more multiple host= parameters to connect string. It's actually even documented in the dovecot-sql-example.conf:
# MySQL supports multiple host parameters for load balancing / HA.
Cool! Can load balancing be disabled and HA left, too? :-)
I guess it's not mentioned in the wiki though.
It's not.
-- Arkadiusz Miśkiewicz PLD/Linux Team arekm / maven.pl http://ftp.pld-linux.org/
participants (6)
-
Arkadiusz Miskiewicz
-
Noel Butler
-
Rick Romero
-
Seth Mattinen
-
Timo Sirainen
-
Xueron Nee