News for hackers. Stuff that matters.
Re:HAProxy 2.4 by aidos on Sunday May 23, 2021 @03:50AM (#27253155)
I last used HAProxy about a decade ago for fairly simple load balancing and caching - worked really well.

Question about the suitability for a dynamic backend case. I have a system where clients are assigned to backends exclusively for the duration of a session. At the moment I have a pool of backends and each client is explicitly told which backend to use so they can route to it. Ideally I’d make this transparent so it was easier to reassign on the fly. Is this case reasonably supported with HAProxy and which features should I be looking at to get a sense of it?

I’m working under the assumption that I’ll need to build the machinery to maintain the pool and registry of where clients should be routed to.

Re:HAProxy 2.4 by rogerdonut on Sunday May 23, 2021 @12:04PM (#27256027)
While I have not tested this specific use case, I would start by exploring map files [1] and/or stick tables [2]. Map files can be updated on-the-fly through the HAProxy Runtime API. With stick tables you can persist a session/client based on anything found within the request headers, which would include a users session id.

[1] https://www.haproxy.com/blog/introduction-to-haproxy-maps/

[2] https://www.haproxy.com/blog/introduction-to-haproxy-stick-t...

Re:HAProxy 2.4 by aidos on Sunday May 23, 2021 @03:23PM (#27257752)
Excellent, thanks for the info, will check it out.