aws-sdk-ios icon indicating copy to clipboard operation
aws-sdk-ios copied to clipboard

Set NSURLSessionConfiguration httpMaximumConnectionsPerHost

Open bvirlet opened this issue 3 years ago • 2 comments

I'd like to be able to increase the AWSNetworking underlying NSURLSessionConfiguration httpMaximumConnectionsPerHost value. iOS sets it by default to 4. I'd like to be able to increase it.

The use case for this is to be able to upload more than 4 files in parallel to AWS S3.

A good solution would be to expose the NSURLSessionConfiguration for injection so that we can inject our own configuration if necessary.

This was previously requested in #606 but the issue was closed.

bvirlet avatar Mar 11 '21 12:03 bvirlet

Hi @bvirlet Thanks for bringing this to our attention. It looks like the previous issue was closed due to the stale bot, will reopen it. Depending on more information, we could close this and track the previous issue if it is similar.

Are you looking to increase the parallelization on all types of requests or just S3 operations? If just S3 operations, could you use TransferUtility to perform the S3 operation?

Is the ability to modify AWSNetworking relevant because you are using AWSS3 client? Are there other clients which you are using?

A good solution would be to expose the NSURLSessionConfiguration for injection so that we can inject our own configuration if necessary.

If possible, could you share any code snippets that describes the solution you'd like?

lawmicha avatar Mar 11 '21 16:03 lawmicha

Are you looking to increase the parallelization on all types of requests or just S3 operations? If just S3 operations, could you use TransferUtility to perform the S3 operation?

We need to use the S3 client because we need to have access to the version ID of the newly created/updated S3 object in the response, and the transfer utility doesn't provide that afaik.

Is the ability to modify AWSNetworking relevant because you are using AWSS3 client? Are there other clients which you are using?

Yes, we're only interested in the AWSS3 client.

A good solution would be to expose the NSURLSessionConfiguration for injection so that we can inject our own configuration if necessary.

If possible, could you share any code snippets that describes the solution you'd like?

I definitely want to elaborate on that, I'm a bit short on time for now. Will do ASAP!

bvirlet avatar Apr 08 '21 06:04 bvirlet

Closing this as duplicate https://github.com/aws-amplify/aws-sdk-ios/issues/606 , we will look into this issue and update soon.

royjit avatar Sep 23 '22 18:09 royjit