I am trying to have a persistent connection to a third party using app engine. Specifically I am hooking into a real time bidding environment where I need to respond in under 100ms, and thus a persistent connection greatly accelerates the process.
In order to do this I am attempting to use urllib3 (if there is a better way please tell me) When my request handler's post method gets called, I want to write back out to the calling url keeping the connection open. I understand how to open a request with urllib3, but how do I persist the connection that was created when the post method on the handler was called.
At the moment I am trying:
http = urllib3.PoolManager()
r = http.request('POST', self.request.url, fields={"foo":"bar"})
But I fear I am opening an entirely new connection doing this.
Thanks, Sam