General Settings
Network Settings
Availability Zone Settings
When
prefer_same_availability_zone is false or availability_zone is empty, zone labels do not affect host selection.
See Shards for host zone labels and a configuration example.
gRPC TLS Settings
client_tls configures outgoing internal gRPC connections, server_tls configures the internal gRPC API:
coordinator.yaml
Frontend Rules
Frontend rule is a specification of how clients connect to the router. Refer to theFrontendRule struct in the pkg/config/rules.go file for the most up-to-date configuration options.
Backend Rules
Backend Rule is a global setting that determines how the router connects to every shard. Refer to theBackendRule struct in the pkg/config/rules.go and pkg/config/auth_backend.go file for the most up-to-date configuration options.
Shards
Map of string to Shard objects. Refer to theShard struct in the pkg/config/router.go file for the most up-to-date configuration options.
Hosts can be assigned a connection priority with the
PRIORITY <n> suffix. A priority of -1 disables the host entirely (it is treated as dead); any other value is reserved for future use.
Example with availability zone preference enabled:
db1.example.com and can fall back to db2.example.com if no suitable host is available in us-east-1a. The selected host must satisfy target-session-attrs.
Statistics Settings
Collects query execution time statistics at specified percentile levels. The router tracks two independent timing metrics:- Router Time (time spent in SPQR router)
- Shard Time (time waiting for backend database)
Feature Flags
Query Routing Settings
Query routing settings are nested under thequery_routing configuration key and control how queries are routed across shards.
Many of these settings can be overridden at runtime using routing hints.
QRouter struct in the pkg/config/router.go file for the most up-to-date configuration options.