A brief introduction to Alipay Distributed transaction testing scheme

Source: Internet
Author: User
Tags commit

What is a distributed transaction

The traditional solution based on database local transaction can only guarantee the atomicity, isolation, consistency and persistence of single service processing, but it can't guarantee the consistency of processing among multiple distributed services. Therefore, we must establish a set of coordination mechanism among distributed service processing to ensure the atomicity, isolation, consistency and permanence of distributed service processing.

Why Alipay needs distributed transactions

Based on the SOA architecture, the entire Alipay system is split into a series of independently developed, self-contained, autonomous business services, which are flexibly assembled into the products and solutions needed by the end-user through a variety of mechanisms.

When multiple services collaborate to complete a business, due to business constraints (such as the red envelopes do not meet the use of conditions, account balances, etc.), system failures (such as network or system timeouts or interrupts, database constraints are not satisfied, etc.), can cause the service processing in any step can not continue, so that the data in an inconsistent state, Have serious business consequences, we need a distributed transaction solution to coordinate the business consistency of multiple services.

Alipay's Distributed Transaction framework

Alipay developed a distributed transaction based on a two-phase commit theory (two Phase commit), first giving a logical diagram of phase two submissions:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.