6.6.2 About Global and Local Transactions

When a transaction initiator service makes a call to MicroTx to begin an XA transaction, by default this transaction is handled as a global transaction.

Global transaction is a transaction that is associated with a GTRID. For example, transactions that span across multiple microservices or transactions that involve a single microservice interacting with multiple resource managers.

Local transaction is a transaction that is not associated with a GTRID. For example, when a transaction includes a single service that interacts with a single resource manager. Such transactions can be handled locally, as you don't need a coordinator to manage this transaction. The MicroTx client library manages the local transactions. By handling a transaction locally, without using the MicroTx coordinator, you can experience better performance. Local transactions save time and increase throughput.