Milvus Vector Database

repository·master·Indexed 12 days ago

https://github.com/milvus-io/milvus

A high-performance, distributed vector database built for scaling AI applications, enabling efficient similarity search across billions of vectors. Includes documentation for the Go SDK (v3.0.x), standalone binary deployment, Kubernetes migration from v2.1.x to v2.2.0, log exportation, and system monitoring using Prometheus and Grafana.

Tokens
289.8K
Snippets
517
Records
1.1K
Agent score
99%

What's inside Milvus

  1. What is Milvus?

    master

    Milvus is a high-performance, distributed vector database designed for scaling AI applications. It manages unstructured data (text, images, multi-modal) by organizing it into vectors and allows for efficient similarity searches.

    Key architectural features include:

    • Distributed & K8s-native: Separates compute and storage for horizontal scaling.
    • Hardware Acceleration: Supports CPU/GPU acceleration for high-performance vector search.
    • Deployment Modes:
      • Standalone: Single machine deployment.
      • Milvus Lite: A lightweight version for local Python development.
      • Zilliz Cloud: A fully managed service (Serverless, Dedicated, or BYOC options).
    • Search Capabilities: Supports dense vector semantic search, sparse vector full-text search (BM25, SPLADE, BGE-M3), and hybrid search.
  2. What is Milvus?

    master

    Milvus is an open-source vector database designed for AI applications and vector similarity search, accelerating unstructured data retrieval.

    Key characteristics:

    • Cloud-Native Architecture: Milvus 2.0 uses a storage-and-compute separation design where components are stateless, enhancing elasticity and flexibility.
    • High Performance: Capable of millisecond-level searches across trillion-scale vector datasets.
    • Hybrid Querying: Supports multi-vector search (up to 10 vector fields per Collection) with reranking strategies like Reciprocal Rank Fusion (RRF) and Weighted Scoring.
    • Lambda Architecture: Supports both stream and batch processing for data storage, balancing real-time efficiency with batch processing throughput.
    • Scalability: Provides component-level scalability for precise resource expansion.
  3. Milvus Ecosystem and Integrations

    master

    Milvus integrates with a wide range of AI development tools and data pipelines:

    • AI Frameworks: LangChain, LlamaIndex, OpenAI, and HuggingFace.
    • Embedding Utilities: Use pymilvus[model] to transform unstructured data into vector embeddings and leverage reranking models.
    • Administration & Debugging:
      • Attu: GUI-based administration.
      • Birdwatcher: System debugging.
      • Prometheus/Grafana: Monitoring.
    • Data Management:
      • Milvus CDC: Data synchronization.
      • VTS: Data migration.
    • Data Connectors: Spark, Kafka, Fivetran, and Airbyte.
  4. Client-Side Telemetry Implementation Status

    master

    As of the current design specification, client-side telemetry is implemented in the Go SDK only.

    While protobuf stubs may exist in other language implementations, the following SDKs do not currently implement the client-side telemetry logic:

    • pymilvus (Python)
    • Java SDK
    • Node.js SDK
    • Rust SDK

    When evaluating client coverage for telemetry, only Go SDK clients should be considered supported.

  5. What is an External Table in Milvus

    master
    An External Table (or External Collection) is a special type of collection that allows Milvus to query data stored in external systems (like S3 or HDFS) directly without copying it into Milvus local storage. It acts as a query layer over your existing data lake, providing a unified interface for vector and scalar queries while maintaining zero data copy.
  6. Overview of Milvus Snapshots

    master

    Milvus snapshots allow you to create point-in-time copies of collections. This feature is used for data backup, versioning, and restoration. A snapshot captures the complete state of a collection at a specific timestamp, including:

    • Vector data (binlogs)
    • Metadata (schema, partition information, and collection properties)
    • Indexes (index metadata and file paths)
    • Deletion logs (deltalogs)
  7. What is an External Table (External Collection)?

    master

    An External Table (also known as an External Collection) is a specialized data collection in Milvus that allows you to query data residing in external storage systems like S3, Iceberg, or Delta Lake without importing or copying the data into Milvus local storage.

    It acts as a query layer over your existing data lake, providing a unified interface for vector similarity search, scalar filtering, and hybrid search while maintaining compatibility with standard Milvus query APIs.

  8. What is Channel Exclusive Mode in Milvus

    master

    Channel Exclusive Mode is a load balancing strategy introduced in Milvus 2.6.0 for the QueryCoord service. Unlike traditional balancing that distributes channels and segments across QueryNodes without strict isolation, Channel Exclusive Mode assigns each channel exclusively to a dedicated set of Read-Write (RW) nodes.

    Key Benefits:

    • Predictable Performance: Reduces resource contention by preventing multiple channels from competing for the same QueryNode resources.
    • Improved Isolation: Ensures channels run on separate node groups to prevent interference.
    • Dynamic Adaptation: The system automatically initializes exclusive metadata when conditions are met and falls back to traditional score-based balancing if exclusivity constraints (like insufficient nodes) cannot be satisfied.
  9. Understand Query View (QueryView) versioning

    master

    The QueryView versioning tracks how data is distributed across nodes at the ShardOnReplica level. The version is a tuple (D, Q) ordered lexicographically:

    • D (Data Dimension): Increases when the underlying DataVersion changes (storage-level changes like new flushes).
    • Q (Query Dimension): Increases when data is redistributed without changing the underlying data (load-level changes like Balancing or Recovery).

    Lifecycle Behavior:

    • When D increases (new data arrives), Q is reset to 1 because the new data must be redistributed.
    • An increase in Q represents pure redistribution (e.g., moving a segment from Node1 to Node2 during a balance operation) and does not change the DataVersion.
    • Rollbacks are not allowed; the version number can only increase non-strictly.
  10. Understanding Online Schema Evolution in Milvus

    master

    Milvus implements an online schema evolution protocol inspired by the F1 schema change model. Instead of treating schema mutations as a single broadcasted replacement, schema changes are represented as ordered states. This ensures that in a distributed environment, different nodes (Proxy, QueryNode, DataCoord, etc.) can handle the transition without causing data corruption or system failures.

    Key aspects of the evolution model include:

    • Asynchronous Propagation: Schema changes propagate across the distributed system asynchronously.
    • Visibility Gates: User-visible behavior (read/query APIs) is only published after all required readiness gates (data backfill, index readiness, etc.) are satisfied.
    • Invisible State: New fields can exist in an invisible state where they are writable by the data path but not yet usable by user read/query APIs.
    • Observability: Users can use DescribeCollection to observe the progress of a schema change via states like adding or dropping.