skip to content

DDoS Detection & Mitigation

You will learn to classify DDoS attacks by layer and match each to its countermeasure — SYN cookies for state exhaustion, RTBH and BGP Flowspec for volumetric floods, anycast scrubbing for absorption at scale. Interviewers love this topic because it exercises TCP, BGP, and capacity reasoning in one scenario question.

on this pageshow

explore

questions

28

A 200 Gbps flood hits your 10 Gbps uplink: what can a rented scrubbing centre do that your edge firewall cannot?

level: juniorimportance: must knowfreq 72%

answer

  1. the fight happens upstream of you
  2. your transit link fills first
  3. dropping it late frees nothing
  4. someone with a much bigger front door
  5. capacity rented, with a bill attached

basics

~20 s

Nothing at your edge helps, because the transit link is already saturated before packets reach your firewall. A scrubbing provider has far more inbound capacity, absorbs and filters the flood upstream, and forwards only cleaned traffic to you.

solid answer

~50 s

The fight is lost upstream of anything you own. A 200 Gbps flood fills the 10 Gbps transit circuit itself, so your legitimate traffic is already discarded by congestion on your provider's side; a deny rule on your firewall only decides the fate of packets that survived the queue, and dropping them frees no bandwidth on the link they already crossed. Renting clean pipes moves the filtering to a network whose ingress capacity is measured in terabits: the provider takes delivery of the attack, discards it there, and hands you back only what passed. What you are buying is capacity and a place to stand, not a smarter rule. The price is real — a standing commitment or a per-event bill, a dependency on somebody else's control, and a return path you also have to pay for and keep working.

go deeper

for a junior

Be ready to say plainly that the congestion happens on the link into your site, so any drop decision you make behind that link is too late. Name capacity, not cleverness, as the thing being rented.

for a middle

An interviewer expects you to explain why source-based denies fail at this scale and to name what the rented service costs: a standing fee, added latency if traffic always transits it, and a return path you also pay for.

for a senior

Show judgment about when not to divert. Say which attacks fit inside your uplink and should be handled where you have application context, and what your own edge must still do to traffic the provider has already passed.

for a principal

Own the framing that this is a capacity purchase with a permanent dependency attached: somebody else's network in your critical path, somebody else's verdicts on your customers, and a bill that must be defended on the 364 days nothing happens.

## The shape of the problem A volumetric denial-of-service attack does not defeat a security control; it defeats a **pipe**. Your service reaches the internet through a transit circuit of some fixed capacity — say 10 Gbps. When an adversary directs 200 Gbps of traffic at your addresses, the congestion happens on your upstream provider's router, on the interface that faces you. That interface has 10 Gbps of outbound capacity toward you and 200 Gbps of demand, so it drops about 95% of everything — attack packets and real customers alike, without regard to which is which. Everything you own is *behind* that interface. Your edge router, your firewall, your load balancer and your servers only ever see the ~10 Gbps that got through. This is the single most important fact about volumetric attacks and it is the one candidates most often miss. ## Why edge filtering does not help A firewall rule that denies the attack sources is not wrong — it is simply irrelevant to the outcome. Consider what dropping a packet at your edge actually saves: | Where the packet is dropped | Bandwidth reclaimed on the congested link | |---|---| | Your firewall / server | none — the packet already crossed it | | Your edge router | none — same link | | Your transit provider's router | all of it | | A network several hops further out | all of it, closer to the sources | Dropping traffic only helps at or before the point of congestion. Since the point of congestion is the last mile you rent, only somebody upstream of it can help you. That somebody is either your transit provider (with a blunt instrument) or a mitigation provider you have contracted with. A second reason edge filtering fails: at these volumes the attack is usually spread across tens of thousands of sources, often reflected off innocent third-party servers, so there is no small source list to deny. And your firewall itself has a finite packet-per-second rating; a flood of small packets can exhaust its forwarding or state capacity long before it exhausts the bandwidth. ## What renting capacity actually buys A scrubbing provider operates edge capacity vastly larger than any single customer's uplink, distributed across many locations. Traffic destined for you is steered into that network, inspected and filtered there, and only the traffic judged legitimate is delivered onward to your origin. Two things are being rented, and they are different: - **Capacity** — the ability to take delivery of hundreds of gigabits without falling over. This is the part your own budget could never justify buying outright, because you would need it for a few hours a year. - **A vantage point** — a place in the path that sits ahead of the congestion, where a drop decision still means something. ## What it costs, and why that matters in the interview The half of this answer that separates a strong candidate from a weak one is the price. Renting clean pipes is not free protection; it is a set of ongoing obligations: - **Money on a quiet day.** Whether you keep traffic flowing through the provider permanently or only during an event, there is a standing fee, usually tied to a committed level of clean traffic, and often a separate per-event charge. - **Latency and dependency.** If your traffic always transits their network, every ordinary request pays whatever detour that implies, on every day of the year when nothing is happening — and their outage becomes your outage. - **A return path.** Cleaned traffic still has to reach your origin somehow, over a tunnel or a dedicated circuit that you also pay for and that has its own capacity ceiling. - **Someone else's verdicts.** The control that decides which of your customers are real is operated by a third party. Their logs are theirs; when a partner reports failures during mitigation, you can raise a ticket, not run a query. ## Where renting is the wrong answer If the attack fits inside your uplink — a few thousand requests per second against an expensive endpoint, say — the congestion argument does not apply, and diverting buys you latency, cost and a change window in exchange for a control that may have less context about your application than you do. Rented capacity is the answer to *volume*, and volume specifically. ## The honest one-line summary You cannot filter your way out of a full pipe from behind the pipe. You either own enough capacity to absorb the flood, or you rent someone else's — and renting has a bill, a latency cost, a dependency and a return path attached to it.

  • If the provider absorbs the flood, why keep filtering rules at your own edge at all?
    Because the provider only filters what it can see and judge. Application-layer abuse that looks like ordinary requests, anything arriving direct to your origin because someone bypassed the diversion, and internal traffic never touch their edge. Rented capacity answers volume; your own edge still enforces policy on whatever survives the scrubbing, and it is the only place you have full logs.
  • What kind of attack is the wrong reason to divert into rented capacity?
    One that fits comfortably inside your uplink. A slow application-layer flood at a few megabits per second causes no congestion, so the capacity argument does not apply. Diverting costs you latency, money and a change window, and the provider often has less context about your application than you do. Handle that where you can see the request and the session.
  • Does the attack traffic stop when you divert?
    No. The adversary keeps sending; the traffic is simply delivered somewhere that can absorb it. That matters for two reasons: the moment you stop paying for or stop using the diversion, the flood lands on your uplink again, and any address of yours that is not covered by the diversion is still reachable and still attackable.

A blocked motorway does not clear because the car park at the end has a barrier. The jam has to be diverted before the exit, on a road wide enough to hold it.

saying these in an interview costs you the question

  • Says a bigger firewall would have absorbed the flood
  • Thinks denying source addresses at your edge frees uplink bandwidth
  • Assumes the transit provider filters floods for free
  • Treats scrubbing as free once the contract is signed
  • Believes diverting makes the attacker stop sending

context

open as a page

What does a BGP blackhole announcement for a flooded /32 stop, and what does it finish?

level: juniorimportance: must knowfreq 62%

basics

~20 s

It stops the flood from reaching your access link, because the upstream discards those packets inside its own network. It finishes the outage: every packet to that address is dropped, so legitimate users lose the service too.

open as a page

One address announced from twelve sites absorbs a flood, yet no site's rate threshold fires — why?

level: juniorimportance: must knowfreq 62%

basics

~20 s

Each site sees only its own share of the flood. A per-site threshold is compared against roughly one twelfth of the total, so an attack far above your planning number can stay under every local trigger and never alert anyone.

open as a page

Why does a bits-per-second DDoS threshold never fire when an attacker's 400 search requests a minute exhaust the database pool behind a public API?

level: juniorimportance: must knowfreq 62%

basics

~20 s

Because the threshold and the damage are measured in different units. Four hundred small, well-formed requests are a trivial number of bits and packets; the cost lands as work per request inside the service, which the border never counts.

open as a page

Launch morning traffic is 30x normal: what does the request-rate graph alone prove about who is sending it?

level: juniorimportance: must knowfreq 70%

basics

~20 s

Only that requests arrived. A rate count carries no sender identity, no intent and no outcome. A flood shaped to look like growth and a real launch draw the same curve, which is exactly why an attacker picks that hour.

