Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • 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 Valkey™
  • Getting started
    • Resource relationships
    • High availability clusters
    • Networking in Yandex Managed Service for Valkey™
    • Sharding
    • Backups
    • Replication and persistence
    • Supported clients
    • Memory management
    • Available commands
    • Valkey™ modules
    • Quotas and limits
    • Storage
    • Maintenance
    • Valkey™ settings
    • Valkey™ versioning policy
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ

In this article:

  • Advantages of sharding
  • Valkey™ Cluster structure
  • Scalability
  • Use cases
  1. Concepts
  2. Sharding

Sharding in Yandex Managed Service for Valkey™

Written by
Yandex Cloud
Updated at June 11, 2026
  • Advantages of sharding
  • Valkey™ Cluster structure
  • Scalability
  • Use cases

Sharding in Yandex Managed Service for Valkey™ works based on Valkey™ Cluster.

Advantages of shardingAdvantages of sharding

Sharding allows you to distribute loads across database hosts, which helps bypass the resource restrictions of a single server. This is particularly important when you handle large amounts of data or run compute-intensive jobs.

Horizontal scaling involves distributing datasets and load across multiple nodes. A single machine may underperform in terms of capacity or speed; however, in a horizontally-scaled cluster, each machine processes only a portion of total workload and stores only a portion of total data. This helps make your system more efficient compared to a single high-capacity server.

You can read more about Valkey™ database sharding in the Valkey™ documentation.

Valkey™ Cluster structureValkey™ Cluster structure

Valkey™ Cluster allows you to create a Valkey™ installation with automatic data sharding between the hosts. Valkey™ Cluster comprises multiple hosts for storing your data. Valkey™ Cluster is divided into shards, each consisting of a master and a set of replicas. Data from clients is written to the master hosts and then replicated.

Each cluster has 16,348 hash slots evenly distributed across the shards. Slots define the dataset stored in the shard.

ScalabilityScalability

If you need to scale your cluster horizontally, you can add new shards to it.

New shards are created without hash slots. To redistribute data, you must rebalance your cluster. Afterwards, some of the existing slots will move to the new shard.

You do not need to stop the cluster to move slots between shards. If the client queries the master for data that was moved to another shard, the query is forwarded to the new shard where the data was moved to. Hosts do not proxy queries; instead, they forward the client to the proper shard.

Yandex Managed Service for Valkey™ can contain between 1 and 10 shards, each comprising a different number of hosts. The minimum number of hosts per shard depends on the selected disk type.

You can create a cluster with either a single shard or three or more shards. You cannot create a cluster with two shards, but you can change the number of shards in an existing cluster.

For more information about limits on the number of hosts per shard, see Quotas and limits.

Use casesUse cases

  • Using a Yandex Managed Service for Valkey™ cluster as a PHP session storage
  • Migrating a database from a third-party Valkey™ cluster

Was the article helpful?

Previous
Networking in Yandex Managed Service for Valkey™
Next
Backups
© 2026 Direct Cursus Technology L.L.C.