Reconnection/Connection Limit/Multiple Connections


I build a simple WebSocket Chat App (Server) in Golang. Now I try to use Python to create a Client for it.
After writing a very simple Client just to check if it will work in Python (Based of Example Code) I now face the issue that sometimes there are sudden disconnects.
To recover from these disconnects i thought about implementing a reconnection mechanism. I wrote one in Go before but iam very new to python and not quite sure how to do it with autobahn using the twisted library.
Is there anyone who has a idea to go about such reconnection mechanism?

There are two other question is wanted to ask while iam here.

What are the known limits of Autobahn/Twisted for traffic/connection bandwidth an such, is the GIL a problem that might slow down the speed of Autobahn ?

If there are limits that could limit the usage of Autobahn/Twisted is it possible to solve the problem by using multiple connections or wouldnt that work ?

Every help is much appreciated.

Thanks Ryan

Hi Ryan,

Twisted comes with a way for clients to re-connect; see their documentation at

Twisted + Autobahn can handle lots of connections at once. The GIL actually makes mostly-single-threaded programs like Twisted ones faster. Sometimes you will need multiple processes to use more cores depending on your traffic and use-case … that wouldn’t be an issue until you’ve got a lot of traffic, though.

Here is a benchmark we have of Twisted Web serving 12Gb/s (using 40 cores):

Sorry for posting the topic twice. I wasn’t sure the first time whether or not the post worked.

The links look like the exact answer I was looking for.

Thank you very much for your response.