customerio / go-customerio

Official Golang client for the Customer.io API
https://customer.io/docs/api/
MIT License
26 stars 23 forks source link

Reuse the same HTTP client and connections #15

Closed zaf closed 5 years ago

zaf commented 5 years ago

Go has a connection pool of just 2 connections per host in the default HTTP client. Since in our use case we always send requests to the same host, its better to increase the size of this pool. Also use a single HTTP client for all requests.

The effect of the above changes is that we can push lots of concurrent requests using a very small number of TCP connections.

magnuswahlstrand commented 5 years ago

Any updates on this?

ghost commented 5 years ago

Will merge this PR as this is tested locally and everything looks ok.