A denial-of-service attack does not break into anything. It simply sends more traffic than the target can handle until legitimate visitors cannot get through. Distributed means the traffic comes from thousands of machines at once — a botnet of compromised devices — so there is no single source to block. Attacks are cheap to rent by the hour, which is why any site with a competitor or a disgruntled user can become a target.
The three kinds
Volumetric. Raw bandwidth: flood the target's network connection with more traffic than its pipe can carry. UDP floods, DNS and NTP amplification (small requests to open servers that reply with large answers to a spoofed source). Measured in gigabits per second; attacks of hundreds of Gbps are routine and multi-terabit ones happen. Nothing on the server can stop this — if the link is full, it is full.
Protocol. Exhaust the server's or a firewall's ability to track connections: SYN floods (start thousands of TCP handshakes and never finish), fragmented packets, Ping of Death. Measured in packets per second. A server's connection table fills and it stops accepting new connections, legitimate or not.
Application-layer. Look like real traffic: thousands of HTTP requests per second to expensive pages — search, login, a large product listing — from many IPs. Small in bandwidth, so they pass volumetric filters, and devastating because each request costs the server real CPU and database time. Measured in requests per second. The hardest to filter, because telling a bot from a browser takes work.
What protection looks like
At the network edge (what hosts mean by "Anti-DDoS"). The hosting provider's network watches traffic flow per IP. When the rate to one address exceeds a threshold, that IP's traffic is diverted through scrubbing hardware that drops the attack patterns — spoofed sources, amplification replies, malformed packets, SYN floods — and forwards clean traffic to the server. Because it happens on links sized for the provider's whole network, a volumetric attack that would saturate one server's port is absorbed. Detection to mitigation takes seconds to a minute; there is often a brief blip before it engages.
This layer handles volumetric and protocol attacks well. It handles application-layer attacks poorly, because a valid HTTP request is a valid HTTP request.
A CDN or cloud proxy (Cloudflare, Akamai). DNS points at the proxy; all traffic passes through a global network with terabits of capacity. Volumetric attacks are absorbed across hundreds of locations. For application-layer attacks, the proxy can challenge suspicious clients (a JavaScript check, a captcha), rate-limit per IP, fingerprint bots and block known bad networks — before anything reaches your server. Cloudflare's free plan includes unmetered volumetric protection; application-layer rules improve on paid plans. Your server's IP must be hidden (only the proxy talks to it) or the attacker goes around the proxy.
On the server. Last line, for what gets through:
- A web application firewall and Fail2ban to ban IPs that behave like bots.
- Nginx rate limiting (
limit_req) on expensive endpoints — login, search, API. - Page caching so requests for the same page do not each hit PHP.
- Kernel SYN cookies (
net.ipv4.tcp_syncookies = 1, on by default) for SYN floods. - Enough headroom that a modest spike is a spike, not an outage.
Recognising an attack
Load spikes, the site slows or times out, and the access log shows an unusual volume: thousands of requests to one URL, or from many IPs with odd user agents, or with no referrer. Quick triage:
# requests per IP in the last 10,000 lines
tail -n 10000 access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head
# most-hit URLs
tail -n 10000 access.log | awk '{print $7}' | sort | uniq -c | sort -rn | headA genuine traffic surge (a TV mention) has varied URLs and normal browsers; an attack is repetitive.
What to do during one
- Confirm with the host — their network-level mitigation may already be engaged, and they can see the traffic you cannot.
- Put the site behind Cloudflare if it is not already; switch on Under Attack Mode, which challenges every visitor for the duration.
- Rate-limit or temporarily disable the endpoint being hammered.
- Do not pay a ransom demand; it marks you as someone who pays.
What VPSPioneer provides
Every shared plan and managed VPS sits behind always-on network-level Anti-DDoS that absorbs volumetric and protocol attacks without you noticing them, and we put Cloudflare in front of sites that need application-layer filtering as part of website security. The one thing to remember from this page: keep your origin IP private once you are behind a proxy, or the proxy protects nothing.