DDoS Protection
Defending against attacks that try to overwhelm your systems.
1The Highway Traffic Jam Analogy
DDoS (Distributed Denial of Service) attacks overwhelm systems with traffic from many sources, making services unavailable to legitimate users. The "distributed" part makes it hard to block.
2Types of DDoS Attacks
Volumetric Attacks
Flood with massive bandwidth. UDP floods, ICMP floods, SYN floods.
Goal: Saturate network links
Defense: CDN, anycast, scrubbing centers
Application Attacks
Target specific endpoints. HTTP floods, Slowloris, API abuse.
Goal: Exhaust server resources
Defense: WAF, rate limiting, bot detection
Protocol Attacks
Exploit protocol weaknesses. SYN floods, ping of death.
Goal: Exhaust state tables, connections
Defense: SYN cookies, connection limits
3Defense Layers
4Rate Limiting Strategies
Per-IP Limiting
100 requests/minute per IP. Simple but can affect users behind NAT.
Per-User Limiting
Rate limit authenticated users. Doesn't help for unauthenticated attacks.
Per-Endpoint
Stricter limits on expensive endpoints (search, login).
Sliding Window
Smooth limits. 100/min checked continuously, not per minute block.
5Real-World Mitigation
6Protection Services
Cloudflare
CDN + DDoS + WAF. Free tier includes DDoS protection.
AWS Shield
Standard (free) protects L3/L4. Advanced ($3k/mo) adds L7 and support.
Akamai
Enterprise-grade. Massive network capacity.
Google Cloud Armor
GCP WAF + DDoS. Integrates with Cloud CDN.
7Key Takeaways
?Quiz
1. Attack floods your /search endpoint with complex queries. Type?
2. Best first line of defense against volumetric DDoS?