Question 15 of 15 · CIE-1 QB · 7 marks
Open in ChatGPTDifferentiate between backward recovery and forward recovery techniques used in distributed systems.
Introduction
When a process fails, its state may be inconsistent with the rest of the system. Recovery restores a correct state in one of two directions: back to a state the system knows was correct, or forward to a state it can compute.
Backward recovery
The system rolls back to an earlier correct state and re-executes from there.
- Uses checkpoints saved to stable storage, together with message logging.
- After a failure the process restarts from its last consistent checkpoint and replays the inputs.
- In a distributed system the checkpoints must form a consistent cut: no message is recorded as received unless its send is also recorded.
- Cost: the work between the checkpoint and the failure is lost and redone.
Forward recovery
The system brings the failed component to a correct new state without rolling back.
- Uses redundancy: a replica takes over, or the system computes the correct state from its current (possibly damaged) state.
- Example: RAID reconstructs a lost block from parity; a standby server promoted with a fresher state log.
- It requires a way to compute the correct state, which is application-specific.
- Cost: no lost work, but it needs the extra state or replica.
Comparison
| Point | Backward recovery | Forward recovery |
|---|---|---|
| Direction | Undo to a past state | Repair to a new state |
| Needs | Checkpoints, message log | Redundancy, repair algorithm |
| Work lost | Yes, since the checkpoint | None |
| Complexity | Consistent checkpoints in a distributed system | Computing the correct state |
| Example | Rollback recovery in a database | RAID rebuild, standby takeover |
Conclusion
Backward recovery is general and mechanical: save state, restore state: but it discards work and needs consistency across processes. Forward recovery keeps the work but needs redundancy and an application-specific repair, so systems use both: checkpoints for crash recovery, replication for availability.