Max server connections
Do tornado HTTPServers support the notion of max connections? In my use case, I would like the server to stop taking connections once we hit some limit (say 100 users). Then resume once connections drop out.
Barring this, is there a recommended way to know how many connections currently exist? I can add a counter to the RequestHandlers but am wondering if there's a canonical method.
Thank you!
Maybe tornado.httpserver.HTTPServer.bind(backlog=100) helps?
No, there is not currently any support for either limiting or observing the number of connections. (This is one of the main reasons why I recommend using a load balancer/proxy in production instead of exposing Tornado directly to the internet)
The backlog option doesn't help here - that limit only applies to connections that are in a certain early phase of the TCP handshake.