-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delays in Amplify SDK requests #1035
Comments
Time box to a day of investigation |
Was unable to reproduce. Awaiting further reproduction code samples or instructions from the reporters. |
Attempt to reproduce using sample code provided in the linked Amplify ticket. |
It looks like I am able to reproduce the issue using the provided amplify project AmplifySlowLogin |
Investigated, and the reason is that HTTP connection pools are never being reused, and a new HTTP connection must be established prior to every HTTP request. I will work with CRT to ensure that we reuse connection pools appropriately, and that we manage connections per the Smithy Reference Architecture. |
hey, do you have any update on the issue above? |
@fzy-spyro I am working on the solution now. We have a significant amount of work to do on the SDK's connection pooling logic but prior to that, I will find an interim solution that fixes this performance issue without causing problems elsewhere. I will update here when a fix has been applied to the AWS SDK for Swift. Once that happens, Amplify will have to integrate it into an amplify-swift release. |
The fix for this issue is expected to ship in AWS SDK for Swift next week. Once that happens, a new amplify-swift version will have to be shipped as well, incorporating the fixed version of this SDK. Thanks for your patience while we addressed this issue. |
this is great news, thanks! |
Released in aws-sdk-swift 0.31.0. Note that HTTP connections are not used across AWS clients; i.e. if you create two S3 clients, they do not share HTTP connections between them. We recommend that customers create one AWS service client per service per app launch, and keep a reference to the client for future use. |
@jbelkins Can we please reopen the issue? The customer has reported that the issue is still not fixed and they are still facing the same problem. |
@harsh62 AWS SDK for Swift 0.34.0 makes a new, URLSession-based HTTP client the default on all Apple platforms. That client does not use the connection pooling mechanism that was at fault in this original issue, and should overall be better suited to use on the platforms supported by amplify-swift. Best solution to the problem would be to update amplify-swift to use version 0.34.0+ of this SDK. |
Describe the bug
Amplify reports that Cognito auth requests sent via the SDK for Swift are being delayed about 2 sec:
aws-amplify/amplify-swift#3007
Investigate to see if this can be reproduced, and what the potential cause might be.
Expected Behavior
Requests are made immediately when the SDK operation is called
Current Behavior
Requests are delayed about 2 sec (see logs in attached Amplify ticket)
Reproduction Steps
Not immediately known, will investigate
Possible Solution
No response
Additional Information/Context
No response
AWS SWIFT SDK version used
0.13.0
Compiler and Version used
See attached
Operating System and version
See attached
The text was updated successfully, but these errors were encountered: