Commands icon
If icon
SlackIncomingWebhook icon
Schedule icon

Milvus Vector Database Compaction Backlog and Segment Growth Sentinel

Monitors Milvus vector database for compaction backlogs and uncompacted segment growth to prevent query latency spikes.

Categories
AIData

How it works

This workflow queries the Prometheus /metrics endpoint of the Milvus DataCoord component (default port 9091) to monitor the milvus_datacoord_compacting_segment_count metric. In Milvus, continuous insert and delete operations create numerous small segments and tombstone records. Compaction merges small segments into larger indexed files (e.g. 512MB) to maintain fast index scans and clean deleted entities. When compaction falls behind, query nodes must scan dozens of unoptimized segments, causing vector query latency degradation. This workflow tracks compaction health and triggers alerts when backlogs build up.

What you get

  • Continuous monitoring of Milvus background compaction efficiency.
  • Prevents vector search latency regression caused by segment fragmentation.
  • Actionable visibility into DataCoord compaction backlogs.

Who it's for

  • MLOps and Big Data Platform Engineers maintaining distributed Milvus clusters.
  • SREs overseeing AI vector search infrastructure.

Why orchestrate this with Kestra

  • Proactive Performance Sentinel: Detects fragmentation issues before search latency SLA violations occur.
  • Native Orchestration: Runs periodic health audits alongside AI ETL and data ingestion pipelines.
  • Direct Alert Dispatch: Delivers diagnostic information directly to AI platform channels.

Prerequisites

  • Milvus cluster with DataCoord metrics endpoint enabled and accessible.
  • Secret SLACK_WEBHOOK configured in Kestra.

Quick start

  1. Import the blueprint.
  2. Enter your Milvus metrics URL.
  3. Run the workflow to inspect current compaction backlog metrics.

How to extend

  • Trigger a manual compaction request via Milvus REST API (/v2/vectordb/entities/compact) when backpressure clears.
  • Correlate with QueryNode memory consumption.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.