advancedDistributed Transactions: Why 2PC Fails at Scale

Why can't @Transactional alone keep two different services' databases consistent?

@Transactional guarantees atomicity within ONE database connection — it has no mechanism for guaranteeing that a write in one service's database and a write in a completely separate service's database either both happen or neither does.

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.

Why can't @Transactional alone keep two different services' databases consistent?

Next Step

Continue to Why does 2PC rarely survive contact with real production microservices despite being theoretically correct?← Back to all Spring Cloud questions