What is the difference between TCC and 2PC?

such as the title, recently, when I was reading some articles on distributed transactions, I saw some nouns, such as TCC and 2PC
, but after reading them for a long time, I felt that the two seemed to be about the same. I can"t see the difference. I hope the seniors who know this can give us some advice

.

2pc and 3pc are implemented on mysql xa and are implemented in the db layer (that is, the directly connected mysql), tcc business layer implementation conforms to the soa concept and is decoupled. And more stable

Menu