The thanos query command (also known as “Querier”) implements the Prometheus HTTP v1 API to query data in a Thanos cluster via PromQL. In short, it gathers the data needed to evaluate the query from underlying StoreAPIs, evaluates the query and returns the result. Querier is fully stateless and horizontally scalable.
How does Thanos query work?
Thanos Query is the main component of Thanos, it is the central point where you send promQL query to. Thanos query exposes a Prometheus compatible endpoints. Then it dispatches query to all of it “stores”. Keep in mind the store may be any other Thanos component that serves metrics.
Why use Thanos Prometheus?
Thanos can help any organization using Prometheus that needs to enable high availability and virtually unlimited historical data storage. Using Thanos makes it easier to scale Prometheus horizontally and obtain a global view of data from multiple Prometheus servers.