🎓 BookMCQ
← Back to 17. Distributed Systems

📝 Failure detection in Robustness (11 MCQs)

Identifying Unresponsive Nodes and Services

Failure detection in distributed systems attempts to determine whether a remote process, machine, or service is unavailable or behaving abnormally. Since nodes communicate through networks with variable delay, detectors rely on observations such as missed heartbeats, expired timeouts, and unsuccessful requests. Their output helps coordinators initiate failover, recovery, or reconfiguration procedures.

Why Remote Failure Cannot Be Observed Directly

A silent node may have crashed, become overloaded, lost network connectivity, or simply responded slowly. A communication delay can therefore resemble a machine failure. Unlike local process monitoring, distributed failure detection cannot always distinguish a failed component from a temporarily unreachable one using timeouts alone.

Heartbeats, Timeouts and Health Checks

A monitoring process periodically sends a heartbeat request or expects a node to send status messages. If no response arrives within a configured interval, the detector marks the node as suspected or unavailable. Applications may perform additional checks before triggering failover, depending on the system's failure policy.

Example of a Missed Server Heartbeat

A monitoring service expects a heartbeat every two seconds from server A. No heartbeat arrives for ten seconds, so the detector marks A as suspected. The coordinator checks service health and may redirect requests to server B, while administrators investigate whether A crashed or the network path failed.

Detection Speed and False Suspicion

Short timeouts detect failures quickly but increase false suspicions during congestion or temporary pauses. Longer timeouts reduce false alarms but delay recovery. Adaptive detectors, multiple health signals, and quorum-based decisions can improve confidence, although no timeout alone proves a remote machine has permanently failed.

Misconceptions About Failure Detection

'A missed heartbeat proves the node has crashed' ignores network partitions and delays. 'A very long timeout guarantees correct detection' overlooks indefinite communication failure. 'Failure detection itself restores a service' is false because recovery or failover requires additional coordination and resource management.

Exam Focus: Heartbeats, Timeouts and Suspicion

Trace periodic heartbeat exchange and explain when a node becomes suspected. Compare short and long timeout settings in terms of detection delay and false positives. Questions may ask why network partitions complicate failure detection or how a coordinator uses detection results to initiate failover.

Key Terms of Failure Detection

  • Heartbeat - Periodic message indicating node activity.
  • Timeout - Maximum waiting interval for a response.
  • Failure detector - Component estimating node availability.
  • Suspicion - Provisional belief that a node failed.
  • False positive - Healthy node incorrectly suspected.
2
Easy
5
Medium
4
Hard

📝 All Failure detection in Robustness MCQs

Q1. Which technique commonly used for failure detection involves processes periodically sending short messages to each other?

A.Heartbeat ✅
B.Token passing
C.Checkpointing
D.Election
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Heartbeat messages are tiny signals that each process sends at regular intervals to indicate it is alive. When a heartbeat stops, the receiver suspects a failure. Token passing is a mutual‑exclusion protocol, checkpointing records state for recovery, and election selects a leader. In real systems, heartbeats let a monitoring service quickly notice a crashed server and trigger a replacement or fail‑over.

Q2. Why is failure detection considered more challenging in asynchronous distributed systems than in synchronous systems?

A.Because clocks are synchronized
B.Because message delays are unpredictable ✅
C.Because there are fewer nodes
D.Because network bandwidth is unlimited
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Asynchronous systems make no assumptions about upper bounds on message delivery time or processing speed, so a delayed message can be mistaken for a failure. Without a known bound, detectors must balance speed against false alarms. Synchronous systems provide guaranteed timing, simplifying detection. In practice, cloud services must tune timeouts carefully because network latency can vary widely, increasing detection difficulty.

Q3. How does the timeout interval affect the trade‑off between detection speed and false positives in a failure detector?

A.Shorter timeout leads to slower detection but fewer false positives
B.Longer timeout leads to faster detection
C.Shorter timeout leads to faster detection but more false positives ✅
D.Timeout does not affect false positives
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: A short timeout lets a detector declare a failure quickly, but if the network is slow it may mistakenly suspect a healthy node, creating false positives. A longer timeout reduces the chance of mistaken suspicions but delays real failure recognition. The correct choice depends on the expected network latency and the cost of false alarms. Real‑world monitoring tools often expose this timeout as a configurable parameter.

Q4. What is the main advantage of using a failure detector that provides 'suspicions' rather than definitive crash reports?

A.It guarantees no false suspicions
B.It reduces network traffic to zero
C.It eliminates the need for retries
D.It allows the system to continue operating while handling uncertainty ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: Suspicion‑based detectors acknowledge that information may be incomplete; they flag a process as possibly failed, allowing other components to proceed while awaiting confirmation. This avoids halting the whole system due to a single ambiguous event. Guarantees of no false suspicions are impossible in asynchronous environments, and traffic is not eliminated. Systems like peer‑to‑peer overlays rely on such probabilistic detectors to maintain progress despite occasional uncertainty.

Q5. In a system employing a gossip‑based failure detection protocol, what property ensures that information about a suspected failure eventually reaches all nodes?

