-
Notifications
You must be signed in to change notification settings - Fork 536
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
Add throttling logic for createDoc, getDeltas, and connectDoc to provide per-cluster rate-limiting at the HTTP route level #13896
Merged
tianzhu007
merged 17 commits into
microsoft:main
from
tianzhu007:Add-commonThrottleOptionsCreateDoc
Feb 9, 2023
Merged
Add throttling logic for createDoc, getDeltas, and connectDoc to provide per-cluster rate-limiting at the HTTP route level #13896
tianzhu007
merged 17 commits into
microsoft:main
from
tianzhu007:Add-commonThrottleOptionsCreateDoc
Feb 9, 2023
Conversation
This file contains 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
…te-limiting at the HTTP route level
github-actions
bot
added
area: server
Server related issues (routerlicious)
base: main
PRs targeted against main branch
labels
Jan 30, 2023
hedasilv
approved these changes
Jan 31, 2023
sharmakhushboo
suggested changes
Jan 31, 2023
server/routerlicious/packages/routerlicious-base/src/alfred/routes/api/documents.ts
Outdated
Show resolved
Hide resolved
server/routerlicious/packages/routerlicious-base/src/alfred/routes/api/documents.ts
Outdated
Show resolved
Hide resolved
server/routerlicious/packages/routerlicious-base/src/alfred/routes/api/documents.ts
Outdated
Show resolved
Hide resolved
sharmakhushboo
suggested changes
Jan 31, 2023
server/routerlicious/packages/routerlicious-base/src/alfred/routes/api/documents.ts
Outdated
Show resolved
Hide resolved
server/routerlicious/packages/routerlicious-base/src/alfred/routes/api/documents.ts
Show resolved
Hide resolved
server/routerlicious/kubernetes/routerlicious/templates/fluid-configmap.yaml
Outdated
Show resolved
Hide resolved
znewton
approved these changes
Feb 6, 2023
server/routerlicious/packages/routerlicious-base/src/alfred/routes/api/deltas.ts
Outdated
Show resolved
Hide resolved
sharmakhushboo
suggested changes
Feb 6, 2023
server/routerlicious/packages/routerlicious-base/src/alfred/routes/api/deltas.ts
Outdated
Show resolved
Hide resolved
yangg-msft
reviewed
Feb 7, 2023
server/routerlicious/packages/routerlicious-base/src/alfred/runner.ts
Outdated
Show resolved
Hide resolved
yangg-msft
reviewed
Feb 7, 2023
server/routerlicious/packages/routerlicious-base/src/alfred/runner.ts
Outdated
Show resolved
Hide resolved
yangg-msft
reviewed
Feb 7, 2023
server/routerlicious/packages/routerlicious-base/src/alfred/routes/api/deltas.ts
Outdated
Show resolved
Hide resolved
yangg-msft
reviewed
Feb 7, 2023
server/routerlicious/packages/routerlicious-base/src/utils/constants.ts
Outdated
Show resolved
Hide resolved
yangg-msft
reviewed
Feb 7, 2023
server/routerlicious/packages/routerlicious-base/src/utils/constants.ts
Outdated
Show resolved
Hide resolved
Is it intentional not to throttle connect doc? |
The connect doc is via web socket, and we add the throttling connect doc in the server/routerlicious/packages/lambdas/src/alfred/index.ts |
# Conflicts: # server/routerlicious/lerna-package-lock.json # server/routerlicious/package-lock.json
sharmakhushboo
approved these changes
Feb 7, 2023
yangg-msft
approved these changes
Feb 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Conflicts: # server/routerlicious/packages/lambdas/src/alfred/index.ts # server/routerlicious/packages/routerlicious-base/src/alfred/runner.ts # server/routerlicious/packages/routerlicious-base/src/test/alfred/io.spec.ts
tianzhu007
changed the title
Add throttling logic for creating documents to provide per-cluster rate-limiting at the HTTP route level
Add throttling logic for createDoc, getDeltas, and connectDoc to provide per-cluster rate-limiting at the HTTP route level
Feb 9, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
To better protect the AFR service from crashing due to high counts of creating document requests, it has been proposed that we rate limit the “create document”, "get deltas" API route, and "connect document" socket at a per-cluster level. We also extend the existing throttling logic to provide per-cluster rate-limiting at the HTTP route level.