This topic describes how ApsaraDB for MyBase is used to help Tianmian Lab ensure the high availability of hosts and databases.

Customer feedback

"ApsaraDB for MyBase provides dedicated resources and the secure and controllable services that allow independent O&M. This significantly strengthens our resolve to migrate new business to the cloud. ApsaraDB for MyBase offers a high-availability solution that is unavailable in the PostgreSQL community and solves problems including slow bug fixing and time-consuming recovery from data corruption. ApsaraDB for MyBase also provides OS permissions and supports resource overcommitment. These features meet our O&M requirements and help us reduce costs."

-- O&M Director

Customer profile

Tianmian Lab is an all-in-one financial technology provider that is owned by WeLab Limited, a leading financial technology company in Asia. Tianmian Lab provides financial technologies for traditional financial institutions and enterprises. Tianmian Lab has developed a risk management system based on the core technologies including big data analysis, AI, and machine learning. This system enables WeLab Limited to intelligently manage risks that may affect financial products across multiple regions including Hong Kong (China), mainland China, and Indonesia. Tianmian Lab also provides more than 600 enterprises with customized and modularized financial technology services in terms of credit and loans, risk management, customer acquisition, and marketing. The risk management strategies delivered by Tianmian Lab have been repeatedly verified over years of experience. This enables Tianmian Lab to provide more precise and more intelligent financial technology services than its competitors.

Challenges

  • In earlier versions, Pgpool-II and PgBouncer are used. This solution is not sophisticated or highly available.

  • PostgreSQL 9.4 is outdated and provides poor performance in terms of data replication, partitioning, and some other features. In the solution provided by the PostgreSQL community, kernel bugs are difficult to be fixed.

  • The time-consuming recovery from data corruption affects the recovery time objective (RTO). The long downtime window has negative impacts on the running services.

  • For core business, the services are transformed to microservices at the application layer. However, the databases of the services are still coupled with each other and the databases have I/O bottlenecks. As a result, database sharding is required.

  • To reduce the query workloads on the primary database, a dozen of read-only secondary databases are added based on the resource and business requirements. However, these secondary databases have different resource utilization rates, and resource usage spikes cause heavy workloads on some secondary databases.

Solutions

  • Use ApsaraDB for MyBase to ensure high availability of hosts and databases.

  • Upgrade PostgreSQL 9.4.15 of the community edition to AliPG 11.1.

  • Adjust the concurrency level in Data Transmission Service (DTS). This allows you to smoothly migrate data on the fly.

  • Use the features of ApsaraDB for MyBase to maximize resource utilization if the resources assigned to the primary database are not used by secondary databases.

Benefits

  • ApsaraDB for MyBase ensures the high availability of hosts and databases. This improves the RTO in a significant way.

  • The resource scheduling mechanism and resource overcommitment feature ensure service stability during peak hours.

  • ApsaraDB for MyBase delivers high performance and consumes fewer computing and storage resources than other solutions.

  • ApsaraDB for MyBase migrates core data to the cloud and fixes some issues in the community edition of PostgreSQL. This service also provides dedicated resources and the secure and controllable services that allow independent O&M.