All Questions
Vector Search hard

A news search service must make articles searchable within 5 seconds of publication. The main HNSW index holds 300M vectors. Inserting directly into it at peak causes p99 spikes from insert cost and lock contention, and a full rebuild takes hours. Which design meets the freshness target?

  1. A Send new articles to a small delta segment, search it with the main index, merge, and compact on a schedule.
  2. B Rebuild the main index every few seconds on a standby replica and swap it in, so readers never see inserts in flight.
  3. C Insert directly into the main index with a much lower ef_construction so each insert finishes fast enough at peak.
  4. D Batch new articles and insert into the main index every 5 seconds, since batching removes most per-insert graph cost.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions