Questions
5 of 14
1What is a segment in Qdrant's storage engine, and why does a collection consist of multiple segments rather than one monolithic index?
2What role does the Write-Ahead Log (WAL) play in Qdrant, and what failure scenario does it protect against?
3How does memory-mapped (mmap) storage allow Qdrant to serve a collection larger than available RAM?
4What does the background optimizer do in Qdrant, and why can too-aggressive optimization affect query latency?
5What is the practical difference between storing vectors in-memory versus on-disk in a collection configuration, and when would you choose on-disk?
6What is sharding in a distributed Qdrant cluster, and what determines which shard a given point is written to by default?
7What is custom sharding, and how does it change the way multitenant data is distributed across a cluster?
8What consensus algorithm does Qdrant use to keep cluster metadata consistent across nodes, and what does it coordinate?
9What are Qdrant's tunable read/write consistency levels for distributed operations, and what trade-off do they represent?
10In a replicated cluster, what happens to search results if a query is served while one replica of a shard is temporarily out of sync?
11Walk through what happens internally, at a high level, when a client sends a filtered vector search request to a distributed Qdrant cluster.
12Why does Qdrant merge and re-rank results from multiple shards rather than simply concatenating each shard's top-k?
13How does a payload filter interact with segment selection during query execution - does Qdrant always scan every segment?
14What is the performance implication of running a query that touches every named vector on a point versus one that specifies using?
05 / 14

What is the practical difference between storing vectors in-memory versus on-disk in a collection configuration, and when would you choose on-disk?

In-memory minimizes latency; on-disk minimizes RAM cost

Storing vectors in-memory means they are allocated on the heap and always resident in RAM. Distance computations during HNSW traversal and rescoring hit memory directly, with no page faults and no disk I/O. This gives the lowest and most predictable latency, but it requires enough RAM to hold the full-precision vectors, the HNSW graph, and the payload indexes. Storing vectors on-disk means they are memory-mapped and paged in on demand. RAM usage drops dramatically - only the working set needs to be resident - but latency becomes a function of cache hit rate, and cold reads add tens of microseconds to tens of milliseconds per access. The practical difference is therefore RAM cost against latency predictability, and the right choice depends on which of those is the binding constraint for your workload.

The decision is not binary, because Qdrant lets you mix storage modes per component. You can keep the HNSW graph in RAM but the raw vectors on disk, so traversal is fast and only rescoring touches disk. You can quantize the vectors and keep the quantized versions in RAM while the full-precision versions stay on disk, so traversal uses the in-RAM quantized vectors and rescoring fetches the raw vectors for a small candidate set. You can put everything on disk for a cold tier. The most common production pattern for large collections is the hybrid: quantized vectors in RAM, graph in RAM if it fits or on disk if it does not, raw vectors on disk. This gets you close to in-memory latency for the traversal phase while keeping the RAM footprint proportional to the quantized data rather than the full float32 data. The full-precision vectors are only touched during rescoring of a small candidate set, so the disk I/O is bounded and predictable.

  1. 1

    In-memory vectors: lowest latency, highest RAM cost, appropriate for latency-critical high-QPS collections that fit in RAM.

  2. 2

    On-disk vectors: lower RAM cost, variable latency, appropriate for collections much larger than RAM, low-QPS, or cost-sensitive workloads.

  3. 3

    Hybrid: quantized vectors in RAM + raw vectors on disk + graph in RAM or on disk. Usually the best large-scale configuration.

  4. 4

    Graph placement is a separate decision from vector placement; you can mix them.

  5. 5

    Payload indexes are usually kept in RAM because they are small and their access pattern is latency-critical.

I choose on-disk when the collection is much larger than the machine's RAM, when the query rate is low enough that occasional cold reads are acceptable, when the workload is a cold tier that is queried infrequently, or when cost pressure makes RAM the dominant expense. I keep things in memory when the collection fits comfortably and the workload is latency-critical, or when the p99 SLO is tight enough that variable disk latency would violate it. The common mistake is assuming on-disk always means slow. With binary quantization, inline storage of quantized vectors in graph nodes, and rescoring over a small candidate set, an on-disk collection can serve queries in single-digit milliseconds - it is not the same as a naive disk-backed search. The second common mistake is sizing RAM by counting vectors only. The graph and payload indexes can dominate memory on large collections, so a collection whose raw vectors fit in RAM may still not fit once the graph is added. The third mistake is ignoring NVMe versus spinning disk: on-disk is a very different proposition on NVMe (hundreds of microseconds per read) than on HDD (tens of milliseconds). Version note: the on_disk flags and the interaction between vector, graph, and quantization storage have changed across releases, and the defaults differ - always inspect the effective config.

javascript

Version-dependent: the on_disk flag exists on vector params, HNSW config, and some quantization configs, but its exact behavior and defaults have changed across releases. In some versions, the optimizer's memmap_threshold determines whether a segment is stored on disk regardless of the per-vector flag, which means the effective storage mode is a combination of the two. If you need deterministic storage behavior, set both the per-vector flags and the optimizer thresholds explicitly, and verify with get_collection after creation.

Difficulty: 7/10
Topics: Storage Engine, Memory Optimization, mmap

Scenario Questions

0-2 years experience
  1. 1

    You have a 1M-vector collection and 8 GB of RAM. Would you store vectors in memory or on disk, and why?

  2. 2

    A teammate says on-disk is always slower than in-memory. Explain a case where on-disk with quantization and rescoring is competitive.

2-5 years experience
  1. 1

    You must serve a 50M-vector collection on a node with 64 GB of RAM. Walk through the storage configuration you would choose and the expected latency profile.

  2. 2

    Your in-memory collection is using too much RAM and you need to cut it by half without losing more than one point of recall. Describe the storage and quantization changes you would make, in order.

5-8 years experience
  1. 1

    Design a two-tier storage architecture where a hot tier serves recent data in memory and a cold tier serves older data on disk, with a single logical collection. How would you route queries between tiers?

  2. 2

    You have a 300M-vector collection on NVMe with a 30ms p99 SLO. Compare three configurations (all in-memory, graph in RAM + raw on disk, everything on disk with binary quantization) and recommend one with justification.

8+ years experience
  1. 1

    Derive the RAM required for a collection as a function of point count, dimension, m, quantization scheme, and payload index cardinality. Where does the estimate typically undercount in practice?

  2. 2

    You are asked to reduce the infrastructure cost of a search cluster by 60% without dropping below a 0.95 recall target and a 40ms p99. Propose a storage and quantization plan and quantify the expected savings and risks.

Follow-up Questions

  • How would you estimate the RAM footprint of a collection including the graph, payload indexes, and quantization overhead, before you create it?
  • If your p99 SLO is 15ms and the collection does not fit in RAM, what combination of quantization, on-disk placement, and oversampling would you try first, and why?