Prompt
I need a monitoring setup that can tell the difference between DNS, CDN, and application outages
Latest observation
Yes — the key is to monitor each layer separately so you can classify failures instead of just detecting “site is down.”
1) Use layered probes
Set up checks from the outside in:
A. DNS health
Check:
- authoritative DNS responds
- resolution time
- correct A/AAAA/CNAME answers
- propagation from multiple recursive resolvers
Typical signals:
- NXDOMAIN when it shouldn’t
- SERVFAIL / timeout
- wrong IP returned
- unusually high DNS latency
B. CDN / edge health
Check:
- content can be fetched from the CDN
- edge returns expected headers/status
- origin is reachable through CDN
- cache behavior / edge response time
Typical signals:
- DNS resolves, but HTTP requests to the CDN fail
- 5xx from edge
- TLS issues at edge
- cache hit ratio drops suddenly
- origin shield/origin fetch failures
C. Application health
Check:
- app endpoints return valid responses
- login/search/checkout/API routes work
- database-backed transactions succeed
- synthetic transactions complete
Typical signals:
- CDN is healthy, but app returns 500/502/503
- specific endpoints fail while homepage works
- latency spikes in app-tier only
- business-transaction failures
2) Classify failures by probe results
A simple decision tree:
-
DNS outage
- DNS lookup fails or returns wrong record
- no HTTP request can even begin
-
CDN outage
- DNS works
- request reaches CDN
- edge returns error / timeout
- origin may still be healthy if bypassed
-
Application outage
- DNS works
- CDN works
- app endpoint returns 5xx, bad content, or fails transaction checks
3) Recommended monitoring design
External synthetic checks
Run from multiple regions:
dig/ resolver lookup- HTTP GET to CDN URL
- HTTP GET to origin bypass URL or direct origin IP/host
- Critical business transaction check
Internal health checks
Inside your network:
- app health endpoint
- dependency checks: DB, cache, queue, auth
- origin server health
- CDN/origin log correlation
4) Alerting logic
Use separate alerts, not one generic alert.
Examples:
- DNS alert: resolution fails from 2+ regions for 3 consecutive probes
- CDN alert: DNS succeeds but CDN endpoint fails from 2+ regions
- App alert: CDN succeeds but application transaction fails
- Degraded alert: latency/error rate thresholds exceeded but service still partially works
5) Practical implementation options
You can build this with:
- Prometheus + Blackbox Exporter
- Grafana Synthetic Monitoring
- Datadog Synthetics
- Pingdom / UptimeRobot / StatusCake
- Cloudflare + origin health checks if you use a CDN like Cloudflare
If you want strong classification, use:
- separate monitors for DNS, CDN, and app
- multiple probe locations
- one check that bypasses CDN to the origin
- logs/metrics to confirm which layer broke
6) Minimal example setup
For a website www.example.com:
-
DNS monitor:
dig www.example.com @1.1.1.1,@8.8.8.8, and authoritative NS -
CDN monitor:
https://www.example.com/healthzwith headers that identify CDN response -
Origin bypass monitor:
https://origin.example.internal/healthzor direct origin IP with Host header -
App monitor:
https://www.example.com/api/loginor a full synthetic login flow
7) Best practice
Use a small status taxonomy:
- DNS failure
- CDN failure
- Origin failure
- App failure
- Partial degradation
This makes incident response much faster because the alert itself tells on-call where to look first.
If you want, I can sketch a concrete architecture for your stack (e.g. AWS/Cloudflare, Kubernetes, NGINX, etc.) or give you a Prometheus/Grafana example.