Re: haproxy + IMAP

From: Willy Tarreau <w#1wt.eu>
Date: Mon, 31 Mar 2008 22:46:02 +0200


On Mon, Mar 31, 2008 at 01:37:27PM +0100, Guy wrote:
> That's the catch I've got though. Both IMAP servers have access to all
> the mailboxes. So I actually want haproxy to balance the load across
> the two servers randomly. It only really needs to maintain the
> connection for a given IMAP transaction I think. So basically it needs
> to remain on a server long enough for a user to login and sync or
> login and download in the case of pop3. I'm going to have to run both
> IMAP and POP3.
> Is there another algorithm that could do this?

Round-robin is generally very good (for obvious reasons). In 1.3.15, you will also have leastconn, which might be even better for such servers which are sensible to the number of concurrent connections.

> I'm afraid I don't know imap and pop3 well enough to know whether each
> login/sync or login/download is a single tcp session or not. If they
> are, then I imagine a simple roundrobin setup would work fine.

Yes, they are. The whole thing relies on the USER/PASS being sent at the very beginning of the connection.

Regards,
Willy Received on 2008/03/31 22:46

This archive was generated by hypermail 2.2.0 : 2008/03/31 23:01 CEST