Re: [exim] How to be resilient to mysql server unreachable?

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Todd Lyons
Data:  
Para: Juan Bernhard
CC: exim-users
Asunto: Re: [exim] How to be resilient to mysql server unreachable?
On Tue, Dec 16, 2014 at 8:31 AM, Juan Bernhard <juan@???> wrote:
>
> Hi list, im planning to implement a vacation message using a mysql
> server, and i would like that when the mysql server were down, the exim
> continues delivering messages and ignoring the vacation (failing the
> lookup). The mysql server only has the vacation info, the rest are done
> by local files and unix users.


You're asking exim to control your fault tolerance, when I think it's
better done with other, more specific software. My suggestion is to
create one more virtual machine:
1) Create a secondary db server, it can be less powerful than your
current db server.
2) Make the current db server the primary, and configure the secondary
to replicate from it.
3) Either on your Exim server or on that slave db server, also
configure and run a mysql proxy, such as MaxScale
(https://mariadb.com/products/mariadb-maxscale) running on port 3307.
4) Configure your exim to use that MaxScale proxy. In normal
conditions, you'd have the MaxScale load balancing between the primary
and secondary db servers. When/If your primary goes down, the
MaxScale will detect it and send all traffic to the secondary. Once
the primary comes back up, MaxScale will once again load balance
between them.

Use the right tool for the job. A proxy program is written to do
exactly the things you are trying to get Exim to do. It's better to
use that proxy instead of trying to Exim to do it.

...Todd
--
The total budget at all receivers for solving senders' problems is $0.
If you want them to accept your mail and manage it the way you want,
send it the way the spec says to. --John Levine