Skip to content

Add per namespace rate limiter for matching service#10069

Draft
yycptt wants to merge 2 commits intotemporalio:mainfrom
yycptt:matching-ns-rate-limit
Draft

Add per namespace rate limiter for matching service#10069
yycptt wants to merge 2 commits intotemporalio:mainfrom
yycptt:matching-ns-rate-limit

Conversation

@yycptt
Copy link
Copy Markdown
Member

@yycptt yycptt commented Apr 24, 2026

What changed?

Why?

  • Noisy neighbor protection. Provide knob for preventing one namespace from consuming all available matching host rps.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

@yycptt yycptt requested review from dnr and prathyushpv April 24, 2026 23:02
Comment thread service/matching/fx.go
Comment on lines +124 to +125
configs.PollTaskAPISet, // set of APIs that will wait for token instead of immediate rejection
serviceConfig.PollWaitForNamespaceRateLimitToken,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We need to discuss if matching need this behavior as well. This is what we are doing on frontend. I can bypass them if needed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

For helper methods in the quotas package, please check the changes in #9884

Comment thread service/matching/fx.go
fx.Provide(VisibilityManagerProvider),
fx.Provide(WorkersRegistryProvider),
fx.Provide(NewHandler),
fx.Provide(service.GrpcServerOptionsProvider),
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is updated in the previous PR for history service

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.

1 participant