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.
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.