Skip to content

Commit

Permalink
Merge pull request thanos-io#7568 from SuperQ/thanos_engine_doc
Browse files Browse the repository at this point in the history
Update Thanos PromQL Engine docs
  • Loading branch information
fpetkovski authored Jul 30, 2024
2 parents 639bf8f + 4d2e84c commit 6b05aa4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/components/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ thanos query \

This logic can also be controlled via parameter on QueryAPI. More details below.

## Experimental PromQL Engine
## Thanos PromQL Engine (experimental)

By default, Thanos querier comes with standard Prometheus PromQL engine. However, when `--query.promql-engine=thanos` is specified, Thanos will use [experimental Thanos PromQL engine](http://github.com/thanos-community/promql-engine) which is a drop-in, efficient implementation of PromQL engine with query planner and optimizers.

Expand All @@ -113,6 +113,14 @@ This feature is still **experimental** given active development. All queries sho

For new engine bugs/issues, please use https://github.com/thanos-community/promql-engine GitHub issues.

### Distributed execution mode

When using Thanos PromQL Engine the distributed execution mode can be enabled using `--query.mode=distributed`. When this mode is enabled, the Querier will break down each query into independent fragments and delegate them to components which implement the Query API.

This mode is particularly useful in architectures where multiple independent Queriers are deployed in separate environments (different regions or different Kubernetes clusters) and are federated through a separate central Querier. A Querier running in the distributed mode will only talk to Queriers, or other components which implement the Query API. Endpoints which only act as Stores (e.g. Store Gateways or Rulers), and are directly connected to a distributed Querier, will not be included in the execution of a distributed query. This constraint should help with keeping the distributed query execution simple and efficient, but could be removed in the future if there are good use cases for it.

For further details on the design and use cases of this feature, see the [official design document](https://thanos.io/tip/proposals-done/202301-distributed-query-execution.md/).

## Query API Overview

As mentioned, Query API exposed by Thanos is guaranteed to be compatible with [Prometheus 2.x. API](https://prometheus.io/docs/prometheus/latest/querying/api/). However for additional Thanos features on top of Prometheus, Thanos adds:
Expand Down Expand Up @@ -274,14 +282,6 @@ In case of nested Thanos Query components, it's important to note that tenancy e

Further, note that there are no authentication mechanisms in Thanos, so anyone can set an arbitrary tenant in the HTTP header. It is recommended to use a proxy in front of the querier in case an authentication mechanism is needed. The Query UI also includes an option to set an arbitrary tenant, and should therefore not be exposed to end-users if users should not be able to see each others data.

### Distributed execution mode

The distributed execution mode can be enabled using `--query.mode=distributed`. When this mode is enabled, the Querier will break down each query into independent fragments and delegate them to components which implement the Query API.

This mode is particularly useful in architectures where multiple independent Queriers are deployed in separate environments (different regions or different Kubernetes clusters) and are federated through a separate central Querier. A Querier running in the distributed mode will only talk to Queriers, or other components which implement the Query API. Endpoints which only act as Stores (e.g. Store Gateways or Rulers), and are directly connected to a distributed Querier, will not be included in the execution of a distributed query. This constraint should help with keeping the distributed query execution simple and efficient, but could be removed in the future if there are good use cases for it.

For further details on the design and use cases of this feature, see the [official design document](https://thanos.io/tip/proposals-done/202301-distributed-query-execution.md/).

## Flags

```$ mdox-exec="thanos query --help"
Expand Down

0 comments on commit 6b05aa4

Please sign in to comment.