Skip to Content
Hands-On Microservices with Kubernetes
book

Hands-On Microservices with Kubernetes

by Gigi Sayfan
July 2019
Intermediate to advanced
502 pages
14h
English
Packt Publishing
Content preview from Hands-On Microservices with Kubernetes

Applying the saga pattern to microservices

Relational databases can provide ACID compliance for distributed systems through algorithms, such as two-phase commit and control over all the data. The two-phase commit algorithm works in two phases: prepare and commit. However, the services that participate in the distributed transaction must share the same database. That doesn't work for microservices that manage their own databases.

Enter the saga pattern. The basic idea of the saga pattern is that there is centralized management of the operations across all the microservices and that, for each operation, there is a compensating operation that will be executed if, for some reason, the entire transaction can't be completed. This achieves the atomicity ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kubernetes Microservices

Kubernetes Microservices

Richard Chesterwood
Cloud Native DevOps with Kubernetes

Cloud Native DevOps with Kubernetes

John Arundel, Justin Domingus
Microservices: Up and Running

Microservices: Up and Running

Ronnie Mitra, Irakli Nadareishvili

Publisher Resources

ISBN: 9781789805468Supplemental Content