Blog编组 28
How MYbank Uses OceanBase to Scale Its Businesses and Lower Costs

How MYbank Uses OceanBase to Scale Its Businesses and Lower Costs

右侧logo

MYbank, a pioneer in China’s digital banking sector, is redefining the online banking landscape in the country. As China’s first private commercial bank that put its core banking system entirely on the cloud, MYbank has been revolutionizing the banking experience for millions of users, especially for small-and-micro enterprises (SMEs).

MYbank, established in 2015, has embraced a fully digital approach from day one, setting it apart from traditional banking institutions. This strategy has enabled MYbank to serve the needs of millions of clients across China effectively. In 2021, MYbank provided digital financial services to over 45 million small-and-micro enterprises (SMEs) on a cumulative basis.

To meet the needs of its significant user base, MYbank has adopted a technology architecture that is both scalable and resilient, ensuring its ability to handle the ever-growing demand for its innovative financial services while maintaining top-notch performance and reliability.

At the heart of any digital service lies the data that supports its seamless operation, and MYbank is no exception. To realize its technological goals of scalability and resilience and provide stable financial services, MYbank relies on OceanBase as its core database.

OceanBase, a financial-grade distributed database, plays a crucial role in ensuring the scalability, high availability, and cost efficiency required by MYbank to meet the diverse needs of its ever-growing customer base. By integrating OceanBase into its technology architecture, MYbank has successfully harnessed the power of distributed database technology to drive innovation and maintain its position as a leading digital pioneer in the banking industry.

Challenges

From its foundation, MYbank has been unwavering in its commitment to Inclusive Financing, a concept promoted by the United Nations, which aims to ensure that financial services are accessible to all, regardless of their economic status. In line with this vision, MYbank has been dedicated to providing comprehensive financial services to a diverse range of clients, including SMEs, rural clients, individual consumers, and small and medium-sized financial institutions.

As a result, MYbank must cater to a massive number of users spanning various segments of the market. This presents a unique challenge for the bank, as it necessitates the implementation of technology solutions that ensure high availability and elasticity. To effectively serve this diverse and expanding user base, MYbank’s technological infrastructure must be capable of handling high volumes of transactions and user activity without compromising performance or reliability.

Meanwhile, banking regulators have required banks to adopt technologies that are reliable and trustworthy, making open-source software the preferred choice for many banks.

To achieve its technology goals and meet regulatory demands, MYbank faced several challenges that needed to be addressed in its core technology architecture:

  1. Cost efficiency: Catering to a vast customer base, MYbank needed a technology infrastructure that was not only cost-effective but also efficient in managing the increasing demand for its services.
  2. Compliance: Operating within a heavily regulated industry, MYbank faced the challenge of adhering to strict regulatory requirements. To fulfill these obligations, the bank sought a technology solution that is trustworthy and not proprietary.
  3. High availability: To consistently deliver reliable financial services, MYbank required a technology architecture that guaranteed high availability, allowing customers to access its services anytime without interruptions or downtime.
  4. Scalability: As MYbank’s services continue to grow in demand, the bank needed a solution that could seamlessly scale to accommodate an increasing number of users and transactions without sacrificing performance.

A highly available and scalable database solution

In order to develop a resilient and robust financial database solution, MYbank has established the following requirements:

  • Financial-grade data consistency: This goes beyond the standard ACID properties, as it necessitates maintaining data consistency across different clusters and data centers at all times.
  • Capability for horizontal scaling: The solution must be able to expand and accommodate increasing workloads by adding more nodes to the system.
  • Capacity and disaster recovery across geographically distributed data centers: The database solution must provide efficient capacity management and disaster recovery, even when data centers are located in different cities.

OceanBase, a high-performance distributed relational database, is designed to meet the stringent requirements of financial institutions like MYbank. Its features make it a suitable choice to address the challenges of high availability, scalability, and disaster recovery.

OceanBase guarantees financial-grade data consistency by implementing a distributed transaction processing model known as the Paxos consensus algorithm to achieve Zero RPO (Recovery Point Objective). This algorithm ensures data consistency across clusters and data centers. The Paxos consensus algorithm provides:

  1. Strong consistency: It guarantees that data remains consistent even when distributed across multiple data centers. This ensures that all replicas agree on the contents of the database, preventing inconsistencies.
  2. Fault tolerance: The Paxos algorithm allows the system to continue functioning correctly in the event of node or data center failures. It ensures that a quorum of replicas is available to maintain data consistency and availability.

MYbank’s primary database comprises a cluster distributed across 5 data centers situated in 3 cities. The bank’s disaster recovery requirements extend beyond individual data centers to cover entire cities. Previously, if a cluster in a single data center failed, data could be swiftly recovered from the other data centers. However, MYbank now demands that even if all clusters in a city fail, the affected city’s clusters should be recoverable using data from clusters in the other cities.

MYbank’s OceanBase clusters are distributed in 5 data centers across 3 cities, with consistent data


Additionally, MYbank stipulates that the disaster recovery process should be completed within 30 seconds. To facilitate this, all replicas maintain a complete set of the bank’s data, ensuring rapid restoration in the event of a failure.

