Using a load balancer like HAProxy for MySQL connections allows balancing only on servers that are synchronized. Direct use of multiple MySQL hosts in Postfix does not allow for any checks. Given this, the example of MySQL, which could also be the balancing of multiple LMTP connections to IMAP servers, was to illustrate the timeout issues that occur with the use of the balancer under some load conditions. I am looking for information to address the problem since Postfix does not natively support clustered milters.

On 6/12/24 19:40, Wietse Venema wrote:
Christian Zoffoli via Postfix-users:
I'm asking because I was using it with HAProxy, and with the load
balancer between Postfix and the two Rspamd machines, I often have
unexplainable timeouts. In general, I see that Postfix does not like
interacting with load balancers; I've had similar issues with MySQL
connections always balanced with HAProxy

By design Postfix DOES NOT immediately retry connecting to the
same host. In many contexts that would be considered rude.

That of course has consequences when a service "host" is in fact
a load balancer.

If you MUST use a load balancer for the MySQL service, specify the
"host" multiple times in the Postfix MySQL client configuration.

Or stop playing load balancer games and specify the real server
hosts in the Postfix MySQL client configuration. That is how it is
supposed to be used.

        Wietse
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to