docs/sources/reference-pyroscope-v2-architecture/components/query-frontend.md
The query-frontend is a stateless component that serves as the entry point for the query path. It handles query planning and routes requests to query-backend instances for execution.
The query-frontend is responsible for:
When a query arrives, the query frontend:
Because the metastore serves block metadata from memory with linearizable reads, query planning is fast and does not require the query frontend to maintain any local state about blocks.
The query-frontend is completely stateless:
The query-frontend can scale independently of the write path:
Query-frontends can be load balanced using standard HTTP load balancers. Each instance can handle any query, making round-robin load balancing effective.