Performance Overhead of XA Data Sources - Best Practices

妖精的绣舞 提交于 2019-12-10 15:47:18

问题


I am trying to understand the Impact of XA Datasources on Performance.

In many applications, it happens that not all the transactions need to participate in Distributed Transactions (meaning only a few transactions require to be distributed/participating with other resources).

Is the trade-off of the performance high enough to have two data sources configured (one each for XA and non-XA)? Again, the answer is, it depends on the scenario, but I am looking for "Best Practices".


回答1:


It is worth to use XA transactions only when required. The XA commit code path has a cost of 3-4 times compared to the non-XA case. Most of the cost is caused by the additional communication. The shorter the transaction the higher the cost.

There are some XA features that try to reduce the cost: like 1-Phase commit optimization and the read-only optimization. Also promotable XA can help if the underlying database and drivers support it.



来源:https://stackoverflow.com/questions/12305900/performance-overhead-of-xa-data-sources-best-practices

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!