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

v1.17: sleep instead of drop when stream rate exceeded limit; (backport of #939) #989

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Apr 23, 2024

Problem

Currently we are dropping the stream right away when the stream rate limit is being exceeded. The problem is the client can retry right away. In addition, the stream might have been received and can be used, dropping it waste resources.

Summary of Changes

Change to sleep instead of drop. Thanks to @alessandrod -- we sleep based on the estimated time to elapse to appease the rate limit and consider the RTT for the connection.

Fixes #


This is an automatic backport of pull request #939 done by [Mergify](https://mergify.com).

* sleep instead of drop when stream rate exceeded limit;

Consider connection count of staked nodes when calculating allowed PPS

remove rtt from throttle_duration calculation

removed connection count in StreamerCounter -- we do not need it at this point

* remove connection count related changes -- they are unrelated to this PR

* revert unintended changes

(cherry picked from commit 137a982)

# Conflicts:
#	streamer/src/nonblocking/quic.rs
#	streamer/src/nonblocking/stream_throttle.rs
@mergify mergify bot added the conflicts label Apr 23, 2024
Copy link
Author

mergify bot commented Apr 23, 2024

Cherry-pick of 137a982 has failed:

On branch mergify/bp/v1.17/pr-939
Your branch is up to date with 'origin/v1.17'.

You are currently cherry-picking commit 137a982a1e.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   streamer/src/nonblocking/quic.rs
	deleted by us:   streamer/src/nonblocking/stream_throttle.rs

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@lijunwangs lijunwangs marked this pull request as draft April 23, 2024 06:40
@lijunwangs
Copy link

Superseded by #991

@lijunwangs lijunwangs closed this Apr 24, 2024
@mergify mergify bot deleted the mergify/bp/v1.17/pr-939 branch April 24, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant