Please enable JavaScript to use CodeHS

Cybersecurity Basics

What Is a DDoS Attack?

You're mid-match when the game suddenly disconnects everyone. Chat lights up: "we're getting DDoSed." Here's what that actually means — and how flooding a server with fake traffic can take down something that was working perfectly fine a second earlier.

Security ~9 min Beginner friendly
The Big Idea

What is a DDoS attack?

Picture a single doorway into a store, with a slow, steady stream of a few customers walking in every minute. No problem — there's plenty of room. Now picture ten thousand people shoving toward that same doorway at the exact same second. Nobody gets in. Not the people causing the crush, and not the regular customers who just wanted to buy something. The doorway is jammed solid for everyone.

That's exactly what happens to a website, an app, or a game server during a DDoS attack. DDoS stands for Distributed Denial-of-Service, and each part of that name describes a piece of what's going on:

  • Denial of Service — the "service" (the website, the game server, whatever it is) stops responding to anyone. It becomes unavailable because it's too overwhelmed to keep up.
  • Distributed — the flood of traffic doesn't come from one computer. It comes from thousands, sometimes millions, of computers, all sending requests at the exact same target at the exact same moment.

Simple definition: a DDoS attack floods a website or server with an overwhelming amount of fake traffic, sent from many computers at once, so it can't keep up — which means real visitors can't get through either.

You've probably seen the ordinary, non-attack version of this without realizing it had a name. A game launches a huge update, everyone logs on at once, and the servers slow to a crawl under real, honest traffic. That's not a DDoS attack — that's just popularity. A DDoS attack is that same "too many requests at once" crash, except every one of those extra requests is fake, sent on purpose, by someone trying to take the service down.


How It Works

Botnets: the "distributed" part

A single computer, even a fast one, usually can't generate enough traffic on its own to knock over a real website or game server. To pull off a DDoS attack, most attackers rely on something called a botnet.

A botnet is a large group of computers and other internet-connected devices — laptops, security cameras, smart TVs, even home routers — that have secretly been infected with malicious software, often without their owners ever noticing anything is wrong. Each infected device is called a bot, and an attacker can send one single command that tells all of them, sometimes thousands or millions of devices scattered all over the world, to send traffic at the same target at the same moment.

Curious how a device gets infected in the first place? That's exactly what malware and things like computer viruses, worms, and trojans do. This tutorial picks up after that part — once a botnet already exists and an attacker decides to point it at a target.

That's the "Distributed" part of DDoS in action. One attacker with one internet connection is relatively easy to stop — a defender just blocks that one source, and the flood ends. But a botnet spreads the exact same attack across an enormous number of separate, real-looking devices scattered around the world. Blocking any single one of them barely dents the flood, since tens of thousands of others are still sending requests. That's what makes a distributed attack so much more powerful, and so much harder to filter out, than an attack from a single machine.


Interactive

Watch a DDoS attack happen

Below is a simplified live traffic monitor for a small game server. Right now, only real players — the blue dots — are connecting, and the server handles it without any trouble. Click Launch DDoS Attack to flood it with fake botnet traffic (the red squares) and watch what happens, including to the real players still trying to get through.

Traffic monitor — coolgame.example HEALTHY
Requests / second 0
Real visitors served 0
Requests dropped 0
Server health
100%
Real visitor request Attack traffic (botnet)

Only real visitors are connecting right now, and the server is handling it easily.

Notice what happened once the flood got heavy: real player requests (blue) started disappearing into the wall of attack traffic before they could ever reach the server. That's the "denial of service" part in action — it isn't just the attacker's fake traffic that fails to matter, it's everyone's traffic, including people who had every right to be there.


Why It Matters

Real-world DDoS attacks

DDoS attacks aren't just a hypothetical exercise. They've taken down all kinds of real services people depend on:

Game servers. From small indie titles to massive online games, "we're getting DDoSed" outages during big matches or tournaments are common enough to have their own shorthand.

Streaming services. Video and music platforms have gone dark mid-attack, cutting off millions of viewers at once, sometimes during a major live event.

Hospitals and government sites. Some of the most serious DDoS attacks on record have targeted hospital networks and government agencies, disrupting services real people rely on.

Not every attacker has the same reason for doing this. Motives generally fall into a few buckets:

Grief and bragging rights

Some attackers are hobbyists who just want to knock a game offline mid-match, get back at an opponent, or show off to friends. This is sometimes called "griefing."

Extortion

Others treat it like a business: flood a company's site, then demand payment to make it stop. This is sometimes called a "ransom DDoS."

Protest

Some are activists — sometimes called "hacktivists" — using an outage to make a political statement by taking down a target they disagree with.


Fighting Back

How companies defend against DDoS attacks

Nobody wants their service to be one bad flood away from going dark, so real defenses usually stack several layers together:

Traffic scrubbing

Specialized filtering services watch incoming traffic for the telltale patterns of an attack — like thousands of near-identical requests from unfamiliar sources — and drop those before they ever reach the real server.

Spreading the load

Instead of one server handling every request, a content delivery network (CDN) spreads traffic across many servers in many locations, so no single point can be overwhelmed all by itself.

Rate limiting

A server can cap how many requests it will accept from a single visitor in a given time window. That alone won't stop a huge botnet, but combined with the other defenses, it helps flatten the flood.

None of these are perfect on their own — which is exactly why real-world defenses layer several of them together, the same "no single layer catches everything" idea you've seen throughout this series.



Your Turn

Check your understanding

Why is a DDoS attack launched from a 50,000-device botnet so much harder for a website to block than an attack coming from just one computer?

Your answer:

Sample answer: blocking one attacking computer is easy — a defender just blocks that one address, and the flood stops. But a botnet spreads the exact same attack across 50,000 separate devices and addresses, all sending traffic at the same time. Blocking any single one of those devices barely reduces the flood, since tens of thousands of others are still sending requests. That's what makes a distributed attack so much more powerful, and so much harder to stop, than an attack from a single source.


Check Yourself

Quick quiz

1. What does the "distributed" part of a DDoS attack mean?

2. What is a botnet?

3. Which of these is a real way companies defend against DDoS attacks?

Keep learning about cybersecurity

You've now seen how attackers can take a server offline with sheer volume instead of stealing anything at all. Next, learn about the people who get paid to find weaknesses like these on purpose — with permission — before a criminal does.

Part of the Cybersecurity Basics tutorial series.