• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

uber / cadence / 01909e15-6794-4b38-abfa-ab8dde3a5a9b
72%
master: 72%

Build:
Build:
LAST BUILD BRANCH: fixit
DEFAULT BRANCH: master
Ran 10 Jul 2024 07:50PM UTC
Jobs 1
Files 727
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Jun 2024 10:07PM UTC coverage: 71.517% (+0.08%) from 71.438%
01909e15-6794-4b38-abfa-ab8dde3a5a9b

push

buildkite

web-flow
Global ratelimiter: everything else (#6141)

After too many attempts to break this apart and build different portions in self-contained ways, and running into various inter-dependent roadblocks... I just gave up and did it all at once.

# Rollout plan for people who don't want or need this system

Do nothing :)

As of this PR, you'll use "disabled" and that should be as close to "no changes at all" as possible.
Soon, you'll get "local", and then you'll have some new metrics you can use (or ignore) but otherwise no behavior changes.

And that'll be it.  The "global" load-balanced stuff is likely to remain opt-in.

# Rollout plan for us

For deployment: any order is fine / should not behave (too) badly.  Even if "global" or either shadow mode is selected on the initial deploy.  Frontends will have background `RatelimitUpdate` request failures until History is deployed, but that'll just mean it continues to use the "local" internal fallback and that's in practice the same behavior as "local" or "disabled", just slightly noisier.

The _smoothest_ deployment is: deploy everything on "disabled" or "local" (the default(s), so no requests are sent until deploy is done), then switch to "local-shadow-global" to warm global limiters / check that it's working, then "global" to use the global behavior.  

Rolling back is just the opposite.  Ideally disable things first to stop the requests, but even if you don't it should be fine.

In more detail:

1. At merge time, this will set the "key mode" (`frontend.globalRatelimiterMode`) to "disabled", which gets as close as is reasonably possible to acting _exactly_ like it did before this PR.
   - This is also effectively the panic button for the initial rollout.
2. Once that proves to not immediately explode, switch to "local" for all keys.  This will keep the current ratelimiter rates, but will start collecting and emitting ratelimiter-usage metrics, so we can make sure that doesn't explode eithe... (continued)

688 of 850 new or added lines in 29 files covered. (80.94%)

14 existing lines in 7 files now uncovered.

105310 of 147252 relevant lines covered (71.52%)

2625.62 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
86.59
-0.56% service/history/resource/resource.go
3
25.0
common/quotas/global/rpc/error.go
3
0.0
0.0% service/history/resource/resource_test_utils.go
5
0.0
0.0% common/resource/resource_test_utils.go
6
57.5
-1.96% common/metrics/tags.go
6
57.14
common/quotas/global/shared/keymapper.go
8
89.89
-10.11% client/history/peer_resolver.go
8
96.17
-3.83% common/quotas/global/algorithm/requestweighted.go
8
68.0
common/types/mapper/thrift/any.go
10
95.84
-0.59% service/history/handler/handler.go
12
49.64
-0.81% common/log/tag/tags.go
12
91.55
-4.84% service/frontend/service.go
14
98.22
-1.38% common/types/mapper/thrift/history.go
16
81.82
common/quotas/global/rpc/mapping.go
20
76.74
common/quotas/global/rpc/client.go
29
85.42
18.23% common/quotas/global/collection/collection.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
89.89
-10.11% client/history/peer_resolver.go
2
93.06
-1.39% common/task/parallel_task_processor.go
2
77.05
0.2% service/matching/tasklist/task_list_manager.go
2
97.37
-2.63% common/quotas/global/collection/internal/limiter.go
2
91.84
-0.3% common/util.go
2
66.67
-0.5% common/persistence/historyManager.go
3
77.87
-0.61% service/history/queue/timer_queue_processor_base.go
Jobs
ID Job ID Ran Files Coverage
1 01909e15-6794-4b38-abfa-ab8dde3a5a9b.1 10 Jul 2024 07:50PM UTC 727
71.52
Source Files on build 01909e15-6794-4b38-abfa-ab8dde3a5a9b
  • Tree
  • List 727
  • Changed 314
  • Source Changed 0
  • Coverage Changed 39
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 239767d8 on github
  • Prev Build on master (#01905FB8...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc