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

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Juan Bernhard
Data:  
Para: Todd Lyons
CC: exim-users
Assunto: Re: [exim] How to be resilient to mysql server unreachable?

El 16/12/2014 01:47 p.m., Todd Lyons escribió:
> 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
>

Todd, thanks for the suggestion, but Im using local files for the
important job (mailboxes, users, aliases, etc), so its doesn't matter if
the vacation goes down, for any reason, i would like exim continues
delivering local messages, without the 'out of office' message. I was
trying to figure out if there is a simpler way to fail the string
expansion of the ${lookup mysql{...}} instead of deferring the mail and
stopping the routers traversal.
I know that your way is "the correct way" to have an important service
running, but I was trying to keep it simpler, with out another active
service to worry and maintain... and an easier job ;)

Maybe someone can explain me... what happens when the mysql server does
not response the ${lookup mysql}, will fail eventually? The
documentation isn't clear about this (at least for me!)

Thanks anyway, ill keep in mind the advice of maxscale proxy for another
services using mysql.