How do you run a vector database in production with high availability?
NLPLevel: IntermediateAdvanced Indexing
How do you run a vector database in production with high availability?
Hints
- What does closeness mean in this representation and metric?
- Check normalization, exact versus approximate search and alignment with the training objective.
Answer
Production vector DB requirements: uptime, consistency, disaster recovery.
Replication:
- Most production vector DBs support primary-replica replication (Qdrant, Weaviate, Milvus)
- Writes go to primary; reads distributed across replicas
- Configure replica count ≥ 3 for HA
Sharding (when index exceeds single node):
- Hash-based sharding: assign vectors to shards by ID modulo shard count
- Range-based sharding: by time or document category
- Most production DBs handle sharding automatically (Weaviate, Milvus)
Backup and restore:
- Snapshot entire index to object storage (S3) periodically
- Restore time depends on index size — pre-warm by running a batch of queries after restore
- Test restore procedures quarterly
Monitoring:
- Query latency (p50, p99)
- QPS (queries per second)
- Index size and growth rate
- Recall drift (run golden query set periodically; alert if recall drops)
Source and licence: JustInCache & contributors — Awesome AI Interviews · Apache-2.0