HLDArena
HLD-115·Caching & Edge
Easy · 500 pts

Edge Geo-IP Country & Timezone Lookup Service

Design an ultra-fast IP-to-country, ASN, and timezone resolution service invoked at ingress for localization and compliance routing.

Max p99
≤ 22 ms
Availability
≥ 99.5%
Budget
≤ $2,150

Functional Requirements

  • FR-1GET /geoip/{ip_prefix} — Resolves country, region, timezone, and ASN metadata under 22ms p99.
  • FR-2POST /geoip/ranges — Applies periodic BGP/whois CIDR block updates.
  • FR-3PATCH & DELETE /geoip/{ip_prefix} — Updates, revokes, or deletes ip_prefix entries with bounded TTL or explicit cache/index invalidation.
  • FR-4Must isolate backing database reload brownouts (5x latency) from live edge lookups.

Workload Profile

Baseline Ingress26,000 Read RPS / 300 CIDR Update RPS
Traffic Reroute Peak81,000 Read RPS / 1,000 Write RPS
Active Working Set4 GB CIDR prefix routing table
Traffic DistributionStrong skew on major ISP ip_prefix blocks

Consistency Model

Eventual CIDR table refresh (< 60s) acceptable; ingress lookups prioritize low tail latency.

Design Write-up
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
100 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 44 ms
• Availability: ≥ 99.5%
Valid end-to-end Client → Compute → Storage topology