Prev Next

Database / Milvus Vector database Interview questions

1. What is Milvus? 2. What is a vector database, and how does Milvus fit that category? 3. What is a Collection in Milvus? 4. What is a Partition in Milvus? 5. What is a Segment in Milvus? 6. What is an embedding vector, in the context of Milvus? 7. What is an index in Milvus, and why is it needed? 8. What are the main vector index types Milvus supports? 9. What is HNSW, and why is it commonly used in Milvus? 10. What are the similarity/distance metrics Milvus supports? 11. What is the difference between L2 and Cosine similarity in Milvus? 12. What is Milvus Lite? 13. What is Zilliz Cloud? 14. What are the main components of Milvus's architecture? 15. What is the Proxy component in Milvus? 16. What is a Query Node in Milvus? 17. What is a Data Node in Milvus? 18. What is loading a collection in Milvus, and why is it required before search? 19. What is a scalar field in Milvus, and how is it used with vector search? 20. What is dynamic schema in Milvus? 21. What are Milvus's consistency levels? 22. What is a Replica in Milvus? 23. What is hybrid search in Milvus? 24. What is a sparse vector in Milvus? 25. What are the main use cases for Milvus? 26. Explain the data flow of an insert operation in Milvus, from client to searchable segment? 27. Why does Milvus separate compute and storage in its architecture? 28. How does Milvus differ from a traditional relational database for storing vector data? 29. What is the difference between IVF_FLAT and HNSW indexes in Milvus? 30. How do you choose the right index type for a given Milvus workload? 31. When should you use IVF_PQ instead of IVF_FLAT? 32. How do you troubleshoot slow search performance in Milvus? 33. What is the difference between growing segments and sealed segments in Milvus? 34. How does Milvus handle search on data that hasn't been indexed yet? 35. Explain the internal working of Milvus's segment sealing and index-building pipeline? 36. What is the difference between Milvus and Pinecone? 37. How do you implement multi-tenancy in Milvus? 38. Why use Partitions instead of separate Collections for data isolation? 39. What is the difference between Strong and Bounded Staleness consistency in Milvus? 40. How does Milvus's Timestamp Oracle (TSO) ensure operation ordering? 41. When would you choose GPU-accelerated indexes (like CAGRA) over CPU-based indexes? 42. How do you configure replicas in Milvus for read scalability? 43. What is the difference between the Coordinator services and Worker nodes in Milvus's architecture? 44. Explain the lifecycle of a search request in a distributed Milvus cluster? 45. How do you optimize Milvus for cost at billion-vector scale? 46. What is the difference between Milvus's tiered storage and traditional single-tier storage? 47. How does Milvus's hybrid search combine dense and sparse vector results? 48. Why should you avoid over-partitioning a Milvus collection? 49. What is the difference between Milvus 2.x's coordinator-based architecture and the direction of Milvus 3.0's lake-native design? 50. How do you troubleshoot out-of-memory errors when loading a large Milvus collection?

1. What is Milvus?

Milvus is an open-source, cloud-native vector database built for storing, indexing, and searching massive collections of vector embeddings, the numerical representations of text, images, audio, and other unstructured data that AI models produce. It's developed by Zilliz and hosted as a graduated ...

Read full answer

2. What is a vector database, and how does Milvus fit that category?

A vector database is a system purpose-built to store high-dimensional numerical vectors and efficiently find the vectors most similar to a given query vector, using approximate nearest neighbor (ANN) search rather than exact matching. This is a fundamentally different retrieval pattern than a tra...

Read full answer

3. What is a Collection in Milvus?

A Collection is Milvus's top-level container for data, roughly analogous to a table in a relational database. It has a defined schema (field names, data types, and which field(s) hold vector embeddings) and holds all the entities, individual records, inserted into it. from pymilvus import MilvusC...

Read full answer

4. What is a Partition in Milvus?

A Partition is a logical subdivision within a Collection, letting related entities be grouped together so a search or load operation can be scoped to just the relevant subset instead of the entire collection. client.create_partition(collection_name="products", partition_name="electronics") client...

Read full answer

5. What is a Segment in Milvus?

A Segment is the fundamental unit of storage and indexing inside Milvus, sitting below Collections and Partitions in the data hierarchy. As data is inserted, it accumulates into a growing segment held in memory; once that segment reaches a size or time threshold, it's sealed , flushed to persiste...

Read full answer

6. What is an embedding vector, in the context of Milvus?

An embedding vector is a fixed-length array of floating-point numbers produced by a machine learning model to represent a piece of data, text, an image, audio, or something else, in a way that captures its semantic meaning geometrically: items with similar meaning end up as vectors that are close...

