Identify the workload pattern where a traditional ANN-indexed vector database is the wrong tool, and a log-structured or batch-rebuild approach fits better.
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
ANN indexes break under billions of writes per day with seconds fresh visibility. HNSW tombstones accumulate, IVF centroids drift.
Imagine an enormous library where the librarians spend most of their time carefully placing books on the right shelves so you can find any book in seconds. Now imagine someone keeps shipping in truckloads of new books every minute. The librarians cannot keep up; the shelf order falls apart; queries get slow and miss books. The honest fix is to stop pretending the library can absorb live truckloads. Stack the new books on the loading dock (the log), serve recent queries by scanning the dock, and once a day shut down briefly to re-shelve everything onto the proper shelves (the batch rebuild). Vector databases work the same way under extreme write loads.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: ANN's read-heavy design assumption, HNSW's tombstone failure mode under extreme writes, IVF's centroid drift failure mode, the silent recall degradation, the log-structured + batch ANN rebuild pattern with brute force recent window, and why the other options describe correct ANN territory.
| Workload | Right architecture | Why |
|---|---|---|
| 1M static docs, low QPS | Single HNSW or IVF index | Original ANN use case; modest update rate |
| 100M reads, weekly batch upserts | Managed vector DB with periodic compaction | Upsert cadence within compaction window |
| Billions of writes/day, seconds fresh | Log-structured ingest + batch ANN rebuild | ANN maintenance cannot keep up at this rate |
| 10M vectors, recall ≥ 0.95 | HNSW with high ef_search OR IVF with high nprobe | Recall target is tunable, not a hard wall |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Trying to absorb extreme write workloads into a live HNSW or IVF index. The index degrades faster than maintenance can repair it, recall drops silently, and the operational story unravels.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.