Back to blog
Infrastructure September 10, 2026

Infrastructure Observability & Health Checks: Probing Host Saturation and Service Endpoints

Automate WhatsApp Alerts
Start Free ➔

Modern distributed infrastructure fails in complex, non-linear ways. A single saturated worker node, an exhausted file-descriptor pool, or a silent DNS resolver bottleneck can bring down an entire microservices cluster while traditional status checkers report green.

Reliable Site Reliability Engineering (SRE) infrastructure observability requires a dual-pronged approach: white-box host telemetry (measuring CPU run queues, memory pressure stall information, disk await times, and socket queues) combined with black-box synthetic endpoint probing (measuring Layer 3 to Layer 7 protocol boundaries across DNS, TCP, TLS, and HTTP response transitions).

This guide details the architecture of multi-layer health checks, outlines mathematical models for queuing saturation and capacity headroom, provides an SRE threshold matrix for Linux hosts, and delivers production runbooks for isolating infrastructure bottlenecks.


1. Infrastructure Observability Architecture

Observability is not merely collecting telemetry; it is understanding how resource saturation at the host level translates into user-facing latency and error spikes.

[ Global Synthetic Probes (Pingzo) ]
                 │
                 ├── Layer 3: ICMP & Anycast Route Verification
                 ├── Layer 4: TCP Handshake & Port Availability
                 ├── Layer 6: TLS Certificate & Cipher Negotiation
                 └── Layer 7: HTTP / REST / GraphQL Payload Assertions
                 │
                 ▼
[ Ingress Load Balancer / Envoy Proxy ]
                 │
                 ├───────────────────────────────────────┐
                 ▼                                       ▼
    [ Worker Host / Pod A ]                 [ Worker Host / Pod B ]
    ├── White-Box Telemetry                 ├── White-Box Telemetry
    │   ├── CPU Run Queue & PSI             │   ├── CPU Run Queue & PSI
    │   ├── Memory Pressure (OOM/Swap)      │   ├── Memory Pressure (OOM/Swap)
    │   └── Storage I/O Latency (await)     │   └── Storage I/O Latency (await)
    │   └── Socket Backlogs & FDs           │   └── Socket Backlogs & FDs
    │                                       │
    └── Local Health Endpoints              └── Local Health Endpoints
        ├── /livez (Process Liveness)           ├── /livez (Process Liveness)
        └── /readyz (Dependency Readiness)      └── /readyz (Dependency Readiness)

1.1 White-Box vs Black-Box Monitoring Boundaries

  • White-Box Telemetry (Internal State): Exposes internal kernel metrics, garbage collection pauses, buffer pool saturation, and queue lengths via Prometheus Node Exporter, cAdvisor, or application runtimes.
  • Black-Box Probing (External Reality): Evaluates behavior exactly as experienced by external users and downstream consumers, probing network reachability, TLS negotiation latency, and HTTP response codes from distributed external regions.

2. Host Saturation: What to Measure

High CPU or memory utilization does not necessarily signify an outage; saturation does. Saturation occurs when resource demand exceeds total processing capacity, causing requests to queue up and tail latency to explode.

2.1 CPU Utilization vs Saturation

  • Utilization: The percentage of time CPU cores execute instructions over an interval.
  • Saturation (Run Queue): The number of runnable processes waiting for CPU time in /proc/stat and /proc/loadavg.
  • CPU Steal Time: The percentage of time a virtualized machine's virtual CPU waits for the hypervisor to allocate physical CPU cycles (indicating noisy neighbors in AWS EC2 or GCP Compute Engine).

2.2 Memory Pressure and PSI (Pressure Stall Information)

Relying on MemFree is misleading because Linux aggressively uses free RAM for page caching. SREs evaluate:

  • MemAvailable: Real estimate of memory available for starting new applications without swapping.
  • PSI (/proc/pressure/memory): Measures exact CPU cycles wasted waiting on memory reclaim and paging.
  • OOM (Out-of-Memory) Invocations: Kernel killing processes when anonymous pages and slab memory exceed cgroup limits.

2.3 Storage I/O Saturation

  • await: Average time (in milliseconds) for I/O requests issued to the device to be served (including queue time).
  • Queue Depth: Number of outstanding read/write operations waiting in the kernel device queue.
  • Inode Exhaustion: Filesystems running out of file metadata indices (df -i) even when raw gigabytes remain available.

2.4 Network & Socket Saturation

  • TCP Retransmissions: Indicates packet loss across virtual switches or transit providers.
  • SYN Backlog Exhaustion: Inability of the host kernel to accept new TCP three-way handshakes.
  • File Descriptor (FD) Exhaustion: Reaching the system or process limit (ulimit -n), preventing new network sockets from opening.

