Rethinking “2PC is not an option in Microservices”

Hiroyuki Yamada
Scalar Engineering
Published in
1 min read4 hours ago

The statement “2PC is not an option” has prevailed among application developers working on microservices architectures.

The reason for this is likely due to the idea being popularized in a post titled Pattern: Transactional outbox and in the 2017 QCONSF conference presentation, “ACID Is So Yesterday: Maintaining Data Consistency with Sagas.”

However, with new technologies, the downsides of 2PC are not only addressed but there is an increased merit to utilizing 2PC in microservices. I also believe that approaches like Saga are no longer a good option in microservices due to the burden and complexity to application developers.

At the KubeDay conference in August 2024, I spoke about my thoughts in more detail. I reviewed the approaches for handling transactions in microservices, such as Saga, TCC, and 2PC, summarized the pros and cons, considered ways to address the cons, and proposed one practical and effortless way.

See the presentation here:

For more details about the session, please check the KubeDay site.

--

--

Hiroyuki Yamada
Scalar Engineering

CTO of Scalar, Inc. Passionate about parallel and distributed data management systems.