Stackbook Logo
observabilityestablished · medium operational burden

Synthetic Monitoring

Also known as: synthetic-probes, blackbox-monitoring

Intent

Continuously exercise critical user journeys with scripted probes to detect outages before real users report them.

Problem

Internal metrics can look healthy while users cannot log in or check out, for example when DNS, a CDN, or a certificate fails. Low-traffic periods leave no real requests to reveal problems.

Forces

  • •Real user traffic is uneven and may be absent at night
  • •Internal metrics miss edge and network failures
  • •Probes must be realistic but safe
  • •Probes themselves can be flaky

Solution

Overview

Synthetic monitoring, also called black-box monitoring, tests a system from the outside the way a user would. It complements white-box metrics, which only report what the system knows about itself. A probe fails when the user path fails, regardless of whether internal dashboards are green.

How it works

Probes run from multiple regions on a fixed interval and record success, latency, and step timings.

every 60s, from eu, us, ap:
  GET  /health/deep           expect 200 under 500ms
  POST /login (test account)  expect token
  GET  /cart                  expect 200
  POST /checkout (sandbox)    expect order id
  check TLS expiry            warn at 14 days

alert if: 2 of 3 regions fail 3 consecutive runs

Probe results become an availability SLI: successful runs divided by total runs. Use a dedicated header or account so requests are identifiable in logs and excluded from product metrics. Journey steps should reuse the same code paths as real traffic, including the CDN and public DNS name, not an internal endpoint.

Pitfalls

  • Probing only a shallow health endpoint. It can return 200 while the database is unreachable; probe real journeys.
  • Running from one location, which turns that location's problems into false incidents.
  • Letting scripts rot. Treat them as code with tests and owners.
  • Forgetting cleanup of created data, which grows tables and skews reports.

Key takeaways

  • Probes catch failures that internal metrics cannot see.
  • Run from several locations and require agreement before paging.
  • Use dedicated test accounts and tag the traffic.
  • Combine with real user monitoring for full coverage.

✓ When to Use

  • •Critical journeys such as login and checkout
  • •Low-traffic or newly launched services
  • •Checking edge, DNS, and certificate health

✗ When Not to Use

  • •Replacing real user monitoring for coverage of actual behavior
  • •Flows that cannot be made side-effect free
  • •Services with no stable external entry point

Pros

  • +Detects outages with no user traffic
  • +Consistent baseline for availability and latency
  • +Finds edge and network failures

Cons

  • −Scripts break when the UI changes
  • −Limited coverage of real user paths
  • −Test data and accounts need upkeep

Cost Profile

Infrastructure

Medium - probe hosts or vendor fees

Operational

Medium - script maintenance

Cognitive

Low - simple concept

Failure Modes

  • Probe passes via a cached or health-check path while the real path fails

  • Single probe location causes false pages during its own network issue

  • Test account pollutes production data or triggers real charges

Real-World Examples

Alternatives

    Related Patterns

    • sli-slo
    • observability
    • golden-signals

    Competency Domains

    reliability ops