3. SRE Saturation Threshold Matrix

SignalHealthy BandWarning ThresholdCritical Incident BoundaryFailure Mode
CPU Utilization( < 70% )( 70% - 85% )( > 85% ) sustained 5mRun-queue growth, scheduling delays
CPU Steal Time( < 1.5% )( 2% - 5% )( > 5% ) for 2mHypervisor contention, noisy neighbors
Memory Available( > 20% )( 10% - 20% )( < 10% ) or PSI > 25%OOM Killer termination, page thrashing
Disk await( < 8,\text{ms} )( 10,\text{ms} - 25,\text{ms} )( > 30,\text{ms} ) sustainedThread starvation, HTTP 504 timeouts
FD Utilization( < 65% )( 70% - 85% )( > 85% )EMFILE (Too many open files) errors
TCP RetransmissionsBaseline (( < 0.2% ))( 2\times ) baseline( > 5\times ) baselineTransit packet loss, TCP reset storms
Filesystem Inodes( < 70% )( 70% - 85% )( > 90% )Inability to write logs or temp files

To model allowed downtime windows and evaluate the financial impact of infrastructure saturation, use the SLA Calculator and Downtime Calculator.


4. Mathematical Models for Saturation & Capacity

4.1 Little's Law in Host Queuing

When an endpoint experiences I/O or CPU delays, concurrent in-flight connections accumulate according to Little's Law:

[ L = \lambda \cdot W ]

Where:

  • ( L ): Average number of concurrent requests executing in the host worker pool.
  • ( \lambda ): Arrival rate of incoming requests per second.
  • ( W ): Average service duration (latency) per request.

If database disk saturation increases average endpoint latency ( W ) from ( 40,\text{ms} ) to ( 800,\text{ms} ) at an incoming arrival rate of ( \lambda = 500,\text{req/s} ):

[ L_{\text{healthy}} = 500 \times 0.040 = 20 \text{ concurrent connections} ] [ L_{\text{saturated}} = 500 \times 0.800 = 400 \text{ concurrent connections} ]

A 20-fold spike in concurrent connections instantly exhausts Nginx worker_connections and Node.js thread pools.

4.2 Capacity Headroom Formulation

[ H = 1 - \frac{U_{\text{current}}}{U_{\text{capacity}}} ]

Where ( U_{\text{current}} ) is the current sustained throughput and ( U_{\text{capacity}} ) is the saturation knee point where latency increases exponentially.


5. Designing Resilient Health Check Endpoints

A naive health check that queries every database and downstream cache on every ping creates an architectural anti-pattern called Health Check Cascading Failure.

# Kubernetes Production Health Probe Configuration
apiVersion: apps/v1
kind: Deployment
metadata:
  name: api-service
spec:
  template:
    spec:
      containers:
        - name: app
          image: api-service:v2.14.0
          ports:
            - containerPort: 8080
          # Liveness Probe: Verifies process event loop is not deadlocked
          livenessProbe:
            httpGet:
              path: /livez
              port: 8080
            initialDelaySeconds: 15
            periodSeconds: 10
            timeoutSeconds: 2
            failureThreshold: 3
          # Readiness Probe: Verifies local connection pools are open
          readinessProbe:
            httpGet:
              path: /readyz
              port: 8080
            initialDelaySeconds: 5
            periodSeconds: 5
            timeoutSeconds: 2
            failureThreshold: 2

Health Check Semantics:

  • /livez (Liveness): Evaluates strictly whether the process is alive and responsive. If it fails, the container is restarted. Do not check external databases in /livez.
  • /readyz (Readiness): Evaluates whether the pod can accept traffic (e.g., local database connection pool initialized). If it fails, traffic is temporarily unrouted without killing the pod.

6. Protocol-Level Endpoint Diagnostics & Latency Breakdown

Endpoint latency is the sum of discrete protocol handshakes:

[ T_{\text{request}} = T_{\text{DNS}} + T_{\text{TCP}} + T_{\text{TLS}} + T_{\text{queue}} + T_{\text{server}} + T_{\text{transfer}} ]

6.1 Multi-Phase Socket Breakdown via cURL

Run precise socket and transfer latency breakdowns against your service endpoints:

curl -sS -o /dev/null \
  -w "DNS: %{time_namelookup}s | TCP: %{time_connect}s | TLS: %{time_appconnect}s | TTFB: %{time_starttransfer}s | Total: %{time_total}s | Status: %{http_code}\n" \
  https://api.pingzoapp.com/healthz

6.2 Host Saturation Diagnostic Commands

When investigating a saturated Linux instance:

# 1. Inspect CPU run queue and context switches
vmstat 1 5

