Skip to content
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

Overhaul stalled stream protection and add upload support #3485

Merged
merged 24 commits into from
Mar 27, 2024

Conversation

jdisanti
Copy link
Collaborator

@jdisanti jdisanti commented Mar 13, 2024

This PR overhauls the existing stalled stream protection with a new algorithm, and also adds support for minimum throughput on upload streams. The new algorithm adds support for differentiating between the user or the server causing the stall, and not timing out if it's the user causing the stall. This will fix timeout issues when a customer makes remote service calls in between streaming pieces of information.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@jdisanti
Copy link
Collaborator Author

Results of running the stalled stream protection performance test in release mode.

Old impl without:  577.0 ± 2.9 ms
Old impl with:     584.1 ± 5.6 ms

New impl without:  577.1 ± 3.2 ms
New impl with:     583.3 ± 3.1 ms

These numbers are across six separate runs of the performance test each, averaged, and with a standard deviation applied. The performance is roughly the same, with maybe a miniscule amount of improvement.

The new implementation uses 80 bytes of memory for the log instead of 1 kilobyte though.

@jdisanti jdisanti marked this pull request as ready for review March 13, 2024 01:11
@jdisanti jdisanti requested a review from a team as a code owner March 13, 2024 01:11
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@jdisanti jdisanti requested a review from a team as a code owner March 14, 2024 20:57
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

CHANGELOG.next.toml Outdated Show resolved Hide resolved
aws/sdk/integration-tests/s3/tests/body_size_hint.rs Outdated Show resolved Hide resolved
aws/sdk/integration-tests/s3/tests/body_size_hint.rs Outdated Show resolved Hide resolved
CHANGELOG.next.toml Show resolved Hide resolved
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@jdisanti jdisanti added this pull request to the merge queue Mar 27, 2024
Merged via the queue into main with commit 27834ae Mar 27, 2024
41 checks passed
@jdisanti jdisanti deleted the jdisanti-upload-min-throughput branch March 27, 2024 20:58
jdisanti added a commit that referenced this pull request Mar 28, 2024
github-merge-queue bot pushed a commit that referenced this pull request Mar 28, 2024
)" (#3534)

The stalled stream protection changes are triggering a semver hazard
that will break the release. Need to revert it temporarily to fix this
issue.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
github-merge-queue bot pushed a commit that referenced this pull request Mar 30, 2024
Merging #3485 uncovered a semver hazard in the S3 stalled stream
protection test due to a subtle (but intentional) change in grace period
behavior for stalled streams. That semver hazard was going to cause the
SDK release to fail, so #3485 was reverted, and this PR modifies the
test so that it will pass with both versions of stalled stream
protection as a temporary measure. Once this PR is merged and released,
then the new stalled stream protection can be merged again.

I tested this by updating the runtime-versioner in #3540 so that I could
patch the currently released SDK with these test changes in place, with
a local copy of smithy-rs that has the new stalled stream protection
implementation. I ran all the tests across all the services in this
configuration to verify this was the only hazard that will be hit.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
jdisanti added a commit that referenced this pull request Apr 3, 2024
This commit unreverts 27834ae (#3485).
Original commit message:

Overhaul stalled stream protection and add upload support (#3485)

This PR overhauls the existing stalled stream protection with a new
algorithm, and also adds support for minimum throughput on upload
streams. The new algorithm adds support for differentiating between the
user or the server causing the stall, and not timing out if it's the
user causing the stall. This will fix timeout issues when a customer
makes remote service calls in between streaming pieces of information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants