HLDArena
HLD-331·Caching & Consistency
Hard · 1,500 pts

Dual Offline/Online ML Feature Store & Low-Latency Serving

Design a Tecton / Uber Michelangelo-style ML feature platform combining microsecond online entity-feature vector lookups for live fraud/ranking inference with streaming sliding-window aggregations and point-in-time-correct offline training parity.

Max p99
≤ 48 ms
Availability
≥ 99.7%
Budget
≤ $9,000

Functional Requirements

  • FR-1POST /v1/features/online-get — Fetches batched multi-view feature vectors for entity_id keys in < 15 ms p50 / < 45 ms p99.
  • FR-2POST /v1/features/stream-ingest — Updates real-time sliding-window counters (5m/1h spend, clicks) and writes through to online KV + offline log.
  • FR-3PUT /v1/feature-views/{view_id}/backfill — Publishes new batch-computed feature versions without blocking or thrashing live online reads.
  • FR-4Must prevent training/serving skew and hold p99 <= 48 ms during streaming feature bursts and storage node crashes.

Workload Profile

Live Ranking & Fraud Scoring68,000 Vector Batch Read RPS / 14,000 Streaming Feature Write RPS
Peak Checkout & Feed Inference176,000 Read RPS / 34,000 Streaming Write RPS
Active Working Set48 GB hot entity feature rows & sliding-window ring aggregates
Latency & Parity GateSub-48ms p99 online serving + dual online/offline log consistency

Consistency Model

Read-after-write on real-time fraud/risk counter updates (e.g. failed card velocity in last 60s) with atomic versioned batch swaps.

Relevant practice for

Click an item in Inventory above, or press B to add a component, double-click to name, C to connect.

Design Write-up

Write under ### Architecture for Diagram to take that up directly

Compulsory section · if not written yet, Diagram reads from the start of your write-up.
Architecture: required·FRs mentioned: 0/4·0 boxes · 0 edges
0 words
Hidden Cases #4–#7 run automatically on Submit
Case 1: Smoke & API ContractInput Workload
Read RPS
2,000 rps
Write RPS
400 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 96 ms
• Availability: ≥ 99.7%
Valid end-to-end Client → Compute → Storage topology