Packets, Connections, and HTTP Requests Stress Different Layers
Imagine a bakery that takes orders by phone. A vandal can block the flour truck, which is a packet flood. They can call and hang up so every line stays busy, which is a connection flood. Or they can order five hundred croissants one at a time, exhausting the ovens, which is a request flood. Each level needs a different defense.
A distributed denial-of-service (DDoS) attack applies that idea to a network: many sources exhaust one finite resource so legitimate users cannot be served. Because the sources are distributed, blocking one IP address rarely helps. The exhausted resource might be bandwidth, packet processing, connection state, request concurrency, a database lock, or the on-call team.
Layer 3, the network layer, carries packets with IP addresses, measured in packets per second (pps) and bits per second (bps). Layer 4, the transport layer, adds TCP and UDP ports and connection state; a SYN flood opens connections without completing the handshake and fills the table. Layer 7, the application layer, is HTTP requests, measured in requests per second (rps) and concurrent work. Reflection attacks cut across layers: a spoofed small query to an open resolver produces a large response at the victim.
Every layer owns a different queue. An attack succeeds when arrivals exceed the service rate of the narrowest queue. Cloudflare absorbs or filters queues at its edge; the queues inside your origin remain yours. That is the difference between mitigation, which removes work before it reaches you, and capacity protection, which completes the work that does arrive. Response is the human process that decides which one is failing.
For HTTP, Cloudflare terminates TLS, parses requests, serves cache hits, and can challenge or block before forwarding. For arbitrary TCP and UDP, Spectrum proxies at Layer 4 and requires a valid connection before proxying, moving SYN floods to the edge (Spectrum DDoS protection). For IP prefixes, Magic Transit announces the address space over BGP, filters packets, and returns clean traffic through GRE or Cloudflare Network Interconnect (Magic Transit).
Figure 1 shows the same attack crossing those queues, and where each failure happens.
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
A["Botnet, reflection,
or proxy sources"]
subgraph Edge["Cloudflare edge: absorb and filter"]
B["L3 network
link and router queues"]
C["L4 transport
SYN state and conntrack"]
D["L7 application
WAF, cache, Workers"]
end
subgraph Origin["Origin: your capacity boundary"]
E["Application
CPU, database, egress"]
end
A -->|"packets (pps, bps)"| B
B -->|"connections"| C
C -->|"HTTP requests"| D
D -->|"cache miss or uncacheable"| E
B -.->|"link saturated"| F["Failure: no HTTP rule runs"]
C -.->|"state exhausted"| G["Failure: new connections dropped"]
D -.->|"concurrency limit"| H["Failure: 5xx and queueing"]
E -.->|"slow query or lock"| I["Failure: latency and cost spike"]
classDef primary fill:#132440,color:#ffffff,stroke:#0b172b;
classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a;
classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f;
classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420;
classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f;
class C,D primary;
class A,B,E secondary;
class F,G,H,I danger;
The mitigation boundary is where Cloudflare drops traffic; the capacity boundary is where the rest is served. Figure 2 shows attack volume absorbed at the edge, allowed traffic crossing to the origin, and a direct-to-origin path blocked by a firewall that accepts only Cloudflare addresses.
"Unmetered DDoS protection" describes standard mitigation. It does not mean unlimited origin capacity, and it does not protect a DNS record that bypasses Cloudflare.
DDoS for Web and Network Protection Boundaries
Consider a retailer with a proxied HTTP storefront and a UDP game service onboarded to Spectrum. Suppose the storefront gets 60,000 rps of cache-busting search queries, whose unique strings defeat caching, while the game service gets a 400 Gbps UDP reflection flood. Both are DDoS, but they stress different products, alerts, and teams.
At the storefront, Cloudflare serves cached pages, absorbs TLS and HTTP parsing, and applies the HTTP DDoS ruleset. The origin sees only surviving requests; if those are unique, authenticated, or uncacheable, it can still collapse. At the game service, Spectrum absorbs the flood, validates connections, and proxies allowed traffic. The origin link is protected only if the game IP is announced through Spectrum or Magic Transit, not merely named in DNS.
Execution order explains surprises. HTTP DDoS runs in the ddos_l7 phase before custom rules, rate limiting, Managed Rules, and Super Bot Fight Mode (feature interoperability). A terminating DDoS action stops the request before later phases, so a WAF skip cannot rescue traffic the DDoS ruleset already blocked. Rate limiting is not a precise gate either: Cloudflare documents a delay of up to a few seconds between detecting a request and updating counters, so excess requests can still reach the origin (rate limiting rules).
| Question | L7 HTTP DDoS protection | L3/4 network-layer DDoS protection |
|---|---|---|
| What must be onboarded? | A zone whose DNS records are proxied through Cloudflare | A zone, a Spectrum application, or a Magic Transit prefix |
| What is the constrained resource? | Request rate, Worker concurrency, origin CPU and database | Link bandwidth, packet rate, connection state |
| What does Cloudflare terminate? | TLS, HTTP parsing, cache hits, challenges | Packets and TCP handshakes; Spectrum validates before proxying |
| What can still reach the origin? | Allowed requests, cache misses, uncacheable API calls | Clean packets through GRE/IPsec or the Spectrum proxy |
| Default alert trigger | More than 100 mitigated requests per second on any plan | Average 12,000 pps over 5 seconds for at least 1 minute, on BYOIP, Spectrum, or Magic Transit |
| Customization boundary | One override on all plans; up to 10 with Advanced DDoS Protection | Only Enterprise Spectrum or Magic Transit customers |
| Best first check | Security Events, origin 5xx rate, cache hit ratio | Network Analytics, tunnel health, link capacity |
| Characteristic failure | Origin concurrency collapse from legitimate-looking requests | Tunnel or link saturation, or collateral from a coarse signature |
Product boundaries deserve precision. The HTTP ruleset is always enabled for onboarded zones on all plans; every customer gets one override, and Enterprise customers with Advanced DDoS Protection get up to 10 with custom expressions (HTTP DDoS). The network-layer ruleset covers onboarded zones, Spectrum applications, and Magic Transit prefixes, but customization is limited to Enterprise Spectrum or Magic Transit customers (network-layer DDoS). Standard L3/4 alerts require BYOIP, Spectrum, or Magic Transit, so they are not universal (DDoS alerts).
Alert thresholds are detection notices, not severity scores. An HTTP alert fires above 100 mitigated rps, trivial for a large site and catastrophic for a small one. An L3/4 alert needs 12,000 pps averaged over five seconds, sustained for a minute. Short, low-volume attacks can hurt without any platform alert.
Figure 3 turns those boundaries into a response flow, including branches that turn mitigation into a second incident.
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
A["Traffic spike or customer report"] --> B["Managed ruleset detects and mitigates"]
B --> C{"Fully mitigated
at the edge?"}
C -->|"Yes"| D["Ephemeral rule plus alert
about one minute"]
C -->|"Partial, or origin errors"| E["On-call triage"]
D --> F{"Origin healthy?"}
F -->|"Yes"| G["Record attack ID,
watch SLOs"]
F -->|"No"| E
E --> H["Escalate by severity"]
H --> I["Bounded controls:
cache, rate limit, WAF, Under Attack"]
I --> J["Verify critical user journeys"]
J --> K{"Recovered?"}
K -->|"Yes"| L["Roll back temporary controls"]
K -->|"No"| M["Add origin capacity,
fail over, or open vendor case"]
M --> J
H -.->|"missing contact"| N["Wrong team paged,
status page stale"]
I -.->|"coarse rule"| O["Self-inflicted outage"]
L -.->|"no rollback owner"| P["Controls linger for days"]
classDef primary fill:#132440,color:#ffffff,stroke:#0b172b;
classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a;
classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f;
classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420;
classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f;
class C,L,P primary;
class A,B,D,E,H,J,K,O secondary;
class F ok;
class G,I,M,N danger;
Origin Capacity and Incident Escalation
Three capacities matter: the edge's mitigation capacity, the origin's service capacity, and the team's response capacity. Cloudflare reports up to three seconds average detection and mitigation, with ephemeral signatures that expire after the attack. In Q3 2026, 96% of network-layer attacks ended in under 10 minutes and 98% stayed under 1 Gbps, yet the network averaged 8,226 such attacks per hour (DDoS Threat Report 2026 Q3).
That volume argues for automation, not paging on every event. Measure the origin independently: for each critical service, find how many requests one instance serves while p95 stays inside its objective, multiply by healthy instances, and keep a headroom margin. This is a planning heuristic, not a Cloudflare limit. Autoscaling helps only if the bottleneck is compute, not a locked database or a third-party API.
Origin Protect rules bridge origin health and DDoS mitigation. Requests causing a high number of zone errors can trigger mitigation at a default sensitivity of 1,000 errors per second on any plan; Pro, Business, and Enterprise also require the error rate to be five times normal origin traffic (HTTP DDoS). That is how a request flood that looks legitimate at the edge triggers protection because of what it does to the origin.
Dashboards should answer decisions: rps by hostname, cache hit ratio, origin 5xx, origin p95, WAF and rate-limit actions, and DDoS rule matches. For network services, add bits and packets per second, top source prefixes, tunnel health, and link utilization. Each panel needs an owner and a threshold that changes behavior.
Escalation needs names, not channels. Define primary and secondary incident commanders, an edge/network owner, an application owner, a communications owner, and an executive sponsor. Record work and mobile numbers, a chat bridge, and a backup per role. For Magic Transit and Spectrum, add the Cloudflare account team and support path to the same card. Test it quarterly; the usual failure is a phone number belonging to someone who left.
Alert fatigue is a design flaw. Cloudflare suppresses duplicate DDoS alerts within one hour, and platform guidance is often "no action needed" because mitigation is automatic (DDoS alerts). Treat that as a prompt to check service symptoms, not a ticket to close. Route low-severity alerts to a queue and page only on a composite condition, such as DDoS activity plus origin 5xx or a failed synthetic check. Review every page that needed no action; the goal is few alerts that reliably mean a human is needed now.
These are the choices that address the four failure modes readiness work exists to prevent: alert fatigue, a contact tree that dead-ends, collateral damage at the origin, and temporary controls that outlive the attack.
The alert says the attack was mitigated, not that your service is healthy. A coarse block, a rate-limit key that catches a partner integration, or a cache rule that stops serving can turn a DDoS into a self-inflicted outage that lasts longer than the attack.
Case Studies, Test Authorization, and Post-Incident Learning
On July 31, 2025, fogos.pt, a volunteer-run wildfire tracker in Portugal, got a Cloudflare alert during fire season. The attack lasted seven minutes, peaked near 33,000 rps, and reached 1.7 Gbps. A second attack on August 1 lasted five minutes, peaked near 31,000 rps, and reached 849 Mbps. Cloudflare mitigated both automatically, alerts reached the team, and the site stayed online without manual intervention. Small by Cloudflare standards, the attacks were large for a service used by firefighters and citizens. The case also shows the value of pre-existing caching, rate limiting, and a protected origin (case study).
At the other extreme, a 31.4 Tbps attack in late 2025 lasted 35 seconds and was mitigated automatically. Cloudflare's 2025 total reached 47.1 million attacks, with network-layer attacks more than tripling year over year (2025 Q4 report). Automation handles volume; humans handle ambiguity. The 31.4 Tbps event needed no heroic action, while the 33,000 rps event needed a working alert path and a team that knew the site mattered.
Authorization is where enthusiasm becomes risk. A tabletop needs no traffic and no approval beyond your organization. A bounded load test needs written approval from the asset owner, platform owner, and any upstream provider whose link you will fill. Define targets, source ranges, maximum rate and bandwidth, window, abort criteria, and rollback. Never point a load generator at a third party, never test a shared production path without notice, and never use an attack-for-hire service. This article deliberately omits attack generation; readiness comes from decisions under realistic injects.
Post-incident, separate the attack from the response. Build a UTC timeline: first anomaly, first alert, first human acknowledgment, first control change, first verification, attack end, final rollback. Record attack ID, rule IDs, actions, and evidence links. Ask which control you did not need, which made things worse, and how long it stayed after the attack ended. Track false positives and rollback time as first-class metrics; blocking legitimate customers for six hours is not success just because the attack stopped.
Figure 4 contrasts the two timelines that emerge.
Run a Tabletop DDoS Readiness Exercise
The exercise below is design-only: it was not executed for this article. It uses no attack traffic and makes no production changes. Run it with the people who would be on the bridge.
Run a Tabletop DDoS Readiness Exercise
Prerequisites and plan requirements: 75 minutes, four to six participants, a facilitator, a scribe. Use a zone you own or a paper architecture. You need read access to Security Events, Security Analytics, and Network Analytics, plus the current escalation card. No paid add-on is required; Magic Transit or Spectrum scenarios are paper injects if unavailable.
Minimal setup: a shared document with time (UTC), decision, and evidence link; one clock; one rule: no production changes unless the facilitator declares a real incident and stops.
- Write the scenario: 03:10 UTC, a proxied storefront at 40,000 rps of unique search queries, cache hit ratio falls from 85% to 40%, origin 5xx rises. Later inject: a 2 Gbps UDP flood against a Spectrum or Magic Transit property, or a paper equivalent.
- Assign roles: incident commander, edge/network owner, application owner, communications owner, and scribe. Give each a card with the role's first three decisions.
- Inject 0 at T+0: read the alert with attack ID and rule name. Ask each role for the first action, the evidence to check, and the escalation trigger.
- Inject 1 at T+10: a rate limit blocks a partner's predictable burst. Who detects it, and is the rule rolled back or narrowed?
- Inject 2 at T+20: the primary contact is on leave and the secondary number is disconnected. What is the next path, and who owns the status page?
- Inject 3 at T+35: the attack shifts from L7 to L3/4. Which product protects the property, is the origin IP exposed, and which dashboard proves it?
- At T+50, require an explicit recovery decision: keep, narrow, or roll back temporary controls, with an owner and deadline.
- Debrief for 15 minutes: time to first correct action, time to evidence, time to escalation, and any control that would outlive the attack.
Expected observation: you should observe gaps, not a score. Typical gaps are an unread dashboard, an unreachable contact, disagreement about who may enable Under Attack mode, and no stated rollback criterion. Record what happened in the room; do not present injects as measured production results.
Failure checks: stop if participants cannot name the decision owner, if the only contact path is a shared inbox, if no one can find the attack ID, or if the rollback criterion is "when it feels safe."
Cost dimensions: staff time is the main cost. Standard DDoS mitigation is unmetered for covered services, but the tabletop does not validate volumetric absorption, plan entitlements, or add-on availability. A later bounded load test needs budget for the test environment, egress or compute, and review time.
Cleanup: delete test rules or overrides, restore changed settings, remove customer data from the shared document, and file the timeline with the runbook. Assign one owner and due date per gap.
Produce a Timeline, Evidence List, and Recovery Decision
The final deliverable of readiness is not a feeling of preparedness. It is a packet of evidence another engineer can audit.
Timeline. Record UTC timestamps for first anomalous signal, first platform alert, first human acknowledgment, first control change, first successful verification of a critical user journey, attack end, and final rollback. Add the attack ID, matched rule IDs, action taken, owner, and a link to supporting evidence. Note clock skew if systems disagree.
Evidence list. Keep the alert payload, the Security Events or Network Analytics view, the origin error-rate graph, the cache hit ratio graph, rate-limit and WAF action counts, the configuration diff for every temporary control, and synthetic-check results. For Magic Transit, add tunnel health and link utilization. For HTTP, add samples of blocked and allowed requests, because a block that looks correct in aggregate can be wrong in the sample.
Recovery decision. Use explicit criteria: the origin error rate has returned to baseline for at least 30 minutes, p95 latency is inside the objective, synthetic checks pass from multiple regions, no temporary control is still required to keep errors down, and communications are updated. Set those criteria before the incident. If they are invented during it, they will justify whatever the team already did.
Use these pass/fail checks:
- Pass: every temporary control has an owner, creation time, and rollback time. Fail: a control is active with no record of who added it.
- Pass: on-call can distinguish an L7 request flood from an L3/4 packet flood for the affected property. Fail: the team treats "DDoS" as one product.
- Pass: the escalation card has two reachable contacts per role and was tested this quarter. Fail: the path depends on one person or a shared inbox.
- Pass: the origin capacity ceiling and first saturation signal are documented. Fail: the plan is "Cloudflare will absorb it."
- Pass: the post-incident review records false positives and time-to-rollback. Fail: the review stops at "mitigation worked."
Self-check. First: why can a 33,000 rps attack matter when Cloudflare has absorbed attacks above 30 Tbps? Because impact depends on the target's capacity and criticality, not the attacker's absolute size. Second: why can a WAF skip fail to unblock a partner during an HTTP flood? Because HTTP DDoS runs in ddos_l7 before custom rules, and a terminating action prevents later phases from evaluating the request. Third: why is "the alert fired and mitigation was automatic" not a complete incident record? Because the alert proves detection, not service health, and does not capture origin collateral, false positives, or how long temporary controls remained.
Unresolved limitations. This article did not execute a hosted or lab exercise, so no measured detection, mitigation, or recovery result is claimed, and no software versions were exercised. The tabletop is a design-only fixture. Plan entitlements, thresholds, override limits, and add-on availability were checked against Cloudflare documentation on 2026-11-05, but can change; verify them for your account. No pricing figures are asserted. Incident statistics and case details come from Cloudflare's published reports and are vendor-reported. The article does not validate volumetric absorption for a specific attack, and it does not cover Advanced TCP Protection, Advanced DNS Protection, or Programmable Flow Protection beyond noting that they are Magic Transit capabilities. Spectrum and Magic Transit behavior is described from documentation, not tested here. Organizational readiness depends on contacts, authority, and practice that no console can prove.
References.
- Cloudflare DDoS Protection: https://developers.cloudflare.com/ddos-protection/
- How DDoS protection works: https://developers.cloudflare.com/ddos-protection/about/how-ddos-protection-works/
- Attack coverage: https://developers.cloudflare.com/ddos-protection/about/attack-coverage/
- HTTP DDoS Attack Protection: https://developers.cloudflare.com/ddos-protection/managed-rulesets/http/
- Network-layer DDoS Attack Protection: https://developers.cloudflare.com/ddos-protection/managed-rulesets/network/
- DDoS alerts: https://developers.cloudflare.com/ddos-protection/reference/alerts/
- Security features interoperability: https://developers.cloudflare.com/waf/feature-interoperability/
- DDoS Protection for Spectrum: https://developers.cloudflare.com/spectrum/about/ddos-for-spectrum/
- Magic Transit overview: https://developers.cloudflare.com/magic-transit/about/
- Cloudflare DDoS Threat Report 2026 Q3: https://blog.cloudflare.com/ddos-threat-report-2026-q3/
- 2025 Q4 DDoS threat report: https://blog.cloudflare.com/ddos-threat-report-2025-q4/
- Fogos.pt case study: https://blog.cloudflare.com/wildfire-fogos-pt-portugal-ddos-attack/
Next in the Series
In Create Your First Worker and Understand Its Configuration, we'll explore Move from a local handler to a repeatable edge deployment.