Designing the edge · wrap-up
Cheat sheet & self-check
Every command from this section on one page.
Safe vs breaking changes
Safe (additive) | New endpoint, new optional field in a request, new field in a response, new enum value consumers are told to tolerate |
Breaking | Removed or renamed field or endpoint, changed type, new required request field, changed meaning, stricter validation |
Lifecycle tools
OpenAPI | The contract: paths, schemas, auth, examples |
Spectral (or similar) | Lint the contract against your style rules |
oasdiff (or similar) | Compare two OpenAPI versions in CI; fail on breaking changes |
Deprecation / Sunset headers | Tell clients an endpoint is deprecated and when it will stop working |
Layers
DDoS protection | Absorb floods: network (L3/L4) at the provider edge, HTTP floods (L7) with rate rules |
WAF | Known attack patterns: SQL injection, XSS, path traversal, bad protocol use |
Bot management | Tell humans, good bots and bad bots apart; protect logins and checkouts |
Gateway | Authentication, per-client limits, request size and timeout limits |
Origin protection | Backends accept traffic only from the edge |
Rollout
Detection (count) mode first | Log what would be blocked; tune false positives |
Then block, rule group by rule group | Watch blocked-request dashboards and support tickets |
Steering methods
GeoDNS | Answer by the resolver's location |
Latency-based DNS | Answer with the region measured fastest from that network |
Weighted DNS | Split traffic between regions by percentage |
Failover DNS | Primary while healthy, secondary when not |
Anycast global load balancer | One IP everywhere; the provider steers and fails over in seconds |
Failover checklist
Health check | Deep enough to reflect users (a synthetic request), not just 'port open' |
Capacity | The surviving region can take the extra load |
Data | Replication lag (RPO) known; writes allowed in only one place unless designed otherwise |
Drill | Fail over on purpose regularly; measure RTO |
AWS
CloudFront | CDN and edge TLS, functions at the edge |
AWS WAF / Shield | Web application firewall, rate-based rules / DDoS protection |
Application Load Balancer | L7 load balancing into VPCs and EKS (AWS Load Balancer Controller) |
Amazon API Gateway | Managed API front door: authorizers, usage plans and API keys, throttling |
Global Accelerator | Anycast IPs and fast regional failover |
Azure
Azure Front Door | Global edge: CDN, L7 global load balancing, WAF |
Application Gateway for Containers | L7 load balancer for AKS, Gateway API and Ingress support |
Azure API Management | API gateway + developer portal; policies such as validate-jwt, rate-limit-by-key, quota-by-key |
APIM self-hosted gateway | Run APIM's gateway in your own clusters, managed from Azure |