What is the limit of Websocket connections Sanic can handle / accepts to handle?

Hey everyone!

Implementing a websocket, I’m wondering if there is a limit on how many websocket connections does Sanic handle, if there is a property that indicates that limits or how can I found out.

Ultimately, I believe the limit will be on the server, but I was wondering if there was a restriction on Sanic’s side ?

Also, do you happen to know if a websocket connection is heavy on the server ? (In order to work, a loop is needed to wait for incoming and outgoing messages, so they must take some server resources)

Thanks for the input.

Sanic should not be imposing any limits. I think the limitations would all be external to the platform: (file descriptor limits, memory, network bandwidth, etc).

That makes absolute sense. I just wanted to be sure :wink:

Thansk !

1 Like