# 2. Check per-core CPU utilization and steal time
mpstat -P ALL 1 3

# 3. Analyze disk I/O await times and queue depth
iostat -xz 1 3

# 4. Check socket memory and TCP listen backlog overflow
ss -s
cat /proc/net/netstat | grep ListenOverflows

# 5. Check file descriptor utilization
cat /proc/sys/fs/file-nr

7. Prometheus Alerting Rules for Infrastructure Saturation

Implement production PromQL alert rules for host and endpoint health:

groups:
  - name: infrastructure_saturation_alerts
    rules:
      # Alert on sustained CPU run queue saturation
      - alert: HostCpuSaturationHigh
        expr: |
          (node_load1 / count without (cpu, mode) (node_cpu_seconds_total{mode="idle"})) > 1.8
        for: 5m
        labels:
          severity: warning
          tier: infrastructure
        annotations:
          summary: "Host CPU run queue exceeds 1.8x core capacity"
          description: "Instance {{ $labels.instance }} has high runnable task backlog."

      # Alert on Disk I/O Await latency exceeding 25ms
      - alert: DiskIoLatencyCritical
        expr: |
          (
            rate(node_disk_read_time_seconds_total[5m]) + rate(node_disk_write_time_seconds_total[5m])
          ) / (
            rate(node_disk_reads_completed_total[5m]) + rate(node_disk_writes_completed_total[5m])
          ) > 0.025
        for: 3m
        labels:
          severity: critical
          tier: infrastructure
        annotations:
          summary: "Disk I/O await latency exceeds 25ms"
          description: "Disk {{ $labels.device }} on {{ $labels.instance }} is experiencing severe I/O queueing."

      # Alert on synthetic probe HTTP failures
      - alert: EndpointProbeFailure
        expr: |
          probe_success{job="blackbox-http"} == 0
        for: 1m
        labels:
          severity: critical
          tier: endpoint
        annotations:
          summary: "Synthetic health probe failing for endpoint {{ $labels.instance }}"
          description: "External blackbox probe returned non-2xx status code."

8. Ten-Step Troubleshooting Runbook: Infrastructure Degradation

  1. Verify incident scope by checking whether latency and errors originate on a single host, a specific availability zone, or the entire fleet.
  2. Execute cURL socket timing breakdown to determine if latency is concentrated in DNS (time_namelookup), TCP connect (time_connect), TLS handshake (time_appconnect), or backend TTFB (time_starttransfer).
  3. Inspect host CPU run queues and steal time via vmstat 1 and mpstat to detect CPU starvation or hypervisor contention.
  4. Examine memory pressure stall information (/proc/pressure/memory) and dmesg -T | grep -i oom to verify whether processes are being killed.
  5. Analyze disk I/O await latency with iostat -xz 1 to identify disk saturation from unindexed queries or write-heavy logging.
  6. Check socket queues and connection states via ss -s to detect SYN backlog drops or ephemeral port exhaustion.
  7. Verify file descriptor limits via cat /proc/sys/fs/file-nr to confirm worker processes are not dropping connections due to EMFILE limits.
  8. Inspect load balancer target group health to detect if healthy nodes are being aggressively evicted due to overly sensitive health check thresholds.
  9. Engage temporary traffic shedding or auto-scaling to dilute per-instance load while preserving database connectivity.
  10. Validate recovery with independent synthetic probes from multiple geographic regions before closing the incident.

9. SRE Infrastructure Readiness Checklist

  • Decouple /livez and /readyz: Ensure liveness probes do not perform deep dependency checks that trigger cascading container restarts.
  • Configure PSI and Run-Queue Alerts: Alert on sustained resource queues rather than raw momentary utilization spikes.
  • Set Socket & Connection Limits: Tune somaxconn, tcp_max_syn_backlog, and nofile limits for high-concurrency worker nodes.
  • Deploy Global Synthetic Monitors: Run independent multi-phase HTTP and TLS checks every 60 seconds from external vantage points.
  • Automate Error Budget Policies: Tie infrastructure scaling and deployment freezes directly to monthly SLO burn rates.

Related SRE Architecture & Incident Runbooks

When refining your observability and infrastructure monitoring stack, explore these related engineering guides:

Zero-Code Uptime Alerts

Stop Finding Out About Outages from Angry Users

Get instant WhatsApp & Discord alerts the second your API, website, or server goes down. Setup in 30 seconds with 60-second checks.

WhatsApp & Discord 60-Second Checks Free Forever Plan
Try Pingzo Free

Know before your users do

Connect official WhatsApp notification channels, Discord webhooks, Telegram bots, and public status pages. Start in 30 seconds.

Create Free Monitor