-
Notifications
You must be signed in to change notification settings - Fork 830
Description
Is your feature request related to a problem? Please describe.
In #6780, we refactored the TSDB User Scanner into a new module and support two different strategies, list
and user_index
. The user index strategy is introduced to reduce LIST API load by caching LIST results in the user index file. This change greatly reduced the LIST API load to object store backend for us to avoid potential outage in object storage.
However, we only uses User Scanner for bucket storage for metric data. Cortex also has bucket storage for rules and alerts. Those bucket storages have similar schema and also require calling LIST API to scan users, which means we could also have high LIST API load against object store.
Describe the solution you'd like
Introduce User Scanner to alertmanager bucket store and rule bucket store.
Relevant code path in AM bucket:
err := s.alertsBucket.Iter(ctx, "", func(key string) error { |
Relevant code path in Rule bucket:
err := b.bucket.Iter(ctx, "", func(user string) error { |
Describe alternatives you've considered
Introduce caching bucket to AM bucket store and Rule bucket store to cache scan user results. Similar to the existing TSDB caching bucket.
Additional context
Add any other context or screenshots about the feature request here.