VFlash: Fast, Accurate Visual Planning via Flash Primitive Decoding
u_Unrolled
D22: AI System Design Bank · Case Study: Real-time Vector Database at Scale — Segments, Filtered Search and Deletion Guarantees at Staff Level
Phase 9/Domain 22/Lesson 50

Case Study: Real-time Vector Database at Scale — Segments, Filtered Search and Deletion Guarantees at Staff Level

30 min read·Staff+ Tier· Unrolled Pro
Case Study: Real-time Vector Database at Scale — Segments, Filtered Search and Deletion Guarantees at Staff Level

You already know: embeddings and approximate nearest-neighbour (ANN) search, the enterprise RAG case, and the guardrail gateway. This case designs the vector database itself at a billion vectors with continuous writes. ANN indexes (graph-based ones are the common choice) find close vectors quickly by searching only a small part of the data, trading a little recall (the share of true nearest neighbours found) for speed. The design questions: how to fit a billion vectors in memory, how to make writes visible within seconds when indexes are slow to build, how to filter without losing recall, how to keep fan-out from ruining tail latency, and how to guarantee deletes.

How to read this lesson. No code, on purpose. Numbers marked assumed are assumptions you state out loud.


1. The prompt, and the questions that change the design

A mid-level answer: "use an HNSW index, shard it, and put a cache in front". A staff candidate notes that graph indexes are expensive to build and awkward to update, so real-time writes need a log-structured design (a fresh, small, brute-force-searchable segment plus sealed, indexed segments). They notice that filters are where recall quietly collapses, that fan-out across shards turns rare slow shards into common slow queries, and that deletes are a guarantee, not a best effort.

Assumptions you state:

That's the preview. The full lesson, with its code and exercises, is part of Unrolled Pro.
Staff AI & Pro Tier Lesson

Unlock "Case Study: Real-time Vector Database at Scale — Segments, Filtered Search and Deletion Guarantees at Staff Level"

The foundations are free forever. Unrolled Pro unlocks the complete lesson, production architectures, and 55 battle-tested ML system design case studies.

Everything included with Pro:
All 234+ Deep-Dive Lessons across transformer internals, inference, RAG & agents
55 Staff-Level ML & System Design Case Studies with mathematical capacity estimates
AI Engineer Sheet & Exercises with worked solutions, self-checks, and code
100 Landmark Research Papers guided walkthroughs & progress tracking
14-Day Money-Back Guarantee — 100% full refund if you aren't satisfied
View Plans & Unlock All Lessons

From ₹167/mo (~$2/mo) · Cancel anytime · Instant activation

100% Risk-Free: 14-day no-questions-asked money-back guarantee