HLD-322·Search & Indexing
Hard · 1,500 ptsSharded HNSW Vector Database & Metadata Filter Engine
Design a Pinecone / Milvus multi-tenant vector database serving low-latency ANN top-K cosine similarity queries with real-time vector upserts and deletes.
Max p99
≤ 55 ms
Availability
≥ 99.5%
Budget
≤ $8,900
Functional Requirements
- FR-1POST /indexes/{namespace_id}/query — Executes ANN top-K vector search with metadata predicates.
- FR-2POST /indexes/{namespace_id}/upsert — Writes fresh embeddings into write-ahead delta buffer + HNSW segments.
- FR-3PATCH & DELETE /indexes/{namespace_id}/query — Updates, cancels, or deletes namespace_id records and immediately invalidates or updates cached state (read-after-write).
- FR-4Deleted/updated vectors must reflect immediately (read-after-write tombstones) and survive 6x storage brownouts.
Workload Profile
Steady AI Production45,000 ANN Query RPS / 8,000 Vector Upsert RPS
Agentic Burst Peak124,000 Query RPS / 22,000 Upsert RPS
Active Working Set44 GB quantized PQ/HNSW graph layers in memory
Latency Gatep99 <= 55 ms across segment compactions & storage brownouts
Consistency Model
Read-after-write via fresh in-memory delta segment + tombstone bitmap merged at query time.
Solutions Locked
Sign in and either achieve AC or complete 3 official submissions on this question to inspect community diagrams and writeups.
Loading solutions...
Submission History (0)Select to replay
No submissions yet
Click Submit in the top bar to evaluate against all 7 judge cases and save each run here.
Design Write-up
0 boxes · 0 edges
0 words