Read full answer

7. What is an index in Milvus, and why is it needed?

An index in Milvus is a specialized data structure built over a vector field that dramatically speeds up similarity search by avoiding a brute-force comparison against every single stored vector. Without an index, finding the nearest neighbors of a query vector requires computing the distance to ...

Read full answer

8. What are the main vector index types Milvus supports?

Milvus supports several index families, each suited to different priorities around speed, memory usage, accuracy, and dataset scale. Index type Best suited for FLAT Exact, brute-force search; small datasets or when 100% recall is required. IVF_FLAT / IVF_SQ8 / IVF_PQ Balancing speed, memory, and ...

Read full answer

9. What is HNSW, and why is it commonly used in Milvus?

HNSW (Hierarchical Navigable Small World) is a graph-based approximate nearest neighbor algorithm that organizes vectors into multiple layers of a navigable graph, with sparser, "long-range" connections at higher layers and denser, "short-range" connections at lower layers. A search starts at the...

Read full answer

10. What are the similarity/distance metrics Milvus supports?

The metric type determines how "closeness" between two vectors is mathematically defined, and it has to match how the embedding model that produced the vectors was actually trained to be meaningful. Metric Typical use L2 (Euclidean distance) Straight-line distance between vectors; common for many...

Read full answer

11. What is the difference between L2 and Cosine similarity in Milvus?

L2 (Euclidean) distance measures the straight-line distance between two vectors' endpoints in space, taking both their direction and their magnitude into account. Cosine similarity measures only the angle between two vectors, ignoring their magnitude entirely, so two vectors pointing in the same ...

Read full answer

12. What is Milvus Lite?

Milvus Lite is a lightweight, embedded version of Milvus distributed as a Python library, installable with a plain pip install , that runs entirely within a single Python process with no separate server, Docker container, or Kubernetes cluster required. from pymilvus import MilvusClient # no serv...

Read full answer

13. What is Zilliz Cloud?

Zilliz Cloud is the fully managed, hosted version of Milvus, built and operated by Zilliz (Milvus's original creator), for teams that want Milvus's capabilities without operating the underlying infrastructure themselves. It's offered in multiple deployment models to fit different operational pref...

Read full answer

14. What are the main components of Milvus's architecture?

A distributed Milvus deployment follows a disaggregated, cloud-native design organized into four broad layers, each independently scalable. Access layer (Proxy) - stateless entry point that receives client requests, validates them, and routes them to the right internal services. Coordinator servi...

Read full answer

15. What is the Proxy component in Milvus?

The Proxy is the stateless access-layer service that every client request passes through first. It validates incoming requests against the collection's schema, handles authentication, and routes each request to the appropriate coordinator or worker nodes, without holding any of the actual vector ...

Read full answer

16. What is a Query Node in Milvus?

A Query Node is the worker component that actually executes vector similarity searches and scalar queries. It loads assigned segments, growing and sealed alike, into memory (or accesses them via memory-mapped files) and searches against them when a query request arrives. QueryCoord assigns segmen...

Read full answer

17. What is a Data Node in Milvus?

A Data Node ingests newly written data, consuming insert/delete messages from the write-ahead log, buffering them in memory, and eventually flushing that buffered data to object storage as binlog files once a growing segment is sealed. Data Nodes handle the write path specifically, distinct from ...

Read full answer

18. What is loading a collection in Milvus, and why is it required before search?

Before a collection can be searched, its relevant segments need to be loaded into memory (or made accessible via mmap) on one or more Query Nodes; a collection that exists and has data inserted into it isn't automatically searchable until this explicit load step happens. client.load_collection(co...

Read full answer

19. What is a scalar field in Milvus, and how is it used with vector search?

A scalar field holds ordinary, non-vector data, strings, integers, booleans, JSON, and so on, defined alongside a collection's vector field(s). Scalar fields let a search combine vector similarity with traditional filtering conditions in a single query, rather than requiring similarity search and...

Read full answer

20. What is dynamic schema in Milvus?

Dynamic schema lets a collection accept and store additional key-value fields on each inserted entity beyond what's explicitly declared in the collection's schema, useful when the exact set of metadata fields isn't fully known or fixed ahead of time. schema = client.create_schema(enable_dynamic_f...

Read full answer

21. What are Milvus's consistency levels?

Milvus offers four tunable consistency levels, letting an application trade off read freshness against latency and throughput on a per-query basis rather than being locked into one fixed guarantee for the whole system. Level Guarantee Strong Reads always see the absolute latest committed writes. ...

Read full answer

22. What is a Replica in Milvus?

A Replica is an additional, independently loaded copy of a collection's segments onto a separate set of Query Nodes, used to increase both search throughput (more replicas can serve concurrent queries in parallel) and fault tolerance (if one replica's Query Nodes go down, another replica can cont...

Read full answer

23. What is hybrid search in Milvus?

Hybrid search combines results from more than one search signal, most commonly a dense semantic vector (capturing overall meaning) and a sparse vector or keyword-style signal (capturing exact term matches), into a single ranked result set, rather than relying on just one retrieval method alone. f...

Read full answer

24. What is a sparse vector in Milvus?

A sparse vector is a vector representation where the vast majority of dimensions are zero, typically representing something like term frequency across a very large vocabulary (tens of thousands of possible terms), with only the terms actually present in a given piece of text having non-zero value...

Read full answer

25. What are the main use cases for Milvus?

Milvus's core capability, fast similarity search over large vector collections, applies across a range of applications built around finding "things like this." Semantic search - finding documents or passages related to a query by meaning, not just keyword overlap. Retrieval-augmented generation (...

Read full answer

26. Explain the data flow of an insert operation in Milvus, from client to searchable segment?

An insert in Milvus goes through several stages before the data is durably stored and fully searchable through an optimized index, reflecting the architecture's separation of the write path from the read/search path. sequenceDiagram participant Client participant Proxy participant RootCoord parti...

Read full answer

27. Why does Milvus separate compute and storage in its architecture?

Coupling compute and storage tightly, where the same nodes both hold data on local disks and perform query processing, forces the two to scale together even when their actual demands diverge: a workload might need much more query throughput without needing proportionally more storage, or vice ver...

Read full answer

28. How does Milvus differ from a traditional relational database for storing vector data?

A traditional relational database is optimized for exact-match and range queries over structured rows, using B-tree or hash indexes that work well for equality and ordering but provide no efficient way to answer "find the rows most similar to this one" for high-dimensional vector data; some relat...

Read full answer

29. What is the difference between IVF_FLAT and HNSW indexes in Milvus?

IVF_FLAT clusters vectors into a configured number of buckets (via k-means-style clustering) at index-build time; a search first identifies the most promising nearby clusters, then does an exact, brute-force comparison only within those clusters. HNSW instead builds a multi-layer navigable graph ...

Read full answer

30. How do you choose the right index type for a given Milvus workload?

Index selection in Milvus generally comes down to weighing dataset size, available memory, latency requirements, and acceptable recall against each other, since no single index type wins on every axis simultaneously. Small datasets or when exact results matter - FLAT, brute-force search with no a...

Read full answer

31. When should you use IVF_PQ instead of IVF_FLAT?

Both start with the same clustering step, but they differ in how they store vectors within each cluster: IVF_FLAT keeps the full, uncompressed vector for exact comparison within a cluster, while IVF_PQ (Product Quantization) compresses each vector into a much smaller quantized representation, tra...

Read full answer

32. How do you troubleshoot slow search performance in Milvus?

Slow search in Milvus usually traces back to one of a handful of well-known causes, each with a fairly direct diagnostic path. Check whether an appropriate index actually exists - a collection searched without an index (or accidentally falling back to FLAT) performs full brute-force comparison, w...

Read full answer

33. What is the difference between growing segments and sealed segments in Milvus?

A growing segment is the current, mutable, in-memory buffer receiving newly inserted data for a given shard; it hasn't yet reached the threshold to be finalized. A sealed segment is immutable and has been flushed to persistent object storage, at which point it becomes eligible for full index buil...

Read full answer

34. How does Milvus handle search on data that hasn't been indexed yet?

Rather than making freshly inserted data invisible to search until its sealed segment's full index finishes building, a process that can take real time for a large segment, Milvus makes growing-segment data searchable immediately, using either a lightweight, quickly-built temporary index or a str...

Read full answer

35. Explain the internal working of Milvus's segment sealing and index-building pipeline?

Turning freshly written data into a fully-optimized, searchable index involves a coordinated handoff between several components, each responsible for one stage of the pipeline. flowchart TD A[DataNode buffers inserts in growing segment] --> B{Sealing threshold reached? size/time/manual} B -->|No|...

Read full answer

36. What is the difference between Milvus and Pinecone?

Both are purpose-built vector databases supporting approximate nearest neighbor search, but they differ meaningfully in deployment model and openness. Pinecone is a fully managed, closed-source SaaS product with no self-hosted option; Milvus is open-source (Apache 2.0) and can be self-hosted, run...

Read full answer

37. How do you implement multi-tenancy in Milvus?

Milvus supports multi-tenancy at a few different levels of isolation, and the right choice depends on how many tenants exist and how strictly their data needs to be separated. Approach Best for Partition per tenant Many tenants sharing a schema, where lightweight logical isolation within one coll...

Read full answer

38. Why use Partitions instead of separate Collections for data isolation?

Both provide a way to logically separate data, but they carry different overhead. A Collection has its own independent schema, indexes, and load/release lifecycle; creating many Collections means managing many independent sets of that metadata and configuration. A Partition shares its parent Coll...

Read full answer

39. What is the difference between Strong and Bounded Staleness consistency in Milvus?

Strong consistency guarantees a search always reflects every write that had committed before the search was issued, no exceptions, which requires the search to wait for confirmation that all relevant recent writes are visible before returning. Bounded Staleness relaxes that guarantee slightly: a ...

Read full answer

40. How does Milvus's Timestamp Oracle (TSO) ensure operation ordering?

The Timestamp Oracle, managed by RootCoord, assigns a globally increasing timestamp to every write operation as it enters the system, giving Milvus a consistent, cluster-wide notion of "before" and "after" for operations that might otherwise arrive at different nodes at slightly different real-wo...

Read full answer

41. When would you choose GPU-accelerated indexes (like CAGRA) over CPU-based indexes?

GPU-accelerated indexes leverage a GPU's massive parallelism for both building and searching an index, which can dramatically outperform CPU-based indexes for the specific workloads GPUs excel at: very high query throughput requirements, very large-scale index builds, and dense, high-dimensional ...

Read full answer

42. How do you configure replicas in Milvus for read scalability?

Replicas are configured at load time, specifying how many independent copies of a collection's (or specific partitions') segments should be loaded across separate sets of Query Nodes. client.load_collection( collection_name="products", replica_number=3 ) QueryCoord handles distributing each repli...

Read full answer

43. What is the difference between the Coordinator services and Worker nodes in Milvus's architecture?

Coordinator services (RootCoord, DataCoord, QueryCoord, IndexCoord) manage cluster state and orchestrate operations, deciding what should happen and where, but they don't process the actual vector data themselves. Worker nodes (QueryNode, DataNode, IndexNode) are the components that do the real d...

Read full answer

44. Explain the lifecycle of a search request in a distributed Milvus cluster?

A single search call from a client fans out across multiple components and, typically, multiple Query Nodes in parallel before being merged back into one final ranked result list. sequenceDiagram participant Client participant Proxy participant QueryCoord participant QN1 as QueryNode A participan...

Read full answer

45. How do you optimize Milvus for cost at billion-vector scale?

At billion-vector scale, cost is typically dominated by memory (for loaded indexes) and compute (Query Node count), so optimization mostly means reducing how much has to stay in expensive, fast memory without unacceptably sacrificing recall or latency. Use quantized or disk-based indexes where ap...

Read full answer

46. What is the difference between Milvus's tiered storage and traditional single-tier storage?

Traditional single-tier storage treats all of a collection's data uniformly, the same storage medium and access path regardless of whether a given piece of data is queried constantly or almost never. Tiered storage instead classifies data based on actual access patterns and places "hot" (frequent...

Read full answer

47. How does Milvus's hybrid search combine dense and sparse vector results?

Hybrid search runs separate approximate nearest neighbor searches against each configured vector field (typically one dense, one sparse), retrieving a candidate list from each independently, and then combines those separate ranked lists into one final result using a configurable reranking strateg...

Read full answer

48. Why should you avoid over-partitioning a Milvus collection?

Partitions are lightweight compared to separate Collections, but they aren't free: each partition still carries some metadata overhead, and Milvus's practical guidance caps the reasonable number of partitions per collection well below what an unbounded "one partition per user" scheme might naivel...

Read full answer

49. What is the difference between Milvus 2.x's coordinator-based architecture and the direction of Milvus 3.0's lake-native design?

Milvus 2.x's architecture, the stable, widely-deployed foundation covered throughout most of this material, centers on the coordinator/worker split described earlier: data is ingested into Milvus's own managed storage (object storage plus Milvus-controlled segment and index formats), and applicat...

Read full answer

50. How do you troubleshoot out-of-memory errors when loading a large Milvus collection?

An out-of-memory error during collection loading almost always comes down to the loaded data (segments plus their indexes) exceeding the available memory across the Query Nodes assigned to hold it, and the fix generally involves either reducing what needs to be loaded or increasing available capa...

Read full answer

«
»

Comments & Discussions