Hi list,

At my company we are using HAProxy as our main load balancer, and we have situations where we would like to have TCP load balancing plus some sort of stickyness (for example, to use SSL-enabled web servers that need session persistence). The immediate answer would be source IP has, but that would... well... somehow imbalance backend load.

I have tried to google if it has been already discussed in the list, but found nothing, but I find weird that such a topic had not raised in the past.

The RDP-cookie feature got me thinking if that wouldn't be valid as a new balance algorithm (TCP roundrobin upon the first TCP session and some kind of stickyness for further connections), as it results effectively as a balancing method for TCP with backend "session" support.

I'm thinking about something like having a connection table where each new connection gets inserted upon first session, and somehow assigned an internal persistent association with a roundrobin-elected backend.

Upon further connections, the proxy would recognize that there was a "session" in the past and that it would reuse the same backend.

This way we would have the load more balanced (roundrobin) and TCP-level stickyness. That would be good for balancing PHP applications that store sessions in local files (as it's the vast majority of that kind of applications).

I'm not familiar with HAProxy code (yet), and I don't know what would represent implementing it (I'm willing to if Willy and the "HAProxy community" welcome the feature), or if it's a good idea in the first place (after all, RDP-cookie does exactly that, so it seems that it's useful...), but I think that that new algorithm would be a cleaner implementation for the RDP-cookie behaviour.

What do you think?

Regards,
L. Alberto Giménez

Reply via email to