Monitoring replication
Track replication lag and replica health with Prometheus-style metrics so you know how fresh a replica is.
To rely on replicas safely, you need to know how far behind they are. Silos exposes Prometheus-style metrics so you can watch replication lag and replica health and alert when a replica drifts too far from the primary.
What to watch
The single most important signal is replication lag — how far a replica trails the primary, measured by the gap between the primary's latest WAL position and the position the replica has applied.
| Signal | Why it matters |
|---|---|
| Replication lag (per replica) | How stale a replica's reads can be right now |
| Replica apply position (LSN) | Whether a replica has caught up to a given write |
| Replica health / availability | Whether a region's replica is up and serving |
When lag is low, eventual and read-your-writes reads from that replica are fresh. When
lag spikes, read-your-writes and strong
consistency protect correctness by waiting for catch-up or routing to the primary — but
high lag is still worth alerting on, because it signals a streaming or capacity problem.
How to consume the metrics
Metrics are exposed in a Prometheus-compatible format, so you can scrape them with Prometheus and visualize or alert with your existing stack (Grafana, Alertmanager, or any Prometheus-compatible tooling). A typical setup:
- Scrape the metrics endpoint with Prometheus.
- Graph replication lag per replica/region.
- Alert when lag exceeds your tolerance (tie the threshold to the staleness your app accepts — see Consistency levels).
Using lag in your decisions
- If a replica's lag is within your app's tolerance, prefer local reads there.
- If lag is high, prefer strong reads (primary) for correctness-sensitive paths until the replica recovers.
- Persistent high lag in a region usually points to the streaming path or replica capacity — investigate rather than masking it with stronger consistency everywhere.
Replication metrics describe a path that is still rolling out. As global WAL streaming matures, the lag you observe — and its reliability as a signal — will improve. Until then, use lag as a guide and keep the primary as your dependable read source for critical data. See the Replication overview.