WebSocket connections via Application Gateway Ingress Controller reset on Horizontal Pod Scaling events

Nabeel Shami 5 Reputation points
2024-02-18T22:30:18.3566667+00:00

We have an AKS cluster where we have implemented WebSocket services. We need clients to stay connected to our services and have utilized Azure Application Gateway Ingress Controller for load balancing needs. However, we have observed that any (horizontal pod) scaling operation (scale-in and scale-out) results in all current WebSocket connections being dropped off. Our understanding is that any change in the back-end pool results in this behaviour. (There is a GitHub issue referring to the same problem). We expect many active clients (which is expected to increase to many 100k connection), and while the scaling capabilities of Azure Application Gateway fill our needs, this issue which is undocumented, creates a problem when guaranteeing high availability.

  1. Is there any plan to address this issue within Azure Application Gateway?
  2. We have considered using Azure Load Balancer instances instead. Would a change in the backend pool for the Load Balancer not impact current connections? And what is the scaling limit or capacity for Azure Load Balancer when connected to an AKS cluster?
  3. Is there any other architecture that we should be considering?
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,098 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,207 questions
Azure FastTrack
Azure FastTrack
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.FastTrack: This tag is no longer in use. Please use 'Azure Startups' instead.
76 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.