# What is a DDoS attack? Types, how they work and what they target

A DDoS attack does not break into your server, steal a password or change a file. It sends so much traffic, or so many half-finished requests, that real users cannot get through. The site, game or API is still running; nobody can reach it. This article explains the main types of attack, what each one exhausts, and why the defence against one type does little against another. If you only want to know what protection on a server looks like in practice, the [DDoS-protected cloud hosting in India](/ddos-protection) page describes ours.

**Short version:** A DDoS (distributed denial of service) attack is an attempt to make a server or network unreachable by flooding it from many sources at the same time. There are three broad families: volumetric attacks fill the network link, protocol attacks exhaust connection tables on servers and firewalls, and application-layer attacks exhaust the web server or database with requests that look legitimate. The first two work at network Layers 3 and 4 and are stopped by scrubbing traffic upstream; the third works at Layer 7 and is stopped by a reverse proxy, WAF and rate limits.

## DDoS in one paragraph: many machines, one target

Every server has limits: the bandwidth of its network port, the number of connections its operating system can track, the number of requests its application can answer per second. A DDoS attack finds the lowest of those limits and pushes past it. The traffic comes from many machines at once, usually a botnet of infected computers, routers, cameras and other devices whose owners do not know they are taking part, or from ordinary public servers tricked into replying to the victim. Because the sources are spread across many networks and countries, the attack is "distributed", and that is what makes it hard to block by address.

The attacker's goal is unavailability. Nothing needs to be stolen for the attack to succeed. A shop that cannot take orders for an hour, a game server that drops every player during a tournament, or a trading terminal that cannot reach its broker has been harmed even though no data was touched.

## DoS vs DDoS: what the extra D changes

A plain DoS (denial of service) attack comes from one machine. It can still hurt a small server, but the fix is simple: block that one IP address at the firewall and the attack is over.

Distribution changes three things:

- **Volume.** A thousand devices sending a modest amount each add up to more than any single connection can send, and more than a typical server port can receive.
- **Blocking.** There is no single address to block. The list of sources may run to tens of thousands and changes during the attack.
- **Disguise.** In many attacks the source addresses are forged (spoofed), or the traffic comes from genuine home connections, so the attacking traffic sits in the same address ranges as your real users.

This is why "just block the IPs" works for a DoS and fails for a DDoS, and why the defence has to sit in the network, upstream of the server, instead of on the server itself.

## Volumetric attacks: UDP floods and amplification

Volumetric attacks aim at the simplest limit of all: bandwidth. If a server has a 1 Gbps port and 5 Gbps of junk arrives, the port is full and most legitimate packets are dropped before the operating system ever sees them. A firewall on the server cannot help, because the link is saturated before the packet reaches the firewall.

The common forms:

- **UDP flood.** UDP has no handshake, so an attacker can send packets to any port without setting up a connection first. Large numbers of UDP packets, often with spoofed source addresses, are aimed at the target's IP.
- **Amplification (reflection) attack.** The attacker sends small requests to public servers on the internet, such as open DNS resolvers, NTP servers or devices that answer SSDP, with the source address forged to be the victim's. Each server replies to the victim, and the reply is much larger than the request. The attacker spends a little bandwidth; the victim receives many times more, from servers that are otherwise legitimate.
- **ICMP flood.** The same idea with ping packets.

Volumetric attacks are measured in bits per second (Gbps) or packets per second. They are the blunt instrument of DDoS and the kind most people have in mind when they hear the term.

## Protocol attacks: SYN floods and state exhaustion

Protocol attacks need far less bandwidth. They abuse the way network protocols keep state.

The standard example is the **SYN flood**. A normal TCP connection opens with a three-step handshake: the client sends SYN, the server answers SYN-ACK and reserves a slot in its connection table, and the client completes with ACK. In a SYN flood the attacker sends a stream of SYN packets, usually from forged addresses, and never completes the handshake. The server keeps each half-open connection in memory while it waits. When the table is full, new connections, including real ones, are refused or ignored.

Other attacks in this family send malformed or fragmented packets that are expensive to reassemble, or floods of ACK and RST packets that force a stateful firewall to look up connections that do not exist. The common thread is that the target is a table or a CPU, not the link. A stateful firewall or load balancer in front of the server is often the first thing to fail, because it also tracks every connection.

Operating systems have partial defences, such as SYN cookies on Linux, which let the server avoid reserving memory until the handshake completes. These help with small floods. A large one still has to be filtered before it arrives.

## Application-layer (Layer 7) attacks: HTTP floods and slow requests

Application-layer attacks look like real use. Each request is a complete, valid HTTP request that passes every network-level check. The damage comes from what the request makes the application do.

- **HTTP flood.** Thousands of clients request pages, usually the expensive ones: search results, login, cart, an API endpoint that runs a heavy database query. The network link is nowhere near full, but PHP workers, application threads or database connections run out and the site stops answering.
- **Slow-request attacks.** The client opens many connections and sends each request very slowly, a few bytes at a time, so each connection occupies a worker for minutes. A small number of machines can tie up a web server that allows only a limited number of simultaneous connections.
- **Cache-busting.** Requests carry random query strings so that a cache or CDN cannot answer them and every request reaches the origin.

