Search code examples
aws-sdk-go

Configuring the aws-sdk-go http client connection pool?


I'm having trouble locating information on the http client connection pool- specifically for S3.

I've grep'd the code but no joy. Pointers would be appreciated.


Solution

  • As I suspected from looking at the code the Go SDK does not support client connection pooling similar to the Java SDK. From AWS Support:

    I've heard back from our SDK team. They advise that concurrency management of the type that you're looking for is not provided out-of-the-box in our SDKs. You'll need to design and implement your own solution. For the Go SDK specifically, that means a semaphore pattern. Some links that may be helpful on that subject:

    https://medium.com/@deckarep/gos-extended-concurrency-semaphores-part-1-5eeabfa351ce https://aws.amazon.com/blogs/developer/context-pattern-added-to-the-aws-sdk-for-go/

    The techniques described there should allow you to control the number of concurrent connections. I hope that helps. Please let us know if you have any additional questions.