HLDArena
HLD-132·Rate Limiting
Easy · 500 pts

Global Malicious IP Blocklist & Threat Reputation API

Design an ultra-low-latency IP reputation and CIDR blocklist lookup service queried by API gateways on every inbound connection, backed by automated threat-feed ingestion.

Max p99
≤ 25 ms
Availability
≥ 99.5%
Budget
≤ $3,250

Functional Requirements

  • FR-1GET /v1/reputation/ip/{ip_addr} — Returns risk score, bot classification, and block/allow verdict in single-digit milliseconds.
  • FR-2POST /v1/reputation/blocks — Appends newly detected abusive IPs or CIDR prefixes with auto-expiring ban TTLs.
  • FR-3DELETE /v1/reputation/ip/{ip_addr} — Removes false-positive blocks and invalidates cached verdicts within seconds.
  • FR-4Gateway reputation lookups must maintain >= 99.5% availability and p99 <= 25 ms when origin threat storage crashes.

Workload Profile

Steady Gateway Checks32,000 Lookup Read RPS / 900 Threat Feed Write RPS
Botnet Credential-Stuffing Wave82,000 Lookup Read RPS / 2,600 Ban Write RPS
Active Working Set8 GB compact IPv4/IPv6 reputation radix & hot ban set
Traffic DistributionHeavy Zipfian skew on active botnet ASNs & proxy IPs

Consistency Model

Bounded eventual propagation (< 5s) of new IP bans to edge/in-memory lookup tiers; fail-open/cached reads during origin outages.

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