Layer 7 attacks are measured in requests per second, and the numbers that cause an outage can be small. A site that comfortably serves cached pages may fall over at a few hundred uncached requests per second.

## Layer 3/4 vs Layer 7: why the defence is different

The layer numbers come from the OSI model. Layer 3 is the network layer (IP), Layer 4 is the transport layer (TCP and UDP), and Layer 7 is the application layer (HTTP, DNS queries, a game's own protocol).

| | Layer 3/4 attacks | Layer 7 attacks |
|---|---|---|
| Examples | UDP flood, amplification, SYN flood | HTTP flood, slow requests, login spam |
| What runs out | Bandwidth, connection tables | Web workers, database, application CPU |
| Measured in | Gbps, packets per second | Requests per second |
| Looks like | Obvious junk at high volume | Ordinary visits |
| Stopped by | Scrubbing in the provider's or carrier's network | Reverse proxy or WAF, rate limits, caching, application fixes |

The split matters when you read a hosting plan. Network-layer protection drops floods before they reach the server, but it does not read HTTP requests or game logins, so it cannot tell a bot's page view from a customer's. A web application firewall understands HTTP, but it only protects traffic that passes through it, which normally means web traffic on a domain; it does nothing for a game server on a UDP port or an API reached by IP address. Most services that face the internet need the first, and websites usually need both.

## Who gets attacked and why: game servers, shops, trading, small sites

It is tempting to assume that only large companies are worth attacking. In practice, attacks can be rented by the hour from "booter" or "stresser" services, which means the motive can be trivial.

- **Game servers.** A banned player, a rival community or someone losing a match can knock a server offline. Game traffic is mostly UDP and players notice every second of lag, which makes game servers a frequent target. Our guide to [DDoS protection for game servers](/guides/ddos-protected-vps-india-game-servers) covers that case in detail.
- **Online shops and SaaS products.** Attacks arrive during a sale or a launch, sometimes with a ransom message asking for payment to stop.
- **Traders.** A forex or algo trading setup that loses its connection during market hours cannot manage open positions, so even a short outage is costly.
- **Small sites and bystanders.** A blog, a school site or a small business can be hit because of a grudge, as practice, or only because it shares a network with the real target. If a provider responds to an attack on one customer by cutting off the whole IP, the neighbours go down too.

## What an attack looks like from the victim's side

From the inside, an attack rarely announces itself. The usual signs:

- The site or game is slow or unreachable for everyone, while the server's own CPU and memory may look normal (a volumetric attack) or pinned at 100% (an application attack).
- SSH or Remote Desktop sessions lag or drop, because your own connection competes with the flood.
- Network graphs show inbound traffic many times higher than usual, with outbound traffic flat.
- Web server logs fill with requests for the same URL, or with thousands of clients that never load images, CSS or JavaScript.
- The provider sends a notice that the IP has been "null-routed" or "blackholed".

That last point deserves an explanation. Many providers protect their own network by null-routing the attacked IP address: all traffic to it is discarded upstream for a few hours. The flood stops hurting the provider, but the server is now offline for everyone, which is exactly what the attacker wanted. When you compare hosts, ask whether an attack is scrubbed or null-routed.

Not every slowdown is an attack. A marketing campaign, a link from a popular site, a misbehaving crawler or a broken cron job can produce the same symptoms, so check the logs and graphs before you conclude that someone is targeting you.

## How attacks are stopped: a short preview

The defence follows the same split as the attacks.

**Network and transport floods** are handled by scrubbing. The target's IP range is announced through a network with far more capacity than any attacker is likely to fill, traffic is inspected there, attack packets are dropped, and only clean traffic is forwarded to the datacentre. Scrubbing works best when it is always on, because many attacks are over before a human could switch a filter on.

**Application-layer attacks** are handled closer to the application: a reverse proxy or WAF in front of the website, rate limits on login and search, caching so that fewer requests reach the application, and fixing endpoints that are expensive to call. For game servers, the equivalent is the game's own anti-bot plugins and connection limits.

**On the server**, a firewall that closes unused ports, sensible connection limits and up-to-date software reduce the attack surface. They do not stop a volumetric flood, since the link is full before the firewall sees a packet, but they stop smaller abuse from turning into an outage.

No single layer covers everything. A realistic setup for a public service is always-on network scrubbing from the hosting provider, a proxy or WAF for anything that speaks HTTP, and ordinary good housekeeping on the server.

## How this works on BookMyHost

Every IP prefix we announce is routed through Cloudflare Magic Transit. Traffic to a server reaches Cloudflare's edge first, where network- and transport-layer floods such as UDP and SYN floods and DNS, NTP and SSDP amplification are detected and dropped, and only clean traffic continues to our Noida datacentre. The [network page](/network) describes our network and scrubbing path.

- The protection is on for every server on every plan from the moment it boots. There is no add-on, no attack mode to switch on and no per-IP fee.
- We do not null-route an attacked IP, and attack traffic is not billed.
- UDP game ports are not restricted; filtering targets attack traffic, not your ports.
- It does not inspect application logic. HTTP floods against a website need a reverse proxy or WAF in front (Cloudflare's proxy on your domain is the usual answer), in-game abuse is handled by the game server's own plugins and rate limits, and the firewall on the server is still yours to configure.

Plans and current prices are on the [pricing page](/pricing).
