Blueprint #01
Real-Time AI
Change Data Capture (CDC) to Vector Index
Automatically keeps vector database indices synchronized with transactional database updates (inserts, updates, deletes) in sub-5 seconds without periodic batch re-indexing.
Key Specifications
- Source: PostgreSQL Write-Ahead Log (WAL) via Debezium
- Stream Transport: Apache Kafka / Redpanda partitioned by Primary Key
- Worker Layer: Stateless Python/FastAPI async workers with Dead-Letter Queues (DLQ)
- Vector Target: Qdrant / pgvector with HNSW indexed vectors
┌─────────────────────────┐
│ Postgres OLTP Database │
└────────────┬────────────┘
│ (WAL Stream)
▼
┌─────────────────────────┐
│ Debezium Kafka Connect │
└────────────┬────────────┘
│ (JSON/Avro)
▼
┌─────────────────────────┐
│ Kafka Topic (cdc.tables)│
└────────────┬────────────┘
│
┌──────┴──────┐
▼ ▼
┌───────────┐ ┌───────────┐
│ Worker 1 │ │ Worker 2 │ (Chunk & Embed)
└─────┬─────┘ └─────┬─────┘
└──────┬──────┘
▼
┌─────────────────────────┐
│ Qdrant Vector Cluster │
└─────────────────────────┘