Problem Statement: A Multi-Layer Defense Against Denial of Service
Frames DDoS mitigation as a real-time, multi-layer filtering problem spanning L3/L4 volumetric defense and L7 application defense.
Problem statement
Design a DDoS mitigation service that detects abnormal traffic surges, distinguishes attack traffic from legitimate users, and applies countermeasures — blackhole routing, rate limiting, SYN cookies, challenges, or scrubbing — while legitimate traffic keeps flowing with minimal added latency. The service must protect customer prefixes and applications whether the attack is a 2 Tbps volumetric UDP flood, a TCP state-exhaustion SYN flood, or a 300 million request-per-second HTTP/2 campaign.
Distributed denial-of-service is distinctive because the adversary is volumetric, distributed, and adaptive . NETSCOUT's ATLAS telemetry recorded roughly 16 million DDoS attacks in a single recent year, and single attacks have crossed the 2.5 Tbps mark — Akamai publicly reported mitigating a 2.52 Tbps multi-vector attack against a European financial institution in early 2024. Cloudflare has publicly reported blocking HTTP/2 Rapid Reset attacks at roughly 398 million requests per second. Google Cloud Armor reported stopping a 46 million request-per-second Layer-7 attack in June 2022. These are not theoretical numbers; they define the envelope a serious design must address.
Why the problem is hard
A normal backend can shed load and retry. A mitigation service cannot simply retry: while it hesitates, the customer's origin is saturated, TCP connection tables fill, and revenue stops. The design therefore separates three concerns that many candidates blur together:
- Detection — noticing abnormal traffic fast enough that damage is bounded. Detection spans flow telemetry at the network edge, per-packet heuristics in the datapath, and application-layer behavioral analytics.
- Classification — deciding what kind of attack is underway (volumetric, protocol, application layer) and which source populations are abusive, with minimal false positives against real users.
- Enforcement — applying countermeasures in the right place: at the edge router via blackhole or Flowspec, at a scrubbing center via deep inspection, or at the application layer via challenges and rate limits.
The problem requires real-time monitoring and anomaly detection, automated blacklisting or rate limiting of suspicious IPs, optional scrubbing centers, and integration with existing load balancers or CDNs. The four non-functional requirements — throughput for large volumetric attacks, minimal false positives, low-latency rule application, and global presence for near-source mitigation — each drive a separate architectural subsystem.
The three defense planes
- Network plane (L3/L4): anycast absorption, SYN cookies, UDP reflection filtering, RTBH blackhole routing, BGP Flowspec, and GRE diversion to scrubbing centers.
- Application plane (L7): request-rate baselining, header and TLS fingerprinting, JavaScript or cryptographic challenges, token-bucket rate limits, and rule-based blocking at edge proxies.
- Control plane: detection pipelines, policy management, rule distribution, incident orchestration, customer reporting, and the telemetry lake that powers all of it.
A strong answer keeps these planes separate. The network plane must keep filtering even if the control plane is degraded; the control plane must keep learning even while a record attack is in progress; and the application plane must never be starved by volumetric noise that should have been absorbed earlier.
Key terminology
- Volumetric attack: saturates bandwidth (UDP floods, amplification/reflection attacks such as DNS, NTP, CLDAP, and memcached, which reached a documented 51,000x amplification factor in the 2018 GitHub attack).
- Protocol attack: exhausts stateful resources — SYN floods, ACK floods, connection-table exhaustion, slowloris-style connection holding.
- Application-layer attack: exhausts application logic — HTTP floods, Rapid Reset (CVE-2023-44487), cache-busting queries, expensive-endpoint hammering.
- Scrubbing center: a facility where all traffic for a prefix is diverted (typically via BGP), malicious traffic is discarded after deep inspection, and clean traffic is re-injected, often through GRE tunnels.
Key Highlights
- •Attacks span three classes — volumetric, protocol, and application layer — and each class demands a different detection and enforcement mechanism.
- •Published records set the envelope: multi-Tbps volumetric attacks and hundreds of millions of requests per second at L7.
- •Detection, classification, and enforcement are separate subsystems with different latency and consistency requirements.
- •The network plane must function even when the control plane is degraded; filtering cannot depend on a slow analytics RPC.
- •False positives are the hidden cost: blocking real users is often worse than a short attack.
Section Rescue Kit
Buzzwords to use:
Safe statements:
- "Let me separate detection, classification, and enforcement first, because they have very different latency budgets."
- "Before choosing technology, I will define which decisions must happen in the datapath and which can wait for the control plane."