A.Epidemic spread ✅
B.Centralized coordinator
C.Fixed routing tables
D.Deterministic broadcast
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Gossip protocols work by each node periodically selecting random peers and exchanging state, causing information to spread exponentially—an epidemic. This property ensures that, given enough rounds, a suspicion about a failure propagates to every participant. A centralized coordinator would create a single point of failure, fixed routing tables limit flexibility, and deterministic broadcast assumes a stable schedule, none of which provide the robustness of epidemic dissemination in dynamic networks.

Q6. A distributed database uses a heartbeat interval of 2 seconds and a timeout of 5 seconds. If a network partition causes a delay of 4 seconds for heartbeats, which outcome is most likely?

A.The detector will immediately declare the node dead
B.The detector will suspect failure of the partitioned node ✅
C.No suspicion will be raised
D.The system will increase the heartbeat interval automatically
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: With a 2‑second heartbeat, the next signal arrives 4 seconds late, so the elapsed time since the last heartbeat becomes 4 s + 2 s = 6 s, exceeding the 5‑second timeout. The detector therefore marks the node as suspected. It will not instantly declare the node dead because the timeout threshold has not been crossed yet, and automatic interval adjustments are not typically triggered without explicit logic.

Q7. Consider a system with N processes where each process sends a ping to every other process every TT seconds. The network can deliver messages with latency up to LL seconds. To guarantee that a real crash is detected within DD seconds with at most one false suspicion, which inequality must hold?

A.D≥T+LD \ge T + L and T≤LT \le L
B.D≥2TD \ge 2T and L<TL < T
C.D≥T+LD \ge T + L and T>LT > L ✅
D.D≥LD \ge L and T=DT = D
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: A crash will be noticed after the last successful ping plus the maximum latency, so detection time must be at least T+LT + L. To avoid false suspicions, the ping period must exceed the worst‑case latency, i.e., T>LT > L. Option C captures both requirements, while the other options either reverse the inequality or ignore the latency constraint, leading to either premature suspicions or delayed crash detection.

Q8. A microservice architecture uses a failure detector that adapts its timeout based on observed round‑trip times (RTT). After a sudden increase in network latency, the detector's timeout is set to μ+3σ\mu + 3\sigma where μ=100\mu = 100 ms and σ=20\sigma = 20 ms. What timeout value does the detector use, and how does this choice affect detection?

A.140 ms; it may cause many false suspicions
B.120 ms; it speeds detection but increases false positives
C.200 ms; it greatly delays detection
D.160 ms; it balances detection speed and false positives ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: Plugging the numbers gives 100+3×20=160100 + 3 \times 20 = 160 ms. Setting the timeout three standard deviations above the mean protects against typical jitter while still reacting relatively quickly to genuine failures. A shorter timeout (e.g., 120 ms) would raise false alarms during normal latency spikes, whereas a much larger timeout (200 ms) would delay failure recognition, potentially harming service‑level objectives.

Q9. In a blockchain network, nodes employ a failure detector that marks a peer as suspected after missing kk consecutive block proposals. If blocks are generated every 10 seconds and the network experiences occasional delays of up to 6 seconds, what is the maximum kk that balances timely detection with low false suspicion?

A.1
B.2 ✅
C.3
D.4
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: If a block is delayed by 6 s, the interval between two successive proposals can stretch to 16 s. Missing two proposals would imply a gap of up to 32 s, far exceeding typical delay, so a suspicion after two missed blocks is reasonable. One missed block (k = 1) could be a normal delay, leading to premature suspicions. Larger values (k = 3 or 4) would postpone detection unnecessarily. Thus, k=2k = 2 offers the best trade‑off.

Q10. Which statement correctly describes the relationship between strong completeness and eventual accuracy in failure detectors?

A.Strong completeness guarantees that every crashed process is eventually suspected, while eventual accuracy guarantees that no correct process is permanently suspected ✅
B.Strong completeness guarantees no false suspicions
C.Eventual accuracy means all failures are detected instantly
D.Strong completeness and eventual accuracy are unrelated
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Strong completeness means that every process that actually crashes will, at some point, be suspected by every other correct process. Eventual accuracy ensures that a correct process is not forever suspected; any temporary suspicion must eventually be cleared. The other options either deny false suspicions (impossible in asynchronous settings), claim instant detection (unrealistic), or suggest no connection, which contradicts the formal definitions used in distributed algorithms.

Q11. Why might a system choose an unreliable failure detector over a reliable one despite higher risk of false suspicions?

A.Because it reduces detection latency ✅
B.Because it eliminates the need for heartbeats
C.Because it ensures zero false positives
D.Because it simplifies implementation
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Unreliable detectors can declare a failure quickly, often using short timeouts or minimal communication, which is valuable when rapid response outweighs occasional false alarms—for example, in high‑frequency trading where milliseconds matter. The other options are inaccurate: eliminating heartbeats is rare, guaranteeing zero false positives is impossible in asynchronous environments, and implementation simplicity is not the primary driver for choosing unreliability.]

🔗 Related Topics (MCQs)