In a large scale tornado application we are using shared AsyncHTTPClient for our outgoing requests with a pre-set max_clients.
http_client = tornado.httpclient.AsyncHTTPClient(max_clients=100)
class SomeHandler(tornado.web.RequestHandler):
@tornado.gen.coroutine
def get(self, *args, **kwargs):
response = yield tornado.gen.Task(http_client.fetch, <some_url>, method='GET')
...
What i would like to ask, is there a way to see at any given time, if the max_clients treshold had been reached and what is the count of the requests in the queue, to help us scaling it up if needed?