A networked service has finite resources: link capacity, packet-processing time, connection state, file descriptors, worker slots, memory, CPU, and downstream capacity. A denial-of-service attack consumes one or more of those resources so legitimate users cannot make progress.
A denial-of-service (DoS) attack can come from one source. A distributed denial-of-service (DDoS) attack coordinates traffic from many sources, such as compromised devices or abused third-party servers. Distribution makes filtering harder and can produce far more traffic than one sender.
Not every overload is malicious. A product launch, failed retry policy, crawler bug, or network misconfiguration can create similar symptoms. A robust system must handle overload safely even before the operator knows its cause.
This chapter focuses on three attacks with very different traffic shapes:
The correct defense depends on which resource is becoming unavailable.