Vector Search Latency Capacity Estimator

This estimator calculates the replica capacity needed for a vector-search service to meet a target query rate while preserving utilization headroom. It combines embedding or query-preparation time, vector-index search time, reranking time, network overhead, and the number of concurrent query slots available on each replica.

The result is useful when planning a retrieval tier independently from the language-model tier. It reports end-to-end search latency, throughput per replica, required replicas, and estimated headroom after rounding. The model assumes the component times are additive and that each query slot behaves independently. Index size, filter selectivity, cache state, storage speed, and tail-latency behavior can alter real capacity, so use measured values from a representative index and validate with concurrent load.

Inputs

ms
ms
ms
ms
qps
slots
%
Result
Vector-search replicas required
Estimated search latency
Capacity per replica
Required replicas
Rounded capacity headroom

1. Enter query preparation time
Include remote embedding latency only when it is part of the retrieval tier being sized.

2. Add search and reranking time
Use measurements from an index, filters, top-k value, and reranker similar to production.

3. Set traffic and slots
Enter sustained queries per second and effective concurrent query slots per replica.

4. Choose utilization headroom
Keep the target below saturation to reduce queue buildup during variation.

5. Review replica demand
Compare required replicas and headroom with failover and maintenance requirements.

Query service time = (embedding + search + rerank + network) / 1,000 Capacity per replica = concurrent slots × utilization / query service time Required replicas = ceiling(target queries per second / capacity per replica)

The calculation models each slot as one concurrent query path. It does not separately simulate queueing or shared downstream limits.

What the result means

The result is the minimum number of retrieval replicas implied by the target steady-state query rate and utilization limit.

Add redundancy beyond this number when the service must tolerate replica loss, deployment drains, or regional failover.

Given: 18 ms query preparation, 42 ms vector search, 35 ms reranking, 12 ms network overhead, 180 queries/second, 16 slots per replica, and 70% utilization.

Calculation: Service time = (18 + 42 + 35 + 12) / 1,000 = 0.107 seconds. Capacity per replica = 16 × 0.70 / 0.107 = 104.67 queries/second. Required replicas = 180 / 104.67 = 1.72, rounded up to 2.

Result: Two replicas provide modeled capacity of about 209.35 queries/second, leaving approximately 16.3% headroom above the target.

Should embedding latency be included?

Include it when the retrieval service performs or waits for query embedding. Exclude it when embeddings are generated and capacity-planned in a separate tier.

How does top-k affect the estimate?

Larger candidate sets can increase index-transfer and reranking time. Benchmark with the top-k and filters expected in production.

What does concurrent slots per replica mean?

It is the number of queries a replica can actively process in parallel at the measured service time. Use observed concurrency rather than thread count alone.

Why add replicas beyond the displayed number?

The estimate covers modeled load, not availability policy. Maintenance, failures, traffic spikes, and uneven shard load can justify additional replicas.

Can average latency hide a bottleneck?

Yes. Cache misses, selective filters, and large index partitions may create long tails. Capacity tests should examine p95 and p99 latency as well as averages.