Skip to content

HTTP connection pooling #133

@mattheworiordan

Description

@mattheworiordan

A customer has reported that when doing this they get expected reuse of the HTTP connection pooling:

client = AblyRest('api:key')
channel = client.channels.get('channel_name')
channel.publish('foo', 'bar')
# Slower request expected as new TCP TLS connection needed 
channel.publish('foo', 'bar')
# Faster as previous connection reused automatically

However, when they do this, they don't get HTTP connection reuse:

client = AblyRest('api:key')
channel = client.channels.get('channel_name')
channel.publish('foo', 'bar')
# Slower request expected as new TCP TLS connection needed 
client2 = AblyRest('api:key')
channel2 = client2.channels.get('channel_name')
channel2.publish('foo', 'bar')
# Equally slow request as first

In other libraries, the underlying HTTP library automatically handles connection reuse so long as the requests are in the same process, whereas with Python it seems this is not the case and the pooling is only done with the instance REST client.

This is not the intended behaviour.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working. It's clear that this does need to be fixed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions