Alibaba Cloud's next-generation relational cloud database PolarDB is fully compatible with MySQL. With a maximum storage capacity of 100TB, and 6 times better performance than MySQL, PolarDB is suitable for diversified enterprise database applications. Storage and compute nodes of PolarDB are separated, with all compute nodes sharing the same set of data. PolarDB supports scaling up and down in minutes, failover in seconds, as well as global data consistency. It also provides free data backup and disaster recovery services. This article introduces Baison Software's best practices—using Alibaba Cloud PolarDB to solve database challenges at peak times.
Founded in 2000, Shanghai Baison Software Co., Ltd. ("Baison Software") is a well-known omni-channel new retail solution provider in China. It provides management consulting and information technology solutions for brand enterprises in a wide variety of fields, such as shoes, sports, home decoration, household chemicals, beauty, jewelry and food. Its solutions cover the omni-channel middleware, retail distribution, supply chain, e-commerce, mobile applications, big data and so on.
Baison Software currently has 22 branches and subsidiaries, as well as more than 100 Baistar service agencies in China. Baison Software provides professional and timely support for the daily operation of more than 300,000 physical stores and more than 20,000 online stores. In the new retail era, Baison Software is dedicated to providing omni-channel new retail solutions for Chinese retailers. It helps customers achieve retail transformation and business innovation, build smart brands, and create extraordinary value.
The Baison iSHOP online marketplace is a mid-to-high-end e-commerce sales platform based on the consumer-driven business in the era of mobile Internet. It is a unified platform that fully satisfies the interaction, shopping experience, convenient transaction, and business growth needs of the various enterprises in different scenarios.
The Baison iSHOP online marketplace
Baison Software currently serves more than 300,000 physical point-of-sale (POS) stores and more than 20,000 online stores. With increasing business volume and business fluctuations, traditional relational databases are not able to meet Baison Software's business growth needs. Specifically, the business challenges faced by Baison Software are mainly:
Challenge 1: Sharp Increase in Transactions at Peak Times
Before using the Alibaba Cloud's database service, Baison Software used a self-built database. Back then, its largest retail terminal service often suffered from stagnation at peak times during the holiday season. For example, a transaction that could be normally completed within 2 seconds may have required 10 to 15 seconds at peak times. What's worse, the stagnation may even cause transaction failures, in which case the buyers needed to re-submit the transaction requests.
Challenge 2: Database Capacity Approaching the Limit, Slowing Down the Business
Before using Alibaba Cloud's database service, the capacity of Baison Software's self-built database was approaching the limit, which slowed down its business expansion. The problem was: new service data could be accessed only when historical data was archived and cleaned up.
First, Alibaba Cloud PolarDB is easy to use, and is 100% compatible with MySQL. The original application code for MySQL can be run directly on PolarDB without any changes. Second, Alibaba Cloud PolarDB has excellent performance. With a deeply optimized database kernel, it provides 6 times better performance than MySQL. Third, PolarDB adopts a distributed block storage system and file system. This allows it to be easily scaled up to support a data size of up to 100 TB, without being restricted by specifications of single nodes. In addition, Alibaba Cloud PolarDB promises high availability, high reliability, and high data security.
In fact, Baison Software is most interested in the rapid scalability of Alibaba Cloud PolarDB—a scaling up/down configuration takes effect within 3 minutes. This allows Baison to quickly expand read-only instances at peak times. The secret behind the rapid scalability is that Alibaba Cloud PolarDB is a database cluster consisting of multiple nodes. The cluster has one master node and multiple read nodes. It provides two addresses by default—a cluster address and a master address. Generally, the cluster address is recommended because it supports read/write splitting. This allows it to integrate resources of all nodes to provide external services.
Cluster architecture of Alibaba Cloud PolarDB
PolarDB's read/write splitting session consistency facilitates omni-channel new-retail transformation. The core technology that enables PolarDB to quickly expand read-only instances is the read/write splitting session consistency. The read/write splitting feature of conventional database solutions only guarantees the final consistency through master-slave replication. The master-slave replication delay usually results in different query results from different nodes. PolarDB has to solve the query result inconsistency without increasing the application development costs and the master node pressure, or compromising the read/write splitting effect. In response to these challenges, PolarDB provides a guarantee of session consistency. The session consistency, or monotonic read consistency to be specific, guarantees that within the same session, after a query returns a result, the subsequent query always returns a newer result. The implementation mechanism is as follows:
The implementation mechanism of PolarDB's read/write splitting session consistency
In addition to read/write splitting in the middle layer, PolarDB tracks the redo log checkpoints, or the log sequence number (LSN), of each node. Each update is assigned a checkpoint, or Session LSN, in the log. When a new query is received, PolarDB compares the Session LSN of each node, and only sends the query to the node with the latest Session LSN, thus ensuring session consistency. Using the physical replication method, PolarDB is extremely fast and does not put too much pressure on the master database. In addition, in most scenarios, a database is more frequently read than written. This mechanism is proven to be trustworthy in ensuring session consistency based on our experience. It also ensures the effect of read/write splitting load balancing.
Baison Software replaced its MySQL database for the online retail marketplace with Alibaba Cloud PolarDB. With the powerful read/write splitting capabilities of PolarDB, Baison Software can easily increase the read-only instances when business pressure grows. After the peaks, Baison Software can easily remove read-only instances or reduce their specification to comprehensively reduce costs. Alibaba Cloud PolarDB has many excellent features, such as elastic scaling, online upgrading, high data security, high reliability, high availability, and zero-cost cloud migration. All these have greatly helped Baison Software with omni-channel new-retail transformation.
Baison iSHOP's Alibaba Cloud-based database solution
PolarDB enables easy CPU and memory expansion by using the container virtualization and shared distributed block storage technologies. It allows Baison Software to add a new read-only node within 2–3 minutes. PolarDB also supports online database storage capacity resizing without interrupting the service. This mostly solves the hardware performance bottleneck.
Alibaba Cloud PolarDB provides comprehensive data security methods, such as whitelist, VPC network, SSL encryption, and multi-copy storage. All these are helpful for Baison Software to ensure data security in database access, storage, management, and so on. PolarDB uses an Active-Active highly available cluster architecture, which implements failover between the read-and-write master node and read-only replica nodes. In comparison with the conventional databases that use the Active-Standby architecture, PolarDB provides Baison Software with better system access performance at the same cost.
In addition, Alibaba Cloud PolarDB is fully compatible with MySQL. This allows Baison to smoothly migrate the existing database to PolarDB without restructuring it by using the Alibaba Cloud Data Transmission Service (DTS). At the same time, PolarDB allows customers of Baison Software to enjoy the performance and reliability of a commercial database at a lower cost.
With Alibaba Cloud's database solution, Baison Software's iSHOP online retail marketplace ensures each transaction can be finished within 1 second even at peak times. This effectively ensures that various promotional activities can be carried out smoothly. In addition, PolarDB allows online transaction data to be stored for 90 days without archiving and cleanup. This provides a wealth of data for subsequent BI analysis of business changes and trends.
During the World Cup, Baison Software's customers streamed a large number of advertisements. With the powerful capabilities of Alibaba Cloud PolarDB, Baison Software managed to deal with millions of advertising exposures and high concurrent demands. With the powerful computing capability, Active-Active high-availability cluster architecture, and rapid increase of read-only instances, Alibaba Cloud PolarDB helped Baison Software successfully deal with peaks during the World Cup. This greatly improved the user experience and successfully safeguarded customer activities.
ApsaraDB - November 30, 2018
ApsaraDB - April 19, 2019
ApsaraDB - April 17, 2019
Alibaba Clouder - April 10, 2018
Alibaba Clouder - August 15, 2018
ApsaraDB - December 5, 2018
An on-demand database hosting service for MySQL with automated monitoring, backup and disaster recovery capabilitiesLearn More
ApsaraDB for POLARDB is a cloud-native relational database compatible with MySQL, PostgreSQL, and Oracle.Learn More
An on-demand database hosting service for MySQL, SQL Server and PostgreSQL with automated monitoring, backup and disaster recovery capabilitiesLearn More
An on-demand database hosting service for PostgreSQL with automated monitoring, backup and disaster recovery capabilitiesLearn More
More Posts by ApsaraDB