tencent cloud

Background

As a next-generation distributed database management system designed for enterprises, TDSQL has powered the core system of WeChat Pay for long, making WeChat Pay a digital application with high performance and high availability. Lately, WeChat Pay has been upgraded to a data-intensive application based on TDSQL for PostgreSQL and can easily store terabytes of data in a single table. Features of TDSQL for PostgreSQL, such as high throughput, high concurrency, and auto scaling, fully meet the business needs of WeChat Pay.

Challenges & Goals

The merchant service platform of WeChat Pay, for example, is provided for tens of millions of merchants to download detailed bills, query bills with composite conditions, and perform statistical analysis. At the beginning, the platform stored data in an open source MySQL database. However, as JD.com and other large merchants joined the platform, the increasing volume of transactions soon exhausted the limited data storage of the standalone database, which caused serious capacity and performance bottlenecks for WeChat Pay. Imperatively in need of an effective solution, WeChat Pay chose TDSQL for PostgreSQL.

As a mature one-stop database solution, TDSQL for PostgreSQL is a distributed database management system capable of hybrid transaction/analytical processing (HTAP). It is developed for enterprises based on open source PostgreSQL, thanks to years of efforts of the Tencent Cloud database team.

Tencent Cloud Solution

TDSQL is a great solution to the challenges of WeChat Pay. It supports online linear scaling of storage, which allows WeChat Pay to store a massive amount of data. It adopts mechanisms such as double-key distribution to prevent data skews due to the uneven storage of large merchants’ data. It provides an optimized query method based on index-only scans, which shortens the time spent by a traditional web application in the pagination of all query results.

Over the past few years, TDSQL for PostgreSQL has helped WeChat Pay upgrade to a data-intensive application that supports an increasing number of scenarios, and has outperformed the open source MySQL database in many fields, such as the report system and dimension table system, with guaranteed business stability and continuity.

The report system of WeChat Pay supports two typical read and write modes. One is periodical write (such as once a day) based on Spark, an offline computing platform. In this mode, the number of data entries written each time may be very small or as large as billions or tens of billions. The other is real-time write based on message queues. In this mode, the big data system dumps a massive amount of data each time, which requires quite high data write performance of the underlying data storage. Compared with the open source MySQL database, TDSQL for PostgreSQL shows clear advantages in parallel writing performance and throughput. It significantly reduces the data write time and meets the requirements for building real-time reports.

Supporting more index types, TDSQL for PostgreSQL also beats the open source MySQL database in reading the report data. For example, given WeChat Pay’s tens of billions of data entries, it takes about 17 seconds to get the results in a fuzzy search for merchant names from the open source MySQL database. After the upgrade to TDSQL for PostgreSQL, the same operation takes less than 50 ms, which is a great performance leap.

Benefits

So far, WeChat Pay has stored more than 400 TB of data in its TDSQL for PostgreSQL database, which handles more than 240,000 requests per second, with the processing time of 99.6% of them controlled within 10 ms, fully meeting the challenging requirements for performance and stability.

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon