Does Amazon S3 have a connection pool?

前端 未结 1 493
春和景丽
春和景丽 2020-12-09 10:07

I ever used the code

public static AmazonS3Client s3 = null;
...
BasicAWSCredentials c = new BasicAWSCredentials(\"absadgwslkjlsdjgflwa\");
s3 =  new Amazon         


        
相关标签:
1条回答
  • 2020-12-09 10:42

    Each client in the AWS SDK for Java (including the Amazon S3 client) currently maintains it's own HTTP connection pool. You can tune the maximum size of the HTTP connection pool through the ClientConfiguration class that can be passed into client object constructors.

    We recommend sharing client objects, because of the expense and overhead of having too many HTTP connection pools that aren't being utilized effectively. You should see better performance when you share client objects across threads like this.

    0 讨论(0)
提交回复
热议问题