Design Bot Detection

Hard45 min
1 / 30
understanding6 min read

Problem Statement & Context

How Problem Statement & Context shapes architecture and interviewer follow-ups for Design Bot Detection.

Problem Statement & Context

Design a global edge bot detection platform (Cloudflare Bot Management / PerimeterX class) that stops automated abuse before origin while preserving crawlers and humans. This section focuses on mission at the CDN edge before origin sees abusive automation.

  • 1.1: edge-first scoring
  • 1.2: good-bot allowlists
  • 1.3: CAPTCHA escalation

Mechanism

Every HTTP request passes through a bot score pipeline that fuses TLS fingerprints, JS telemetry, and rate signals before WAF or origin enforcement.

Interview phrasing

Lead with 12M RPS edge evaluations, 3ms p99 decision budget, <0.1% human false-block, and 99.99% scorer availability.

Failure mode to volunteer

During credential-stuffing surge, Redis shard hot-spots; you micro-shard ASN counters and widen challenge band instead of hard-blocking checkout.

SignalTarget
Peak RPS12M
p993 ms
False block0.1 %
Availability99.99 %
javaOne Dark Pro
1public record EdgeRequest(String requestId, String ja3Hash, String ip, String asn) {}
pythonOne Dark Pro
1def bot_band(score: float) -> str:
2 if score >= 0.92: return "block"
3 if score >= 0.65: return "challenge"
4 return "allow"
typescriptOne Dark Pro
1export type BotAction = "allow" | "challenge" | "block";
2export interface EdgeScore { score: number; action: BotAction; reasons: string[]; }

Why interviewers care

Bot Detection interviews reward crisp scope, explicit trade-offs, and failure stories—not generic microservice diagrams.

Interview checkpoint

Name one failure story for Problem Statement & Context that proves you understand real outages, not happy-path diagrams.

Key Highlights

  • Problem Statement & Context: mission at the CDN edge before origin sees abusive automation
  • Mechanism: edge-first scoring
  • Metric anchor: 12M RPS / 3 ms
Interviewer signal
Volunteer Peak RPS=12M early in Problem Statement & Context.
Avoid
During credential-stuffing surge, Redis shard hot-spots; you micro-shard ASN counters and widen challenge band instead of hard-blocking checkout.

Section Rescue Kit

Buzzwords to use:

JA3 fingerprintFail-closed ladder

Safe statements:

  • "For Problem Statement & Context, I cite 12M RPS and 3ms before drawing boxes."
  • "I never fail-open during credential stuffing—rate limit or challenge instead."
Design Bot Detection - System Design | WinJob | WinJob