open as a page

When SYN cookies engage under a spoofed SYN flood, what does the server stop storing, and what does it lose by holding nothing?

level: juniorimportance: must knowfreq 52%

basics

~20 s

It stops creating a half-open record for each arriving SYN, encoding what it needs into the reply instead, so spoofed senders cost it nothing. Holding no record, it cannot resend that reply or remember the options the client offered.

open as a page

Under a spoofed-source flood, what does an address-validation round trip prove, and what does it cost?

level: juniorimportance: must knowfreq 60%

basics

~20 s

It proves only that the source address really receives traffic: a spoofed sender never collects the reply and drops out. It proves nothing about intent, so a botnet host with a real address passes. Every honest client pays one extra round trip.

open as a page

Why can a layer-4 front end drop an attacker's request but never price it, while the service that can price it has already paid?

level: middleimportance: must knowfreq 48%

basics

~20 s

Dropping needs only addresses, ports and connection state. Pricing needs the parsed request and often the plan behind it, so by the time the cost is knowable the parse, the worker and possibly the transaction have already been spent.

open as a page

A blackhole stopped the flood in forty seconds but took eleven unrelated services with it, so what went wrong?

level: seniorimportance: must knowfreq 51%

basics

~20 s

The discard matched a destination address, not a service, and that address was shared. Eleven services answered on the same front-end IP, so killing the address killed all of them. The failure was the address plan and the missing inventory, not the routing decision.

open as a page

An attacker floods your origin's own address directly, ignoring your twelve-site footprint — how did they find it?

level: seniorimportance: must knowfreq 55%

basics

~20 s

From public history, usually: passive DNS showing the address your name used to resolve to, and Certificate Transparency logs listing hostnames such as the origin's own. The footprint records nothing, because no packet ever reached a site.

open as a page

Your two edge stacks disagree on a launch-day spike — 40x normal versus 3x — with ten minutes to decide. How do you call it?

level: seniorimportance: must knowfreq 45%

basics

~20 s

Stop trying to reconcile the multiples; they are ratios over different denominators and no shared history exists to settle them. Switch from how much to what shape, act reversibly on the launch path only, and say out loud what would make you disarm.

open as a page

You turn on a browser challenge for all traffic at the front door during a flood — who breaks, and how should you have sequenced it?

level: seniorimportance: must knowfreq 54%

basics

~20 s

Everything that is not an interactive browser breaks: partner server-to-server calls, the payments provider's callback, embedded and no-JavaScript clients, and old mobile builds. Sequence it as observe-only first, exempt the known machine paths before enforcing, then enforce narrowly and keep a way back.

open as a page

Compare always-on and on-demand scrubbing diversion: what does each cost on a quiet day and expose during a flood?

level: middleimportance: should knowfreq 58%

basics

~20 s

Always-on routes every ordinary request through the provider all year: a standing commitment plus a latency and dependency tax on quiet days. On-demand is cheaper at rest but leaves minutes of exposure and bills per event.

open as a page

Why does a BGP blackhole announced to only one of your two transits leave the flood arriving?

level: middleimportance: should knowfreq 44%

basics

~20 s

Because the request is per neighbour. The transit you asked discards the traffic; the second transit never saw the tagged route, still has a normal path to your covering prefix, and keeps delivering its share of the flood onto that link.

open as a page

What decides how much of a flood each site absorbs when one address is announced from many sites?

level: middleimportance: should knowfreq 46%

basics

~20 s

Other networks decide, not you. Each source network's own BGP best-path choice for your prefix picks the site it reaches, so the split follows routing policy and peering, not geography — uneven, and it moves.

open as a page

During a suspected flood, why is 'thousands of source addresses across hundreds of networks' not evidence of an attack?

level: middleimportance: should knowfreq 55%

basics

~20 s

Because a genuine crowd is distributed too. Address spread measures reach, not intent. The discriminating structure is the joint one: many sources presenting very few distinct client fingerprints means one client run from many places, not many people.

open as a page

SYN cookies admitted a satellite client's long-lived API connections during a flood; a month on they are still slow. Why?

level: middleimportance: should knowfreq 44%

basics

~20 s

