docs/sources/reference-pyroscope-architecture/components/query-scheduler/index.md
{{< admonition type="note" >}} The query-scheduler is a v1 architecture component. In v2, the [query frontend]({{< relref "../../reference-pyroscope-v2-architecture/components/query-frontend" >}}) communicates directly with [query backends]({{< relref "../../reference-pyroscope-v2-architecture/components/query-backend" >}}) without an intermediary scheduler. {{< /admonition >}}
The query-scheduler is a stateless component that retains a queue of queries to execute, and distributes the workload to available queriers.
The query-scheduler is a required component when using the query-frontend.
The following flow describes how a query moves through a Pyroscope cluster:
Query-scheduler enables the scaling of query-frontends. To learn more, see Mimir Query Frontend documentation.
To use the query-scheduler, query-frontends and queriers need to discover the addresses of query-scheduler instances. To advertise itself, the query-scheduler uses Ring-based service discovery which is configured via the memberlist configuration.
For high-availability, run two query-scheduler replicas.