Skip to content

query-frontend: Response caching should work for subqueries and part queries. #2178

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

Open
bwplotka opened this issue Feb 24, 2020 · 18 comments
Open
Labels

Comments

@bwplotka
Copy link
Contributor

bwplotka commented Feb 24, 2020

AC:

  • Subqueries should be split & cached.

I think that should not be that hard to implement, but we would need to finally parse the query and understand what is nested.

cc @brancz, @pracucci @tomwilkie

@bwplotka bwplotka changed the title query-frontend: Caching should work for subqueries. query-frontend: Response caching should work for subqueries. Feb 24, 2020
@pracucci
Copy link
Contributor

@owen-d This is your area of expertise. What's your take, especially considering the recently merged #1878 ?

@bwplotka
Copy link
Contributor Author

We are happy to help in free time, but ideas/suggestions are very welcome.

Or if any work happened already for this (:

@bwplotka
Copy link
Contributor Author

Any update on this? 🤗

Any pointers for contributors, e.g if we would want to tackle it?

@owen-d
Copy link
Contributor

owen-d commented Apr 14, 2020

I'm not sure if this will be straightforward to implement. We currently sequence a set of middlewares in the query frontend, of which a caching middleware is one. This makes it hard to pull out part of a query without dealing with the promql Engine, which is what we did in the sharding work (#1878). This could be another reason to support a refactoring of the query frontend though. There are a number of issues derived from sequencing middlewares this way, such as #1882

Caching middleware: https://github.com/cortexproject/cortex/blob/master/pkg/querier/queryrange/results_cache.go

Another thought - this is something we may want to solve via some sort of query planner.

@bwplotka
Copy link
Contributor Author

bwplotka commented Apr 14, 2020 via email

@bwplotka bwplotka changed the title query-frontend: Response caching should work for subqueries. query-frontend: Response caching should work for subqueries and part queries. May 6, 2020
@bwplotka
Copy link
Contributor Author

bwplotka commented May 6, 2020

Something to add as well : thanos-io/thanos#2569

@stale
Copy link

stale bot commented Jul 5, 2020

This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 5, 2020
@pracucci
Copy link
Contributor

pracucci commented Jul 6, 2020

Still valid

@stale stale bot removed the stale label Jul 6, 2020
@pracucci pracucci added the keepalive Skipped by stale bot label Jul 6, 2020
@pracucci pracucci removed the keepalive Skipped by stale bot label Sep 28, 2020
@pracucci
Copy link
Contributor

Still valid

@stale
Copy link

stale bot commented Nov 30, 2020

This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 30, 2020
@pracucci
Copy link
Contributor

pracucci commented Dec 1, 2020

Still valid

@stale stale bot removed the stale label Dec 1, 2020
@stale
Copy link

stale bot commented Mar 2, 2021

This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 2, 2021
@jtlisi
Copy link
Contributor

jtlisi commented Mar 2, 2021

still valid

@stale stale bot removed the stale label Mar 2, 2021
@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 2, 2021
@stale stale bot closed this as completed Jun 18, 2021
@bboreham
Copy link
Contributor

Definitely still valid.

Example: you can write an instant query like count(up)[60m:1m] which is basically the same thing as a range-query of count(up) over 60m with step 1m. Query-frontend will cache the latter but not the former.

@bboreham bboreham reopened this Jul 23, 2021
@stale stale bot removed stale labels Jul 23, 2021
@stale
Copy link

stale bot commented Oct 22, 2021

This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 22, 2021
@midnightconman
Copy link

midnightconman commented Oct 22, 2021 via email

@stale stale bot removed the stale label Oct 22, 2021
@stale
Copy link

stale bot commented Jan 22, 2022

This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 22, 2022
@alvinlin123 alvinlin123 added keepalive Skipped by stale bot and removed stale labels Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants