Prev Next

Database / Milvus Vector database Interview questions

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| A B -->|Yes| C[DataNode flushes segment to object storage as binlogs] C --> D[DataCoord marks segment as sealed, schedules index build] D --> E[IndexNode reads sealed segment from object storage] E --> F[IndexNode builds index, e.g. HNSW/IVF_PQ] F --> G[Index artifacts persisted to object storage] G --> H[QueryCoord performs handoff: assigns segment+index to QueryNode] H --> I[QueryNode loads segment and index into memory/mmap] I --> J[Segment now served via optimized index for future queries]

Crucially, the sealed segment remains fully queryable via brute-force scan throughout the index-building process; index building runs asynchronously and doesn't block reads, so a slow or even temporarily failed index build doesn't make that segment's data unavailable, it just means queries against it are less optimized (falling back to brute-force) until the proper index is ready or the build is retried.

This asynchronous, non-blocking design is deliberate: it decouples data durability and searchability (which need to happen quickly, as covered by growing/sealed segment search) from index optimization (which is comparatively expensive and doesn't need to happen synchronously with every write) letting Milvus prioritize write availability and basic search correctness over immediately having every byte of data behind a fully-tuned index.

Is a sealed segment queryable while its full index is still being built?
Which component performs the handoff that assigns a newly indexed segment to a Query Node?

More Related questions...

What is Milvus? What is a vector database, and how does Milvus fit that category? What is a Collection in Milvus? What is a Partition in Milvus? What is a Segment in Milvus? What is an embedding vector, in the context of Milvus? What is an index in Milvus, and why is it needed? What are the main vector index types Milvus supports? What is HNSW, and why is it commonly used in Milvus? What are the similarity/distance metrics Milvus supports? What is the difference between L2 and Cosine similarity in Milvus? What is Milvus Lite? What is Zilliz Cloud? What are the main components of Milvus's architecture? What is the Proxy component in Milvus? What is a Query Node in Milvus? What is a Data Node in Milvus? What is loading a collection in Milvus, and why is it required before search? What is a scalar field in Milvus, and how is it used with vector search? What is dynamic schema in Milvus? What are Milvus's consistency levels? What is a Replica in Milvus? What is hybrid search in Milvus? What is a sparse vector in Milvus? What are the main use cases for Milvus? Explain the data flow of an insert operation in Milvus, from client to searchable segment? Why does Milvus separate compute and storage in its architecture? How does Milvus differ from a traditional relational database for storing vector data? What is the difference between IVF_FLAT and HNSW indexes in Milvus? How do you choose the right index type for a given Milvus workload? When should you use IVF_PQ instead of IVF_FLAT? How do you troubleshoot slow search performance in Milvus? What is the difference between growing segments and sealed segments in Milvus? How does Milvus handle search on data that hasn't been indexed yet? Explain the internal working of Milvus's segment sealing and index-building pipeline? What is the difference between Milvus and Pinecone? How do you implement multi-tenancy in Milvus? Why use Partitions instead of separate Collections for data isolation? What is the difference between Strong and Bounded Staleness consistency in Milvus? How does Milvus's Timestamp Oracle (TSO) ensure operation ordering? When would you choose GPU-accelerated indexes (like CAGRA) over CPU-based indexes? How do you configure replicas in Milvus for read scalability? What is the difference between the Coordinator services and Worker nodes in Milvus's architecture? Explain the lifecycle of a search request in a distributed Milvus cluster? How do you optimize Milvus for cost at billion-vector scale? What is the difference between Milvus's tiered storage and traditional single-tier storage? How does Milvus's hybrid search combine dense and sparse vector results? Why should you avoid over-partitioning a Milvus collection? What is the difference between Milvus 2.x's coordinator-based architecture and the direction of Milvus 3.0's lake-native design? How do you troubleshoot out-of-memory errors when loading a large Milvus collection?
Show more question and Answers...


Comments & Discussions