Comprehensive guide for sre golden signals covering essential concepts, practical examples, and production best practices.
SRE Golden Signals are the four fundamental metrics that every system must monitor to ensure reliability and performance. They provide a shared language across engineering teams, enabling early detection of issues, effective alerting, and rapid root-cause analysis. These signals—latency, traffic, errors, and saturation—are not just indicators; they are the foundation of observability in distributed systems. Use them when you need to know whether your service is healthy, what’s degrading, and why.
The primary purpose of Golden Signals is to answer the question: *Is the system working as expected, and how well?* Each signal addresses a different dimension of system behavior, and together they form a complete picture. When a service fails, it is rarely due to just one metric. The Golden Signals help identify the root cause by revealing how latency, traffic, errors, and saturation interact.
Latency measures how long a unit of work takes to complete. It is the time between the start of a request and the time the response is fully delivered. The most useful latency metric is the distribution of request durations, not just a single average.
To observe latency effectively, record the time from request arrival to response completion. For HTTP services, measure request_start to response_end. For gRPC, capture start to finish of the call. The signal is not the average alone; it is the 95th, 99th, and 99.9th percentiles, which reveal tail latency—slow requests that impact user experience.
A typical latency configuration in a service using OpenTelemetry with Prometheus and Grafana includes:
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
http:
endpoint: "0.0.0.0:4318"
exporters:
prometheus:
endpoint: "0.0.0.0:8889"
namespace: "sre"
const_labels:
job: "api-service"
service: "user-profile"
processors:
batch:
timeout: 10s
send_batch_size: 1000
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [prometheus]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [prometheus]
In Grafana, a latency dashboard includes panels for:
histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))rate(http_request_duration_seconds_sum[5m]) / rate(http_request_duration_seconds_count[5m]) (mean latency)rate(http_request_duration_seconds{job="api-service", service="user-profile"}[1h]) (per-service 99th percentile)Latency fails silently when the 99th percentile grows while the mean stays flat. This indicates a few long-running requests that do not affect the average but degrade user experience. A common failure mode: a background job locks a database index, causing 10% of requests to take 3 seconds instead of 200ms—visible only in the 99th percentile.
Traffic represents the volume of work the system processes. It is measured as the rate of incoming requests per second, or the number of active connections, or the total data throughput.
Use rate(http_requests_total[5m]) to get requests per second. For high-throughput services, include the distribution of request sizes and the volume of payloads.
A service using nginx with prometheus instrumentation emits:
server {
listen 80;
location / {
access_log /var/log/nginx/access.log combined;
proxy_pass http://backend;
# Enable metrics
stub_status on;
location /status {
access_log off;
stub_status on;
}
}
}
Prometheus scrapes /status and captures:
nginx_http_requests_total (counter)nginx_http_requests_per_second = rate(nginx_http_requests_total[1m])nginx_up (gauge, 1 if server up, 0 otherwise)Traffic signals fail when the system handles more load than expected but does not scale. A common error: traffic spikes during a marketing campaign, but the database connection pool remains at 20 connections. The system begins queuing requests, but this is not visible in latency alone. The key insight: traffic and latency must be viewed together.
Errors track the fraction of requests that fail. A request is considered failed if it returns a non-2xx HTTP status code, a gRPC error code other than OK, or a custom error flag.
Define error detection through a simple rule: a request is an error if the response status is >= 400 or includes a error field in the body. For HTTP, use:
-- In Prometheus
rate(http_request_duration_seconds_count{status_code=~"4..|5.."}[5m])
/ rate(http_request_duration_seconds_count[5m])
This gives the error rate per second. To detect error spikes, use a histogram of error codes and a time-series graph of error rate over time.
A service logs error details into a structured format:
{
"timestamp": "2023-10-05T14:32:01.123Z",
"request_id": "a1b2c3d4",
"method": "POST",
"path": "/api/v1/users",
"status": 500,
"error": {
"code": "DATABASE_TIMEOUT",
"message": "Query took longer than 3s",
"details": {
"sql": "SELECT * FROM users WHERE id = ?",
"params": [12345]
}
}
}
The error signal fails silently when the system returns 200 OK but includes a success: false in the body, which is ignored by the monitoring pipeline. This is common in microservices: a service calls a dependency and marks success if the call returns, even if the response body indicates failure.
Saturation measures how close the system is to its capacity. It answers: *Is the system under pressure?* Saturation is the fraction of available resources that are in use.
Key saturation metrics include:
1 - avg(rate(node_cpu_seconds_total{mode="idle"}[5m])))1 - avg(node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes))redis_queue_length, kafka_consumer_lag)pg_stat_activity counts)rate(node_network_receive_bytes_total[5m]))For a service with a message queue, use:
# Check Kafka consumer lag
kafka-consumer-groups.sh --bootstrap-server kafka:9092 \
--describe --group user-service \
--command-config /etc/kafka/client.properties
Output includes:
GROUP TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG
user-service user-events 0 12345 12500 155
user-service user-events 1 8900 9100 200
Saturation fails when the system runs at 80% capacity but the 95th percentile latency is still high. The reason: the system is saturated but not yet overloaded. A common mistake: using a single threshold (e.g., CPU > 80%) to trigger alerts, but ignoring the shape of the utilization curve. A service with a steady 75% CPU may be under pressure, but the alert only triggers when it hits 80%.
The true power of Golden Signals lies in their correlation. A system is healthy when all four signals are stable. A failure is evident when one or more signals deviate.
When latency spikes, check traffic and errors. If traffic is constant and errors are low, the issue is likely internal to the service—e.g., a slow database query. If traffic is increasing and errors are rising, the system is overloaded—perhaps a scaling bottleneck.
When errors increase, examine saturation. If CPU is high and queue depth is growing, the system is saturated. If disk I/O is high and memory usage is near capacity, the bottleneck is likely storage.
When saturation increases, monitor traffic and latency. If traffic is stable but saturation grows, the system is inefficient—perhaps a memory leak or a poorly tuned cache.
Alerts should be built around the signals, not the individual metrics. Use alerting rules that combine multiple signals.
In Prometheus, create an alert that triggers when latency, errors, and saturation all exceed thresholds:
# alerts.yaml
groups:
- name: sre-golden-signals
rules:
- alert: HighLatency
expr: |
histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m])) > 1.0
for: 5m
labels:
severity: warning
annotations:
summary: "95th percentile latency > 1s"
description: "Latency has been above 1s for 5 minutes"
- alert: ErrorSpikes
expr: |
rate(http_request_duration_seconds_count{status_code=~"5.."}[5m]) /
rate(http_request_duration_seconds_count[5m]) > 0.05
for: 10m
labels:
severity: critical
annotations:
summary: "Error rate > 5%"
description: "Error rate has been above 5% for 10 minutes"
- alert: SaturationWarning
expr: |
avg(
avg(node_cpu_seconds_total{mode="idle"}) /
avg(node_cpu_seconds_total{mode="system"})
) < 0.3
for: 15m
labels:
severity: warning
annotations:
summary: "System CPU utilization < 70%"
description: "Average CPU utilization has been below 70% for 15 minutes"
Alerts fail when they are too sensitive. A latency alert with for: 1m triggers on a 2-second spike, but the system is actually stable. The optimal configuration: use for: 5m for latency and error alerts, and for: 15m for saturation.
content-length header that is not part of the response body. The client measures time from Content-Length to Content-Length + 1, causing latency to be shorter than actual.{ success: false }, but the monitoring pipeline checks only status code. The error rate is too low because internal failures are hidden.memory_utilization as a key saturation metric.rate() and increase().SRE Golden Signals are not just a list of metrics—they are a diagnostic framework. They guide engineers through the process of observing, diagnosing, and responding to system failures. Use latency to understand user experience, traffic to measure load, errors to assess reliability, and saturation to detect bottlenecks. When these signals are monitored together, they reveal not just *what* failed, but *why* it failed.
This page was rewritten on 18 October 2026. It replaced a templated version that was not specific to its own title. How these pages are written and checked. If anything here is wrong, tell us at [email protected] and we will correct it.
We use cookies for analytics (Google Analytics) and advertising (Google AdSense) to improve your experience and support free content. Privacy Policy