educative.io

What happen to requests in between last checkpoint and when failure occur

Hi,

Assume the last checkpoint is done at 1.00pm in the consistent state. The failure occur at 1.01pm, the system will restore the last consistent state at 1.00pm, right? What will happens to the request in between 1.00pm and 1.01pm?

Thank you


Course: Grokking Modern System Design Interview for Engineers & Managers - Learn Interactively
Lesson: Fault Tolerance - Grokking Modern System Design Interview for Engineers & Managers

Hi @Phong_Hua,
It depends on the system’s architecture, the kind of failure, and the recovery mechanism in place. Some systems may have a mechanism in place to record and maintain requests made between the checkpoint and the failure in order to reapply them when the system has been recovered. Other systems may have a mechanism in place to drop those requests while continuing to process incoming ones. For example, transactions in databases need to provide ACID guarantees, and they use a special mechanism that once they have reported success to the client, the accepted data will not be lost. They use many techniques, such as write-ahead logs, where they first push the request persistently before actually acting on it.
Hope this answers your query.
Happy learning! :slightly_smiling_face: