-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
query: add initial time-based query pushdown
Add time-based pushdown mechanism. It works by directly querying a Thanos Store node if it is the only one partially or fully matching the time range of a query. I believe that this will be the case most of the times because typically Sidecar/Ruler/Receive cover a few days of time range and horizontally balanced Thanos Store instances cover the historical data from remote object storage. With query-frontend in front splitting the queries into smaller parts means that with higher time ranges, most of the queries can be simply pushed down. For example, with Sidecars covering 2 days of data, with a 7d query, and a split interval of 1d this means that 5/7 * 100 = ~71% of processing can be pushed down to the leaf nodes. Small ad-hoc tests which touch a lot of timeseries show a 2x reduction in query duration. Hide this under an "experimental feature" flag because this still doesn't have everything implemented intentionally: * `lazySeriesSet` for concurrent `Select()`s in Thanos Store * Some missing Prometheus engine flags such as the look-back delta * Support the selection of StoreAPI nodes in the UI (use only them, not all endpoints) * No chunks/series limiters Also, this API could be potentially implemented in other components. If the approach looks good then we can merge this and implement these in follow-up PRs. The main parts of this change is in: * New QueryAPI service * New `pkg/pushdown/` * API request handling code Signed-off-by: Giedrius Statkevičius <[email protected]>
- Loading branch information
Showing
26 changed files
with
1,709 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.