Defense in depth: edge system design
Designing the defense means deciding, layer by layer, who inspects what, how much latency it costs and whether the system opens or closes when a control goes down.
What it is
A request crosses several layers before reaching the data: the edge (CDN and ), an API gateway, the application and the database. is designing the whole so that the failure or bypass of one layer does not bring down the rest, placing each control where it is cheapest and most precise.
The request path and the role of each layer
The edge is great for what does not depend on business context (volume, signatures, bots). But it does not know whether a user may see that order: that is authorization, and only the application knows it. Each layer covers the blind spot of the previous one.
client
-> edge (CDN + WAF + bot + rate limit) cheap, at scale: block the obvious and the volumetric
-> API gateway identity, schema, per-client quotas
-> application per-object authorization, business rules
-> data least privilege, encryption, auditingLocking down the origin
An excellent WAF is useless if the attacker talks directly to the origin. The origin should accept traffic only from the edge: provider IP list, mutual authentication between edge and origin, or private tunnels. Without this, anyone who discovers the real address bypasses all the protection.
Fail-open or fail-closed
Every security layer can fail (configuration error, outage, faulty rule). The design question is what happens: fail-closed blocks everything (safe, but it is an outage), fail-open lets traffic through (available, but unprotected). There is no universal answer: a payment endpoint tends to close, a public page tends to open, and the decision should be conscious, documented and tested.
Latency and blast radius
- Latency budget: each layer adds milliseconds; deep body inspection fits only where it matters.
- : a new rule hits all traffic; that is why the rule first enters observation and on a subset.
- Change as code: rules in a repository (Terraform, for example), with review and rollback, instead of clicks in the dashboard.
- Observability in all layers, to know in which one a request was stopped.
connections on the map
- Defense in depth: edge system designdefines where it livesAdaptive rate limiting
- Defense in depth: edge system designpositionsWAF - observation, shadow and enforcement
updated on 14/10/2026 · sources to go deeper · report an error
in other domains
- Network - segmentation and zero-trustcloudsecsegmentation and edge designed together
Study before
test what you learned
Loading questions…