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

feat: Storm cache supports millisecond resolution #1011

Merged
merged 29 commits into from
Nov 19, 2024

Conversation

seebees
Copy link
Contributor

@seebees seebees commented Nov 15, 2024

Under continuous failure situations having inFlightTTL and graceInterval be seconds can result in a continuous buildup of load.

The Storm Cache now supports milliseconds wait times.
When the a storm cache is empty it will also
only wait for a maximum inFlightTTL.

This means that the maximum number of serial requests
that will be waited for
before an error is now graceInterval / inFlightTTL.

In this situation, the cache will return/throw InFlightTTLExceeded.

Consider a situation where a specific branch key
will never be successfully added to the storm cache.
Under continuous load the storm cache will turn
this load from concurrent requests to serial requests.

However, if a failure is relatively fast, like 25ms,
then this serial handling of load
at a minimum of 1 request per second
will quickly cause the system to be overwhelmed.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Under continuous failure situations having inFlightTTL and graceInterval be seconds can result in a continuous buildup of load.

Consider a situation where a specific branch key
will never be successfully added to the storm cache. Under continuous load the storm cache will turn
this load from concurrent requests to serial requests.

However, if a failure is relatively fast, like 25ms, then this serial handling of load at a minimum
of 1 request per second
will quickly cause the system to be overwhelmed.

In addition to supporting milliseconds,
when the a storm cache is empty,
it will now prioritize fetching.
It will triger a fetch every inFlightTTL or graceInterval whichever is shorter.
This fetch will still be serial across all cache identifiers.

Also, the requirement
that the inFlightTTL be greater than or equal to graceInterval has been removed.
This does not make sense in the case where the cache is empty.
@seebees seebees requested a review from a team as a code owner November 15, 2024 20:01
Copy link

@seebees and @texastony, I noticed you are updating the smithy model files.
Does this update need new or updated user documentation?
Are you adding constraints inside list, map or union? Do you know about this issue: smithy-lang/smithy-dafny#491?

Copy link

@seebees and @seebees, I noticed you are updating the smithy model files.
Does this update need new or updated user documentation?
Are you adding constraints inside list, map or union? Do you know about this issue: smithy-lang/smithy-dafny#491?

1 similar comment
Copy link

@seebees and @seebees, I noticed you are updating the smithy model files.
Does this update need new or updated user documentation?
Are you adding constraints inside list, map or union? Do you know about this issue: smithy-lang/smithy-dafny#491?

The goal is to not requre more bounds checking
but I can do math in the constructor!

Saves updating the tests.
`const sleepMilli`
does not translate into Java
that lets you call `obj.sleepMilli`
Copy link

@seebees and @texastony, I noticed you are updating the smithy model files.
Does this update need new or updated user documentation?
Are you adding constraints inside list, map or union? Do you know about this issue: smithy-lang/smithy-dafny#491?

texastony
texastony previously approved these changes Nov 15, 2024
Copy link
Contributor

@texastony texastony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, besides CI failures.

Copy link

@seebees and @texastony, I noticed you are updating the smithy model files.
Does this update need new or updated user documentation?
Are you adding constraints inside list, map or union? Do you know about this issue: smithy-lang/smithy-dafny#491?

texastony
texastony previously approved these changes Nov 19, 2024
Copy link
Contributor

@texastony texastony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@seebees and @texastony, I noticed you are updating the smithy model files.
Does this update need new or updated user documentation?
Are you adding constraints inside list, map or union? Do you know about this issue: smithy-lang/smithy-dafny#491?

Copy link

@seebees and @texastony, I noticed you are updating the smithy model files.
Does this update need new or updated user documentation?
Are you adding constraints inside list, map or union? Do you know about this issue: smithy-lang/smithy-dafny#491?

@seebees seebees merged commit 6f09d5d into main Nov 19, 2024
134 checks passed
@seebees seebees deleted the seebees/storm-of-failures branch November 19, 2024 14:57
seebees pushed a commit that referenced this pull request Nov 19, 2024
# [1.8.0](v1.7.4...v1.8.0) (2024-11-19)

### Bug Fixes

* Drop SelectOpt from MutableMap ([bdb6509](bdb6509))
* Externs ([0bc1f96](0bc1f96))
* formatting ([b608ab8](b608ab8))
* **Python-Release:** Run validate tests from release commit ([41c0c94](41c0c94))
* **Python:** CMCs release lock for unhandled runtime exceptions ([#979](#979)) ([1510b77](1510b77))
* **Python:** return error on interrupted sleep ([#1003](#1003)) ([405cf37](405cf37))
* remove input and output traits on DynamoDB operations ([#1012](#1012)) ([8377acf](8377acf))
* return error on interrupted sleep ([#993](#993)) ([f49460a](f49460a))
* rust CI ([42e39cc](42e39cc))

### Features

* **Rust:** Interop test vectors; bump Dafny to 4.9.0 ([#1004](#1004)) ([a505a30](a505a30))
* Storm cache supports millisecond resolution ([#1011](#1011)) ([6f09d5d](6f09d5d))
seebees added a commit that referenced this pull request Nov 19, 2024
* chore(release): 1.8.0 [skip ci]

# [1.8.0](v1.7.4...v1.8.0) (2024-11-19)

### Bug Fixes

* Drop SelectOpt from MutableMap ([bdb6509](bdb6509))
* Externs ([0bc1f96](0bc1f96))
* formatting ([b608ab8](b608ab8))
* **Python-Release:** Run validate tests from release commit ([41c0c94](41c0c94))
* **Python:** CMCs release lock for unhandled runtime exceptions ([#979](#979)) ([1510b77](1510b77))
* **Python:** return error on interrupted sleep ([#1003](#1003)) ([405cf37](405cf37))
* remove input and output traits on DynamoDB operations ([#1012](#1012)) ([8377acf](8377acf))
* return error on interrupted sleep ([#993](#993)) ([f49460a](f49460a))
* rust CI ([42e39cc](42e39cc))

### Features

* **Rust:** Interop test vectors; bump Dafny to 4.9.0 ([#1004](#1004)) ([a505a30](a505a30))
* Storm cache supports millisecond resolution ([#1011](#1011)) ([6f09d5d](6f09d5d))
ajewellamz added a commit that referenced this pull request Nov 20, 2024
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