Home / Companies / Temporal / Blog / Post Details
Content Deep Dive

Compensating Actions, Part of a Complete Breakfast with Sagas

Blog post from Temporal

Post Details
Company
Date Published
Author
Emily Fortuna
Word Count
1,599
Language
English
Hacker News Points
7
Summary

The compensating action pattern is a design pattern for handling failure amongst distributed but related services. It provides transaction-like guarantees for a sequence of operations in distributed systems by either letting the sequence run successfully to completion or undoing state changes made by executed operations if there's a failure. This sequence of steps is called a "long-running transaction". Compensating actions are an important component of the saga design pattern, which ensures that there is a way to "go backwards" (undo) and end up with a consistent state in case of failure.