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

Dedup Index Cache requests #7169

Open
yeya24 opened this issue Feb 29, 2024 · 1 comment
Open

Dedup Index Cache requests #7169

yeya24 opened this issue Feb 29, 2024 · 1 comment

Comments

@yeya24
Copy link
Contributor

yeya24 commented Feb 29, 2024

Is your proposal related to a problem?

It is very common to have duplicate Index Cache requests on a single Store Gateway. For example, when opening a Grafana dashboard, multiple panels might request the same matcher, causing getting/setting the same posting/series multiple times.

Especially for those postings that has very high cardinality, downloading those data can consume a large amount of bandwidth. For example, we have posting with size over > 100 MB. When we have 10 duplicated requests we overfetch 1GB of data.

Describe the solution you'd like

Introduce https://pkg.go.dev/golang.org/x/sync/singleflight to index cache clients. For example, memcached client, redis client and even the inmemory cache client.

Describe alternatives you've considered

Implement GroupCache which provides the same SingleFlight capability. However, as a user I still want to use existing cache clients but have SingleFlight support.

@yeya24
Copy link
Contributor Author

yeya24 commented Feb 29, 2024

cc @GiedriusS does this make sense to you? If it makes sense then I can start working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant