Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent HTTP connections / connection reuse #292

Open
WiredWonder opened this issue Nov 7, 2020 · 1 comment
Open

Persistent HTTP connections / connection reuse #292

WiredWonder opened this issue Nov 7, 2020 · 1 comment

Comments

@WiredWonder
Copy link

WiredWonder commented Nov 7, 2020

Hi there,

I am running a large sync workload and wondering why the SDK is opening/closing hundreds of HTTP requests.

Is it possible to make the SDK use persistent connections, like http://technosophos.com/2012/06/18/connection-sharing-curl-php-how-re-use-http-connections-knock-70-rest-network-time.html ?

Cheers,
Jason

@WiredWonder
Copy link
Author

I managed to get this working by modifying HTTP.php to make the curl handler $ch global so it can be reused. Performance more than doubled when making repetitive API calls.

Now only one SSL connection is negotiated per running instance of the connector and it is reused for the life of all API calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant