HLDArena
HLD-121·Coordination & IDs
Easy · 500 pts

Microservice Health-Check & Service Discovery Registry

Design a Consul / Netflix Eureka-style service registry handling continuous pod heartbeats and high-QPS endpoint discovery lookups across thousands of microservices.

Max p99
≤ 32 ms
Availability
≥ 99.5%
Budget
≤ $4,900

Functional Requirements

  • FR-1POST /registry/{service_name}/heartbeat — Renews pod lease TTL and health status.
  • FR-2GET /registry/{service_name}/endpoints — Returns healthy pod IP:port list to sidecar proxies.
  • FR-3DELETE /registry/{service_name}/heartbeat — Releases canceled or expired leases/holds atomically and immediately refreshes cached availability.
  • FR-4Sidecar discovery reads must remain available when a primary registry shard crashes.

Workload Profile

Steady Mesh Traffic20,000 Lookup RPS / 4,500 Heartbeat Write RPS
Cluster Rollout Surge56,000 Lookup RPS / 12,000 Heartbeat RPS
Active Working Set6 GB live pod endpoint leases
Traffic DistributionHeavy read fan-out on core auth/gateway service_name

Consistency Model

AP-first bounded eventual discovery (< 3s stale endpoint window acceptable with client health retries).

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 ≤ 64 ms
• Availability: ≥ 99.5%
Valid end-to-end Client → Compute → Storage topology