-
Notifications
You must be signed in to change notification settings - Fork 211
Follow up on DefaultEndpointResolver in the orchestrator #2592
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit incorporates the following feedback: #2577 (comment) #2577 (comment) #2577 (comment) #2577 (comment)
This commit addresses #2577 (comment)
jdisanti
reviewed
Apr 18, 2023
.../smithy/rust/codegen/client/smithy/endpoint/generators/EndpointParamsInterceptorGenerator.kt
Outdated
Show resolved
Hide resolved
.../smithy/rust/codegen/client/smithy/endpoint/generators/EndpointParamsInterceptorGenerator.kt
Outdated
Show resolved
Hide resolved
A new generated diff is ready to view.
A new doc preview is ready to view. |
This commit incorporates #2592 (comment)
A new generated diff is ready to view.
A new doc preview is ready to view. |
jdisanti
reviewed
Apr 19, 2023
rust-runtime/aws-smithy-runtime-api/src/client/interceptors/error.rs
Outdated
Show resolved
Hide resolved
This commit addresses #2592 (comment)
jdisanti
approved these changes
Apr 19, 2023
Velfi
approved these changes
Apr 20, 2023
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
ysaito1001
added a commit
that referenced
this pull request
Apr 21, 2023
This commit ports fixes made in #2592, which addresses the following #2577 (comment)
ysaito1001
added a commit
that referenced
this pull request
Apr 21, 2023
…2620) ## Motivation and Context Addresses #2593 (comment) and #2593 (comment). Also ports the changes made in #2592. ## Description Prior to this PR, `sra_manual_test` and the bench `middleware_vs_orchestrator` created `CredentialsCache` and `aws_sdk_s3::endpoint::DefaultResolver` every time a request for `ListObjectsV2` was dispatched. This is not the case in production where those two types are created once during the construction of a service config ([here](https://github.com/awslabs/aws-sdk-rust/blob/main/sdk/s3/src/config.rs#L623-L625) and [here](https://github.com/awslabs/aws-sdk-rust/blob/main/sdk/s3/src/config.rs#L635-L652)) and reused for subsequent request dispatches. The PR will make `sra_manual_test` and `middleware_vs_orchestrator` do the same, creating `CredentialsCache` and `aws_sdk_s3::endpoint::DefaultResolver` only once before the test/benchmark starts running and reusing them thereafter. The change will help bring the performance for `orchestrator` closer to that for `middleware`. - In the `main` branch with `DefaultEndpointResolver` commented in and `StaticUriEndpointResolver` commented out: ``` middleware time: [20.924 µs 20.943 µs 20.964 µs] change: [-1.0107% -0.7357% -0.4827%] (p = 0.00 < 0.05) Change within noise threshold. Found 7 outliers among 100 measurements (7.00%) 1 (1.00%) high mild 6 (6.00%) high severe orchestrator time: [933.68 µs 940.11 µs 945.82 µs] change: [+2735.7% +2754.5% +2770.9%] (p = 0.00 < 0.05) Performance has regressed. Found 17 outliers among 100 measurements (17.00%) 14 (14.00%) low mild 2 (2.00%) high mild 1 (1.00%) high severe ``` - With the change in this PR: ``` middleware time: [21.161 µs 21.194 µs 21.232 µs] change: [-0.8973% -0.6397% -0.3758%] (p = 0.00 < 0.05) Change within noise threshold. Found 8 outliers among 100 measurements (8.00%) 5 (5.00%) high mild 3 (3.00%) high severe orchestrator time: [56.038 µs 56.182 µs 56.349 µs] change: [-0.7921% -0.5552% -0.3157%] (p = 0.00 < 0.05) Change within noise threshold. Found 5 outliers among 100 measurements (5.00%) 2 (2.00%) high mild 3 (3.00%) high severe ``` ## Testing Executed the following without any errors: ``` ➜ smithy-rs git:(ysaito/create-creds-cache-and-ep-resolver-only-once) ✗ ./gradlew aws:sra-test:assemble ➜ aws-sdk-s3 git:(ysaito/create-creds-cache-and-ep-resolver-only-once) cargo t ➜ aws-sdk-s3 git:(ysaito/create-creds-cache-and-ep-resolver-only-once) cargo bench ``` ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: Yuki Saito <[email protected]>
unexge
pushed a commit
that referenced
this pull request
Apr 24, 2023
## Motivation and Context This PR incorporates post-merge feedback left in #2577. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: Yuki Saito <[email protected]>
unexge
pushed a commit
that referenced
this pull request
Apr 24, 2023
…2620) ## Motivation and Context Addresses #2593 (comment) and #2593 (comment). Also ports the changes made in #2592. ## Description Prior to this PR, `sra_manual_test` and the bench `middleware_vs_orchestrator` created `CredentialsCache` and `aws_sdk_s3::endpoint::DefaultResolver` every time a request for `ListObjectsV2` was dispatched. This is not the case in production where those two types are created once during the construction of a service config ([here](https://github.com/awslabs/aws-sdk-rust/blob/main/sdk/s3/src/config.rs#L623-L625) and [here](https://github.com/awslabs/aws-sdk-rust/blob/main/sdk/s3/src/config.rs#L635-L652)) and reused for subsequent request dispatches. The PR will make `sra_manual_test` and `middleware_vs_orchestrator` do the same, creating `CredentialsCache` and `aws_sdk_s3::endpoint::DefaultResolver` only once before the test/benchmark starts running and reusing them thereafter. The change will help bring the performance for `orchestrator` closer to that for `middleware`. - In the `main` branch with `DefaultEndpointResolver` commented in and `StaticUriEndpointResolver` commented out: ``` middleware time: [20.924 µs 20.943 µs 20.964 µs] change: [-1.0107% -0.7357% -0.4827%] (p = 0.00 < 0.05) Change within noise threshold. Found 7 outliers among 100 measurements (7.00%) 1 (1.00%) high mild 6 (6.00%) high severe orchestrator time: [933.68 µs 940.11 µs 945.82 µs] change: [+2735.7% +2754.5% +2770.9%] (p = 0.00 < 0.05) Performance has regressed. Found 17 outliers among 100 measurements (17.00%) 14 (14.00%) low mild 2 (2.00%) high mild 1 (1.00%) high severe ``` - With the change in this PR: ``` middleware time: [21.161 µs 21.194 µs 21.232 µs] change: [-0.8973% -0.6397% -0.3758%] (p = 0.00 < 0.05) Change within noise threshold. Found 8 outliers among 100 measurements (8.00%) 5 (5.00%) high mild 3 (3.00%) high severe orchestrator time: [56.038 µs 56.182 µs 56.349 µs] change: [-0.7921% -0.5552% -0.3157%] (p = 0.00 < 0.05) Change within noise threshold. Found 5 outliers among 100 measurements (5.00%) 2 (2.00%) high mild 3 (3.00%) high severe ``` ## Testing Executed the following without any errors: ``` ➜ smithy-rs git:(ysaito/create-creds-cache-and-ep-resolver-only-once) ✗ ./gradlew aws:sra-test:assemble ➜ aws-sdk-s3 git:(ysaito/create-creds-cache-and-ep-resolver-only-once) cargo t ➜ aws-sdk-s3 git:(ysaito/create-creds-cache-and-ep-resolver-only-once) cargo bench ``` ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: Yuki Saito <[email protected]>
rcoh
pushed a commit
that referenced
this pull request
Apr 24, 2023
## Motivation and Context This PR incorporates post-merge feedback left in #2577. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: Yuki Saito <[email protected]>
rcoh
pushed a commit
that referenced
this pull request
Apr 24, 2023
…2620) ## Motivation and Context Addresses #2593 (comment) and #2593 (comment). Also ports the changes made in #2592. ## Description Prior to this PR, `sra_manual_test` and the bench `middleware_vs_orchestrator` created `CredentialsCache` and `aws_sdk_s3::endpoint::DefaultResolver` every time a request for `ListObjectsV2` was dispatched. This is not the case in production where those two types are created once during the construction of a service config ([here](https://github.com/awslabs/aws-sdk-rust/blob/main/sdk/s3/src/config.rs#L623-L625) and [here](https://github.com/awslabs/aws-sdk-rust/blob/main/sdk/s3/src/config.rs#L635-L652)) and reused for subsequent request dispatches. The PR will make `sra_manual_test` and `middleware_vs_orchestrator` do the same, creating `CredentialsCache` and `aws_sdk_s3::endpoint::DefaultResolver` only once before the test/benchmark starts running and reusing them thereafter. The change will help bring the performance for `orchestrator` closer to that for `middleware`. - In the `main` branch with `DefaultEndpointResolver` commented in and `StaticUriEndpointResolver` commented out: ``` middleware time: [20.924 µs 20.943 µs 20.964 µs] change: [-1.0107% -0.7357% -0.4827%] (p = 0.00 < 0.05) Change within noise threshold. Found 7 outliers among 100 measurements (7.00%) 1 (1.00%) high mild 6 (6.00%) high severe orchestrator time: [933.68 µs 940.11 µs 945.82 µs] change: [+2735.7% +2754.5% +2770.9%] (p = 0.00 < 0.05) Performance has regressed. Found 17 outliers among 100 measurements (17.00%) 14 (14.00%) low mild 2 (2.00%) high mild 1 (1.00%) high severe ``` - With the change in this PR: ``` middleware time: [21.161 µs 21.194 µs 21.232 µs] change: [-0.8973% -0.6397% -0.3758%] (p = 0.00 < 0.05) Change within noise threshold. Found 8 outliers among 100 measurements (8.00%) 5 (5.00%) high mild 3 (3.00%) high severe orchestrator time: [56.038 µs 56.182 µs 56.349 µs] change: [-0.7921% -0.5552% -0.3157%] (p = 0.00 < 0.05) Change within noise threshold. Found 5 outliers among 100 measurements (5.00%) 2 (2.00%) high mild 3 (3.00%) high severe ``` ## Testing Executed the following without any errors: ``` ➜ smithy-rs git:(ysaito/create-creds-cache-and-ep-resolver-only-once) ✗ ./gradlew aws:sra-test:assemble ➜ aws-sdk-s3 git:(ysaito/create-creds-cache-and-ep-resolver-only-once) cargo t ➜ aws-sdk-s3 git:(ysaito/create-creds-cache-and-ep-resolver-only-once) cargo bench ``` ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: Yuki Saito <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
This PR incorporates post-merge feedback left in #2577.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.