Re: haproxy + IMAP

From: Willy Tarreau <>
Date: Mon, 31 Mar 2008 07:24:17 +0200

Hi Guy,

On Mon, Mar 31, 2008 at 03:06:31AM +0100, Guy wrote:
> Thanks for the explanation of it Guillaume.
> Will a specific user go to the same backend server *every* time he connects
> or is he just kept on the same server until he disconnects or the session
> times out? Just want to be sure of that.

Keep in mind that haproxy is a proxy, so the TCP session will never be split between two servers. It may be broken on timeout or when a server dies, but as long as the session remains established, it will be maintained to the same server.

Now if your client connects to the server, checks for new mails then disconnects, the "source" algorithm will ensure that the same source IP will always be sent to the same server as long as the number of servers does not change. You must never forget that there will be no other persistence mechanism on IMAP, we're working at the TCP level, and there is no cookie nor anything we normally use with HTTP.

However, as long as you only have two servers, this is not a problem because in case of a server failure, you always want all the users to go to the remaining one.

Willy Received on 2008/03/31 07:24

This archive was generated by hypermail 2.2.0 : 2008/03/31 07:30 CEST