From the course: Microservices: Design Patterns

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Atomic transaction-based microservices

Atomic transaction-based microservices

From the course: Microservices: Design Patterns

Atomic transaction-based microservices

- There are potentially times in a microservices architecture where you need to have true atomic transactions because eventual consistency isn't good enough. When those atomic transactions span multiple data domains, there is a distinct need to build special logic and systems to handle these unique use cases. One of the primary characteristics of these services is the need to guarantee ACID-compliant transactions across more than one data domain. If you need atomic transactions in a single domain, there is no need to specialize a service, because the underlying implementation is hidden. However, providing these cross-domain services that support failure domains and rollbacks of the entire domain scope must have a solution. These services force a blocking API call until the commit is successful. While you can logically do these asynchronously, usually the caller needs a guarantee of success or an error, so the API must be synchronous and blocking. You may be tempted to use data domains…

Contents