Skip to content

feat(quotas): Rate limit metrics before aggregator [INGEST-1655] - #1540

Merged
jjbayer merged 11 commits into
feat/indexed-transactions-limitingfrom
feat/quotas-rate-limit-before-agg
Oct 24, 2022
Merged

jjbayer merged 11 commits into
feat/indexed-transactions-limitingfrom
feat/quotas-rate-limit-before-agg

Conversation

@jjbayer

@jjbayer jjbayer commented Oct 24, 2022 •

Copy link
Copy Markdown
Member

Background

In #1515 we implemented rate limiting functionality for metrics buckets, which are applied after flushing them from the metrics aggregator by checking redis.

This PR

When a quota is already exhausted, and that information has already been cached on the project state, there is no need to go through the aggregator at all. Instead, we apply the rate limiting logic before sending metrics or buckets into the aggregator.

Implementation details

The utility type BucketLimiter was converted to a generic MetricsLimiter<T>, where T can be either Metric or Bucket.

Notes

Will be merged into #1537 & deployed together.

#skip-changelog (there's already a line about rate limiting metrics buckets)

@jjbayer
jjbayer marked this pull request as ready for review October 24, 2022 06:47
@jjbayer
jjbayer requested a review from a team October 24, 2022 06:47

@olksdr olksdr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@jjbayer
jjbayer changed the base branch from master to feat/indexed-transactions-limiting October 24, 2022 09:28
@jjbayer
jjbayer merged commit 139fa35 into feat/indexed-transactions-limiting Oct 24, 2022
@jjbayer
jjbayer deleted the feat/quotas-rate-limit-before-agg branch October 24, 2022 11:22
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.

3 participants