github.com/grafana/pyroscope@v1.18.0/docs/sources/reference-pyroscope-architecture/components/query-frontend/index.md (about)

     1  ---
     2  title: "Pyroscope query-frontend"
     3  menuTitle: "Query-frontend"
     4  description: "The query-frontend accelerates queries."
     5  weight: 60
     6  ---
     7  
     8  # Pyroscope query-frontend
     9  
    10  The query-frontend is a stateless component that provides the same API as the [querier](../querier/) and can be used to accelerate the read path and ensure fair scheduling between tenants using the [query-scheduler](../query-scheduler/).
    11  
    12  In this situation, queriers act as workers that pull jobs from the queue, execute them, and return the results to the query-frontend for aggregation.
    13  
    14  We recommend that you run at least two query-frontend replicas for high-availability reasons.
    15  
    16  > Because the [query-scheduler](../query-scheduler/) is a mandatory component when using the query-frontend, you must run at least one query-scheduler replica.
    17  
    18  The following steps describe how a query moves through the query-frontend.
    19  
    20  1. A query-frontend receives a query.
    21  1. The query-frontend places the query in a queue by communicating with the query-scheduler, where it waits to be picked up by a querier.
    22  1. A querier picks up the query from the queue and executes it.
    23  1. A querier or queriers return the result to query-frontend, which then aggregates and forwards the results to the client.