Two-phase commit optimizations and tradeoffs in the commercial environment
Abstract
An atomic commit protocol can ensure that all participants in a distributed transaction reach consistent states, whether or not system or network failures occur. One widely used protocol is the two-phase commit (2PC) protocol, which has long appeared in the literature. Much of the literature focuses on improving performance in failure cases by providing a non blocking 2PC that streamlines recovery processing at the expense of extra processing in the normal case. We focus on improving performance in the normal case based on two assumptions: first that networks and systems are becoming increasingly reliable, and second that the need to support high-volume transactions requires a streamlined protocol for the normal case. In this paper, various optimizations are analyzed in terms of reliability, savings in log writes and network traffic, and reduction in resource lock time. Its unique contributions include the description of some optimizations not described elsewhere and a systematic comparison of the optimizations and the environments where they cause the most benefit.