Learn / Attack archive / Lesson 30

Floods and botnets — DDoS

How hijacked TVs and routers now send 31 terabits a second, how one quirk in HTTP/2 let a small botnet do the work of a huge one, and why the defence lives in front of your server.

Last updated: 2026-09-23

What it is

A denial-of-service attack does not steal anything. It sends so much traffic, or such expensive traffic, that real visitors cannot get through. A distributed one (DDoS) sends it from thousands or millions of machines at once, so blocking one address does nothing.

Those machines are a botnet: devices infected with malware and rented out. Today they are mostly cheap internet-connected things that are never updated: routers, cameras, digital video recorders and Android TV boxes.

There are two broad kinds:

Why it is a rule

Why it keeps working

How to do it

1. Put a large network in front

Volume floods can only be absorbed by a provider with more capacity than the attacker: a CDN or DDoS protection service. Your server's address should not be public, or the attacker will go around the shield.

2. Make expensive requests cost the caller

js
app.use(express.json({ limit: '100kb' }))
server.headersTimeout = 10_000
server.requestTimeout = 30_000

3. Keep the web server patched

Rapid Reset and MadeYouReset were fixed in the server software, not in anyone's application code. Nginx, Node, Apache, Envoy and others all had releases.

4. Degrade on purpose

Decide in advance what to switch off under load: search, exports, heavy reports. A site that keeps working in a smaller form is better than one that falls over.

5. Do not become part of a botnet

Change default passwords on every router and camera you own, and replace devices that no longer get updates.

How we do it here

The site sits behind a CDN, and pages that are the same for every visitor are served from the edge, so a flood of them does not reach our server. Every request passes a per-IP rate limiter, request bodies are capped, and the limiter's own memory is bounded so it cannot be flooded itself. See Size and rate limits and Edge caching.

Benefits

Disadvantages

Checklist

Sources

Read this lesson as Markdown