CephV · Distributed Systems FoundationsDistributed Systems Foundations
Node failure — "did not answer in time" is the only signal you get
What you'll learn
- Explain why crash and slowness are indistinguishable to a remote observer
- Describe how Ceph OSDs detect and report peer failure
- Interpret the down and out states and the interval between them
- Choose heartbeat and grace settings with an understanding of the trade
Prerequisites
None — start here.
Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18
Why this matters in production
You send a request to a node. Nothing comes back. There are three possibilities and no way to tell them apart from where you are standing: the node is dead, the node is alive but slow, or the network dropped your message.
This is not an engineering limitation to be solved. It is fundamental, and every failure-handling design is a choice about how long to wait before guessing.
How Ceph guesses
OSDs exchange heartbeats with the peers they share placement groups with:
osd_heartbeat_interval 6s how often heartbeats are sent
osd_heartbeat_grace 20s silence before a peer is reported failed
mon_osd_min_down_reporters 2 distinct reporters needed to act
mon_osd_down_out_interval 600s down duration before marked out
The sequence:
osd.7stops answering heartbeats from its peers.- After
osd_heartbeat_grace, peers report it to the monitors. - Once enough distinct reporters agree, monitors mark it
downand publish a new map. - If it is still down after
mon_osd_down_out_interval, monitors mark itout, CRUSH recomputes without it, and recovery begins.
Why multiple reporters are required
mon_osd_min_down_reporters defaults to 2. A single OSD reporting a
peer as failed proves only that those two cannot reach each other,
which may be the reporter’s problem.
Requiring several distinct reporters distinguishes “osd.7 is down” from “osd.3 has a broken NIC and cannot reach anyone”. On clusters with few hosts this matters, and it is why the setting is tied to reporters from different hosts rather than merely different OSDs.
Tuning, and when not to
The defaults are conservative and suit most clusters. Reasons to change them are narrow:
- Raise
osd_heartbeat_graceonly where network jitter is confirmed and understood — raising it delays every real failure detection too. - Lower
mon_osd_down_out_intervalon clusters where recovery is cheap and fast (small, all-NVMe) and long degradation is the bigger risk. - Raise it on large clusters where re-replicating an OSD is expensive and reboots are routine.
The instinct to tune these after an incident is usually wrong. Flapping is a symptom of a network or hardware problem, and widening the grace window hides it rather than fixing it.
Quiz
Knowledge check · 4 questions
Q1. Why does Ceph wait 600 seconds by default between marking an OSD down and marking it out?
Q2. A single OSD reporting a peer as failed is sufficient for the monitors to mark that peer down.
Q3. After a network incident, a team raises osd_heartbeat_grace from 20 to 120 seconds to stop OSDs flapping. Two weeks later a real OSD failure takes far longer to detect. Assess the decision.
60-OSD cluster. The original incident was a top-of-rack switch with a degrading uplink causing intermittent packet loss for about ten minutes. The team raised osd_heartbeat_grace cluster-wide and considered the matter closed. The switch was never replaced. Two weeks later an OSD host lost power; PGs stayed degraded for two extra minutes before recovery began.
Q4. Explain why a slow OSD can be more damaging than a failed one, and how it is detected.
Passing score: 75%. Answers are checked in this browser.
Production discipline
Set noout before any planned maintenance, because it blocks the
expensive out decision while leaving failure detection working.
Resist tuning heartbeat and grace settings in response to an incident:
flapping is a symptom of a network or hardware fault, and widening the
window delays detection of every genuine failure too. Treat ceph osd perf outliers as actionable without a health warning, since the
failure mode that health checks cannot see — a slow but responsive
OSD — is the one that degrades the most clients.
Cross-course references
- Ceph: Part LV (OSD States) for the full state machine.
- Ceph: Part LXXIX (Slow Ops) for diagnosing the slow-OSD case.
- Ceph: Part XCV (Maintenance Flags) for noout and its relatives.