How do you protect against DDoS attacks?
⚡
Quick Answer
Use a CDN and DDoS protection service (AWS Shield, Cloudflare) to absorb and filter traffic, apply rate limiting and WAF rules, over-provision/auto-scale, and design for graceful degradation.
Detailed Answer
Defense spans layers: edge scrubbing and anycast CDNs absorb volumetric (L3/L4) floods; WAF and rate limiting handle application-layer (L7) attacks; auto-scaling and load balancing add capacity; and caching plus circuit breakers protect origins. Have a runbook and provider support engaged in advance, since response speed matters during an attack.
💡
Interview Tip
Distinguish volumetric (L3/L4) from application-layer (L7) attacks and the different mitigations each needs.
ddossecurityresilience