Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Managed Service for Sharded PostgreSQL
  • Getting started
    • Resource relationships
    • Sharding
    • Sharding keys
    • Selecting a sharding strategy
    • Host classes
    • Storage in Sharded PostgreSQL
    • Backups
    • Quotas and limits
    • Sharded PostgreSQL settings
    • Sharded PostgreSQL versioning policy
  • Access management
  • Pricing policy
  • Terraform reference
  • Metrics Monitoring
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • Shard
  • Router
  • Coordinator
  1. Concepts
  2. Resource relationships

Resource relationships in Yandex Managed Service for Sharded PostgreSQL

Written by
Yandex Cloud
Updated at July 8, 2026
View in Markdown
  • Shard
  • Router
  • Coordinator

Sharded PostgreSQL is a system for horizontal PostgreSQL scaling through sharding. Essentialy, these are multiple PostgreSQL clusters merged into a single Sharded PostgreSQL cluster.

A Managed Service for Sharded PostgreSQL cluster consists of shards, a router, and a coordinator. Routers and coordinators run on hosts, i.e., virtual machines with dedicated computing resources and reserved data storage.

ShardShard

A shard is a Managed Service for PostgreSQL cluster located in the same folder and cloud network as the Managed Service for Sharded PostgreSQL cluster.

There may be one or multiple shards. The maximum number of shards is unlimited and does not depend on the sharding type used in the cluster.

Each shard stores an independent data fragment. The data is distributed to shards based on a sharding key.

Queries are routed to a shard depending on the data it contains. A router is the entity that distributes queries among shards.

RouterRouter

A router is the main component of a Managed Service for Sharded PostgreSQL cluster, responsible for routing queries.

A client connects to the router and sends queries over the PostgreSQL protocol. The router analyzes the query, redirects it to the shard that stores the relevant data, gets the query result, and returns it to the client.

The router uses sharding rules supplied by the coordinator to find the relevant shard.

When creating a cluster, you can choose between standard and advanced sharding. If you choose standard, the cluster will additionally get the INFRA hosts, which combine the router and coordinator roles. To ensure that such a cluster is fault-tolerant, we recommend creating at least three INFRA hosts in different availability zones. The maximum number of INFRA hosts is seven.

If you choose advanced sharding, dedicated ROUTER hosts will be provided for routers. The number of routers placed on such hosts is unlimited.

CoordinatorCoordinator

A coordinator is a component of a Managed Service for Sharded PostgreSQL cluster that stores sharding rules and balances loads on shards.

In standard sharding, the INFRA host acts as the coordinator. To ensure that such a cluster is fault-tolerant, we recommend creating at least three INFRA hosts in different availability zones. The maximum number of INFRA hosts is seven.

In advanced sharding, the COORDINATOR host acts as the coordinator. To ensure that such a cluster is fault-tolerant, we recommend creating three COORDINATOR hosts in different availability zones. The maximum number of COORDINATOR hosts is seven.

Coordinators store sharding rules in a QDB database running on INFRA or COORDINATOR hosts. This database represents an etcd cluster where the consensus algorithm approves changes in data.

Using a coordinator, you can create or edit sharding rules for all routers at the same time. If you change the rules on one of the coordinators, the other coordinators and routers will get this update.

Be mindful of what is managed by the service and what, by the Yandex Cloud customer. Understanding these zones of control makes you an efficient user of cloud resources and helps avoid potential database-related issues. For more information, see Zones of control between managed database (MDB) service users and Yandex Cloud.

Was the article helpful?

Previous
Managing databases
Next
Sharding
© 2026 Direct Cursus Technology L.L.C.