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

Real-Time Phishing & Safe-Browsing URL Reputation API

Design a Google Safe Browsing-style URL prefix reputation service queried by browsers and email gateways before rendering external links.

Max p99
≤ 30 ms
Availability
≥ 99.5%
Budget
≤ $2,500

Functional Requirements

  • FR-1GET /safebrowsing/hash/{url_prefix} — Returns matching threat hash suffixes for a 4-byte SHA256 prefix.
  • FR-2POST /safebrowsing/threats — Ingests newly detected phishing/malware domain feeds.
  • FR-3PATCH & DELETE /safebrowsing/hash/{url_prefix} — Updates, revokes, or deletes url_prefix entries with bounded TTL or explicit cache/index invalidation.
  • FR-4Browser navigation checks must stay under 30ms p99 even during 5x storage latency spikes.

Workload Profile

Baseline Browser Checks26,000 Read RPS / 700 Threat Feed Write RPS
Phishing Wave Surge72,000 Read RPS / 2,000 Write RPS
Active Working Set12 GB compact SHA256 prefix tables
Traffic DistributionHigh hit rate on popular domain url_prefix buckets

Consistency Model

Eventual threat-list edge sync (< 10s) acceptable; threat feed writes durably stored.

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