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

Global ratelimiter: client-side Collection skeleton #6078

Merged
merged 24 commits into from
Jun 6, 2024

Conversation

Groxx
Copy link
Member

@Groxx Groxx commented May 31, 2024

A half-fleshed-out skeleton of the quotas.Collection that the frontend will use for these limits,
and a chunk of pseudo-code to show how it'll be used when the RPC PR is ready (coming soon).

This is not completely usable right now and will likely need some small changes, but it has the core bits:

  • real limiters / fallbacks / tracking
  • dynamically-tweakable background update loop
  • logs, metrics, error handling (where reasonable)
  • some very simple tests

It will eventually need:

  • sharding the limiters by key for all the (relevant) aggregator hosts
  • dynamic config to shadow / disable global limiters and control sending update requests.
  • swapping the frontend handler's ratelimits to use this instead

Copy link

codecov bot commented May 31, 2024

Codecov Report

Attention: Patch coverage is 67.36842% with 31 lines in your changes missing coverage. Please review.

Project coverage is 71.99%. Comparing base (b3e21fa) to head (e2b0994).
Report is 1 commits behind head on master.

Additional details and impacted files
Files Coverage Δ
common/clock/time_source.go 71.42% <ø> (ø)
common/quotas/global/collection/collection.go 67.36% <67.36%> (ø)

... and 12 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b3e21fa...e2b0994. Read the comment docs.

@coveralls
Copy link

coveralls commented Jun 6, 2024

Pull Request Test Coverage Report for Build 018fef57-8f5a-40b9-9c96-fb887e6f92f6

Details

  • 94 of 136 (69.12%) changed or added relevant lines in 2 files are covered.
  • 23 unchanged lines in 7 files lost coverage.
  • Overall coverage increased (+0.04%) to 71.372%

Changes Missing Coverage Covered Lines Changed/Added Lines %
common/quotas/global/collection/collection.go 86 128 67.19%
Files with Coverage Reduction New Missed Lines %
common/cache/lru.go 2 93.01%
service/history/replication/task_processor.go 2 82.76%
service/history/task/transfer_standby_task_executor.go 3 87.55%
service/history/task/task.go 3 84.81%
service/history/queue/timer_queue_processor_base.go 3 77.87%
service/history/handler/handler.go 4 96.14%
service/history/execution/cache.go 6 74.61%
Totals Coverage Status
Change from base Build 018feeec-d7a4-4bb0-b278-1977f0e4c7ed: 0.04%
Covered Lines: 106410
Relevant Lines: 149093

💛 - Coveralls

@Groxx Groxx merged commit c22b65f into cadence-workflow:master Jun 6, 2024
19 of 20 checks passed
@Groxx Groxx deleted the ratelimiter-collector branch June 6, 2024 21:59
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