senojsitruc
CDCloudflare Developers
•Created by senojsitruc on 12/20/2023 in #general-help
Load Balancing with HTTP Header for Session Affinity
Previously I used HAProxy for load balancing, which will hash a specified HTTP header, and route all connections with the same value for that header to the same backend. My use case here is to have all connections associated with the same account, routed to the same API server.
When I switched to Cloudflare's Load Balancer, I expected similar behavior from the "By HTTP header" option when configuring Session Affinity. In testing, it seems that it is not exclusively using that header to determine which backend node to route to. If I disconnect, change IPs and reconnect, I've got a decent chance of ending up on a different API server.
Is this the expected behavior? Is there a way to configure the behavior to better match what HAProxy does?
Thanks!
1 replies