> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pg-sharding.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Router

The **SPQR Router** routes queries to shards and provides the interface for clients to a sharded cluster. Applications should never communicate directly with shards, but rather use the Router to route their queries.

The **Router** caches metadata from the Coordinator and guesses which shard a transaction should be routed to.

A **Router** is stateless, meaning it has no persistent state, and is typically run on dedicated resources. Or can be run anywhere else, including on the same host as the application.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.