BlogsMilvusReal-time Query

Real-time Query

Real-time Query

4
posts
2020–2022

Milvus 2.0 architecture enables real-time data query by orchestrating data loading, management, and query execution across various components. Data is loaded to query nodes from both streaming (log broker) and historical (object storage) sources. Query nodes manage historical data in sealed segments and incremental data in growing segments, with mechanisms for load balancing and failover. Incremental data is filtered by partition using flowgraphs. Real-time queries are processed via query messages. This post details the query task scheduling mechanism, including data block management, task queues, and device selection based on estimated completion time, with optimizations for multi-GPU environments and performance improvements through caching and data loading/computation overlap.

2022

Using the Milvus Vector Database for Real-Time Query

4/11/2022

This post details the real-time query mechanism in Milvus 2.0. It explains how data is loaded to query nodes from log brokers and object storage, managed in sealed and growing segments, and how load balancing and failover are handled. It describes the role of flowgraphs in filtering incremental data by partition and the process of handling query messages, including service timestamps, guarantee timestamps, and the 'local reduce' operation for de-duplication. Finally, it outlines the 'global reduce' operation performed by the proxy to consolidate results from multiple query nodes and ensure query completeness before returning to the SDK.

How Is Data Processed in a Vector Database?

3/28/2022

This post provides a deep dive into how data is processed within Milvus, elaborating on the MsgStream interface for data production and consumption, the flowgraph mechanism for filtering data by collection in shared channels, and the distinct paths for writing and reading data. It also covers the handling of DDL operations and the process of building indexes, offering a comprehensive view of Milvus's internal data handling mechanisms.

Milvus 2.0 - A Glimpse at New Features

1/27/2022

This post introduces entity deletion in Milvus 2.0, explaining its asynchronous and logical nature. It details how deleted entities are marked and become invisible based on the consistency level. The post also elaborates on the four consistency levels (STRONG, EVENTUALLY, BOUNDED, SESSION) and demonstrates the performance difference between STRONG and BOUNDED consistency through latency measurements. Additionally, it introduces the 'handoff' feature, which automatically loads indexed segments to replace streaming data, enhancing search performance.

2020

How Does Milvus Schedule Query Tasks

3/3/2020

This post details the query task scheduling mechanism in Milvus, explaining how query tasks are created for each data block (TableFile), assigned to computing devices (CPU/GPU) based on estimated completion time, and processed through task queues. It introduces concepts like Data blocks (TableFile) and Task queues (TaskTable). Performance optimizations discussed include LRU caching for data blocks and overlapping data loading with computation using pipelining. It also highlights a problem with Round Robin scheduling on multi-GPU setups with different data copy speeds and the solution of incorporating copy time into device selection. Future work includes handling more complex hardware environments and query optimization through merging queries.