MYbank’s OceanBase clusters are distributed in 5 data centers across 3 cities, with consistent data

OceanBase’s disaster recovery capabilities are built upon its robust data replication and distribution mechanism. This mechanism allows for efficient capacity management and rapid recovery in the event of a failure.

  1. Multi-replica support: OceanBase maintains multiple replicas of the data across different data centers. This ensures that even if all clusters in a city fail, the affected city’s clusters can be recovered using data from clusters in other cities.
  2. Fast recovery: OceanBase employs a log-based recovery mechanism. All replicas maintain a complete set of the bank’s data and transaction logs, ensuring rapid restoration in the event of a failure. This allows MYbank to meet its 30-second disaster recovery requirement.
  3. Automatic FailOver: OceanBase automatically detects failures and initiates a FailvOver to healthy replicas. This ensures uninterrupted service and continuous data availability.
We once made a bold decision to conduct a network disconnection drill within our production system. After completing the necessary preparations, we began the drill by cutting off all traffic to one of the data centers in our production system. To everybody’s astonishment, MYbank’s database managed to recover in less than a minute. This impressive feat showcased OceanBase’s high availability and rapid recovery capabilities.
— Yang Xianghe, MYbank System Architect
Source

How OceanBase helps reduces MYbank’s data storage costs

In the context of MYbank’s entire operation, the crux of reducing the cost of an online database lies not in storage but in computation. As the volume of data increases, even if computational capabilities are sufficient, more storage space is still required.

Expanding the number of virtual machines to accommodate increased storage needs can lead to high costs, but utilizing a historical data storage solution can help mitigate these expenses.

There are two primary strategies that MYbank uses for reducing costs through historical data storage. OceanBase has played a crucial role in realizing these two strategies.

Lowering database instance costs

By segregating data into cold data and hot data, MYbank can optimize storage costs. Cold data, which is accessed less frequently, can be stored on less expensive SATA drives, while hot data, or frequently accessed information, can be placed on faster SSD drives.

OceanBase’s LSM-tree architecture enables MYbank to efficiently segregate data into cold and hot data, optimizing storage costs. OceanBase’s advanced optimizations ensure fast and efficient data access for both data types, allowing MYbank to effectively manage storage costs without sacrificing performance.

Transitioning to a read-only historical data storage

By moving finalized data into historical storage, the historical database becomes read-only. This approach helps MYbank reduce the storage costs associated with full backups of the historical database, resulting in significant savings.

OceanBase provides the ability to transition finalized data into read-only historical data storage. By making the historical database read-only. This approach not only results in cost savings but also simplifies data management and ensures data integrity.

In order to meet the demands of MYbank’s cost-efficiency strategies, a database architecture must be highly elastic, and capable of adapting to the availability of resources. MYbank has adopted strategies that not only reduce database costs but also ensure efficient data management, with a key focus on virtualization technology.

By introducing virtualization technology, MYbank can effectively allocate hardware resources based on the current demand. This approach allows the bank to optimize resource utilization, reducing costs and improving overall system performance.

OceanBase’s elastic architecture allows for efficient resource allocation and adaptability in response to changing resource availability. With its elastic architecture, MYbank can:

  1. Optimize resource utilization: OceanBase’s distributed system enables the dynamic allocation of hardware resources based on current demand. This approach reduces costs while improving overall system performance.
  2. Scale resources on-demand: OceanBase’s horizontal scaling capability allows MYbank to invest in resources as needed, thus minimizing upfront investment and enabling cost savings. This elasticity ensures that resources are used optimally and that the system can adapt to fluctuating workloads.
  3. Distribute workloads: OceanBase’s architecture facilitates workload distribution across multiple hardware units. This reduces the failure rate of individual clusters and minimizes the impact on business operations.

How virtualization improves elasticity in OceanBase clusters across multiple data centers (A, B, and C)

The result

OceanBase currently constitutes over 95% of MYbank’s database technology stack, covering almost all business scenarios within the bank. The adoption of OceanBase has demonstrated significant improvements in terms of high availability and high concurrency performance, according to MYbank’s system architect Yang Xianghe.

High Availability: OceanBase provides robust disaster recovery solutions for both local and geographically distributed data centers, ensuring continuous data availability and resilience against failures. The system undergoes regular monthly network outage drills to confirm reliability. With an RPO of 0, OceanBase guarantees no data loss during a disaster, and its RTO (Recovery Time Objective) of less than 30 seconds ensures rapid recovery of services.

High Concurrency: OceanBase excels at managing high concurrency workloads, with each cluster accommodating 8,000 tenants and reaching daily peaks of 4 million QPS. During high-demanding promotional events, the system maintains exceptional throughput on core transactional routes, handling over 100,000 combined QPS and TPS.

The successful integration of OceanBase into MYbank’s database infrastructure has resulted in a resilient, high-performance, and cost-effective solution. By leveraging OceanBase’s features, MYbank has achieved outstanding levels of availability and concurrency, ensuring smooth and efficient operations across all business scenarios.

ICON_SHARE
ICON_SHARE