{
  "schema_version": 2,
  "id": "develop/data-types/vector-sets/scalability",
  "title": "Scalability",
  "url": "https://redis.io/docs/latest/develop/data-types/vector-sets/scalability/",
  "summary": "Scale Redis vector sets to handle larger data sets and workloads",
  "tags": [
    "docs",
    "develop",
    "stack",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-10T15:45:48+01:00",
  "page_type": "content",
  "content_hash": "15acb8de723c17b6cfda6eb1c9911383163a95aa36bbcf097fc2fc0177965252",
  "sections": [
    {
      "id": "multi-instance-scalability",
      "title": "Multi-instance scalability",
      "role": "overview",
      "text": "Vector sets can scale horizontally by sharding your data across multiple Redis instances. This is done by partitioning the dataset manually across keys and nodes."
    },
    {
      "id": "example-strategy",
      "title": "Example strategy",
      "role": "example",
      "text": "You can shard data using a consistent hash:\n\n[code example]\n\nThen add elements into different keys:\n\n[code example]\n\nTo run a similarity search across all shards, send [`VSIM`](https://redis.io/docs/latest/commands/vsim) commands to each key and then merge the results client-side:\n\n[code example]\n\nThen combine and sort the results by score."
    },
    {
      "id": "key-properties",
      "title": "Key properties",
      "role": "content",
      "text": "- Write operations ([`VADD`](https://redis.io/docs/latest/commands/vadd), [`VREM`](https://redis.io/docs/latest/commands/vrem)) scale linearly—you can insert in parallel across instances.\n- Read operations ([`VSIM`](https://redis.io/docs/latest/commands/vsim)) do not scale linearly—you must query all shards for a full result set.\n- Smaller vector sets yield faster queries, so distributing them helps reduce query time per node.\n- Merging results client-side keeps logic simple and doesn't add server-side overhead."
    },
    {
      "id": "availability-benefits",
      "title": "Availability benefits",
      "role": "content",
      "text": "This sharding model also improves fault tolerance:\n\n- If one instance is down, you can still retrieve partial results from others.\n- Use timeouts and partial fallbacks to increase resilience."
    },
    {
      "id": "latency-considerations",
      "title": "Latency considerations",
      "role": "content",
      "text": "To avoid additive latency across N instances:\n\n- Send queries to all shards in parallel.\n- Wait for the slowest response.\n\nThis makes total latency close to the worst-case shard time, not the sum of all times."
    },
    {
      "id": "summary",
      "title": "Summary",
      "role": "content",
      "text": "| Goal                      | Approach                                          |\n|---------------------------|---------------------------------------------------|\n| Scale inserts             | Split data across keys and instances              |\n| Scale reads               | Query all shards and merge results                |\n| High availability         | Accept partial results when some shards fail      |\n| Maintain performance      | Use smaller shards for faster per-node traversal  |"
    },
    {
      "id": "see-also",
      "title": "See also",
      "role": "related",
      "text": "- [Performance](https://redis.io/docs/latest/develop/data-types/vector-sets/performance)\n- [Filtered search](https://redis.io/docs/latest/develop/data-types/vector-sets/filtered-search)\n- [Memory usage](https://redis.io/docs/latest/develop/data-types/vector-sets/memory)"
    }
  ],
  "examples": [
    {
      "id": "example-strategy-ex0",
      "language": "python",
      "code": "key_index = crc32(item) % 3\nkey = f\"vset:{key_index}\"",
      "section_id": "example-strategy"
    },
    {
      "id": "example-strategy-ex1",
      "language": "bash",
      "code": "VADD vset:0 VALUES 3 0.1 0.2 0.3 item1\nVADD vset:1 VALUES 3 0.4 0.5 0.6 item2",
      "section_id": "example-strategy"
    },
    {
      "id": "example-strategy-ex2",
      "language": "bash",
      "code": "VSIM vset:0 VALUES ... WITHSCORES\nVSIM vset:1 VALUES ... WITHSCORES\nVSIM vset:2 VALUES ... WITHSCORES",
      "section_id": "example-strategy"
    }
  ]
}
