0

I have created an AWS EKS cluster to which I deployed HAPRoxy Ingress Controller backed by a Network Load Balancer (NLB) which is deployed in 3 AZs of the cluster region.

To ensure high availability across multiple Availability Zones in the cluster region, I want to deploy at least one HAProxy pod per AZ.

Another requirement for my application has brought me to use stick tables with the HAPRoxy. However, the stick tables data is not shared among all HAPRoxy pods. The only solution to make the stick table data propagate among all HAProxy pods is by manually adding the IPs and ports of the HAProxy servers to the peers list which is then added to the stick table configurations. But since our environment is highly dynamic and the IPs are not static we won't be able to achieve that. Consequently, without the stick table data propagation, what we believe is happening, is that the client connects to an NLB instance, which then connects to one of the HAPRoxy pods. An entry is then added to the HAPRoxy stick table, on that specific pod. Later on, when the user continues working on the app, the connection from the NLB might go to a different HAPRoxy pod which doesn't contain the session details that were entered to the first stick table. Hence the application will error out that the session doesn't exist on that server.

Thus, the only possible solution that we can think about, is to persist a connection from the client -> NLB -> One HAProxy pod so that the sticky data is constantly hitting the same stick table.

We've looked into enabling stickiness on the NLB targets, but that didn't work, we got the same result. https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#sticky-sessions

Or could it be that the user is getting a connection to a different NLB instances (in a different AZ)?

Is there any other way? Or have we misunderstood certain concepts?

YanaT
  • 53
  • 7

2 Answers2

0

you can create and manage security groups associated with Elastic Load Balancing to provide additional networking and security options for Application Load Balancer and Classic Load Balancer. You can configure any of the Load Balancers to be Internet facing or create a load balancer without public IP addresses to serve as an internal (non-internet-facing) load balancer.

0

why not just use ALB to maintain a cookie so it always goes to the same haproxy

  • This isn't an answer, it's more of a question. It would be better suited as a comment to the original question. – SDJMcHattie Jan 28 '22 at 17:34