The stateless reply carried no window-scale option, so those connections agreed no scaling and are capped at 65,535 bytes in flight. On a 300 ms path that ceiling is under 2 Mbps, and it lasts for the life of the connection.

open as a page

Diverting to a scrubbing centre by BGP prefix or by DNS name: what does each one leave exposed?

level: seniorimportance: should knowfreq 45%

basics

~20 s

Prefix diversion moves everything in the block, protocols included, but its smallest practical unit is a whole /24, so unrelated services divert with it. Name diversion protects only what resolves through that name and leaves the origin address directly attackable.

open as a page

Your DDoS appliance logs zero mitigations while an attacker's crafted export requests keep an API down - what do you tell the service team that filed the ticket, and where must the control move?

level: seniorimportance: should knowfreq 44%

basics

~20 s

Answer with evidence, not a refusal: show border and service counters for the same window, explain why a traffic-rate meter cannot see per-request cost, and hand the control to an admission check in front of the expensive call.

open as a page

Your front-ends answer with SYN cookies, but a botnet completes every handshake — what does the defence still stop?

level: seniorimportance: should knowfreq 46%

basics

~20 s

Nothing about this attack. Stateless admission only removes the cost of half-open connections from senders that never reply. A peer that completes the exchange is admitted like a customer and consumes a real socket, a worker and the work behind the request.

open as a page

You add a client-side CPU puzzle to price out a botnet flood — who ends up paying more, you or the attacker?

level: seniorimportance: should knowfreq 45%

basics

~20 s

Usually you. Puzzle difficulty is capped by your weakest legitimate device, so the toll stays small, and a botnet pays it in parallel on hardware and electricity that are not the attacker's. You add latency for every real user and barely dent a funded flood.

open as a page

Why can a front end refuse an attacker's expensive-to-parse request but not an expensive-to-answer one, and what does that check cost?

level: middleimportance: nice to knowfreq 30%

basics

~20 s

Parse cost is a property of the request's own bytes - size, nesting depth, expansion ratio - so a front end can cap it by shape. Answer cost lives in data the front end has never seen.

open as a page

What does the application's own session store show during a suspected flood that the edge access log cannot?

level: middleimportance: nice to knowfreq 32%

basics

~20 s

Whether arrivals ever became sessions with a forward path — a second request, state returned, something completed. The edge sees arrivals; only the application sees whether anything went anywhere. Traffic sent to consume capacity tends only ever to arrive.

open as a page

A front door records every challenge token it issues; under a spoofed flood, why does that fail and what does the fix cost?

level: middleimportance: nice to knowfreq 30%

basics

~20 s

Recording issued tokens re-creates the per-client state the challenge existed to avoid, so the flood fills that table instead of the connection queue. Make the token self-validating — a keyed hash over the source address and a timestamp — and verify it by recomputing rather than looking it up.

open as a page

After scrubbing, how does cleaned traffic reach your origin, and what does that return path break?

level: seniorimportance: nice to knowfreq 33%

basics

~20 s

Cleaned traffic comes back over a tunnel or dedicated circuit you also pay for. That path caps how much clean traffic arrives, shrinks the usable packet size through encapsulation, and makes flows asymmetric because replies leave by normal transit.

open as a page

Your twelve sites each graph their own traffic — how do you produce one credible number for what the estate received?

level: seniorimportance: nice to knowfreq 32%

basics

~20 s

Aggregate flow records from every site into one collector on a common clock, scale each site's counts by its own sampling rate, count each packet once, and report a peak per-second rate rather than a byte total.

open as a page

Before an on-call may announce a BGP blackhole, what must the architect settle in writing?

level: principalimportance: nice to knowfreq 32%

basics

~20 s

Who is pre-authorised to take a named address offline, the longest prefix they may announce and who signs for anything coarser, the trigger and the withdrawal clock, and whether the organisation buys a granular upstream alternative for the addresses that may never go dark.

open as a page

Monthly floods make SYN cookies engage and silently cap distant customers' throughput. How do you decide, and who owns it?

level: principalimportance: nice to knowfreq 28%

basics

~20 s

Frame it as a trade the business owns: refused connections for everyone during floods versus invisible throughput loss for a minority of distant customers. Make the invisible half measurable first, then get a named owner to accept the residual.

open as a page