Envoy running short lived WebSocket load starts returning codes 503 #36237
Labels
area/upstream
question
Questions that are neither investigations, bugs, nor enhancements
stale
stalebot believes this issue/PR has not been touched recently
Envoy running short lived WebSocket load starts returning codes 503
Description:
I have a WebSocket application using Envoy as the routing load balancer tool, and I'm doing some load tests to it to see how it behaves under load and what to expect on load scenarios from it. On high load with a persistent connection, I mean streaming messages through the same opened connection for 3 minutes I'm able to reach the 100% CPU in Envoy and measure the limits of requests I can handle but when I change to open the connection send a message and then after receiving an answer closing the connection, I start receiving errors 503 really fast instead of the expected 101 while trying to open new connections.
Repro steps:
Using the following k6 script:
Running it like this:
Starts returning 503 errors:
Looking at a tcp Dump in Envoy we can see this happening while there are some retransmission errors on closing the websocket connection:
Dump against the client
Dump against the backend
This is how a successful websocket call looks like against the back:
Config:
The config is just using the router filter and enables the websocket upgrade
Logs:
Is there something that I'm missing in my configuration? What can I do to prevent this from happening? Is this the normal expected behavior?
Thanks
The text was updated successfully, but these errors were encountered: