Score:0

AKS Azure Loadbalancer cause zombie websocket connections

cn flag

We are seeing a very strange issue using Azure Loadbancer with AKS.

We have a website that accepts WebSocket connections. this goes from client to AZ Loadbalancer and into the website itself inside AKS.

In our stress test app, we spawn 10k websocket connections. they all connect. If we then non-gracefully stop the connections, then we see an initial drop of connections between the loadbalancer and the website.

But.. it then sticks around with a random number of connections for about 15-20 minutes before all connections disappear.

like so: (The graph is the Loadbalancer inbound flow with the test app events drawn onto it)

enter image description here

If we instead run the load test app against the website itself, bypassing the AZ Loadbalancer, it all works as expected. killing the test app drops all the connections in the website instantly.

The Azure Loadbalancer does not have that many settings, we have tried both with Sticky-sessions: None and Client IP, same behavior

We have also verified that there are no hidden client connections from the test app machine. disabling the network completely, so that is not the issue.

We have no need for re-connecting sockets in that sense. The client can just make a full reconnect if disconnected.

Our impression is that the load balancer tries to be clever somehow, in case a connection might reconnect later. If that is the case, can it somehow be disabled?

Any tips on what we should try is welcome

Vit avatar
cn flag
Vit
tried check this stale connection behaviour in [NPM(Network Performance Monitor)](https://github.com/MicrosoftDocs/azure-docs/blob/e2fa73b682a30048907e2acb5c890495ad397bd3/articles/networking/network-monitoring-overview.md)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.