Try PolarDB for MySQL's failover with hot replica for free
This topic describes how to try the failover with hot replica feature of PolarDB for MySQL for free.
Background
The failover with hot replica feature of PolarDB for MySQL leverages core technologies such as Voting Disk Service (VDS), the global prefetching system, persistent connections, and transaction status preservation. These technologies resolve issues related to PolarDB's fault detection, switchover speed, and overall switchover experience. You can upgrade your cluster at any time without worrying about connection or transaction interruptions. This fulfills the elasticity promise of a cloud-native database.
The failover with hot replica feature of PolarDB optimizes switchover scenarios in three areas: fault detection, switchover speed, and switchover experience. These scenarios include planned switchovers, such as cluster upgrades, downgrades, and minor version upgrades, along with unplanned disaster recovery switchovers. This feature integrates multiple technologies to address common user pain points:
Fault detection: A new high availability (HA) module, Voting Disk Service (VDS), is introduced. This module is based on a shared storage architecture and provides autonomous management of cluster nodes. This significantly reduces the time required for fault detection and primary node election.
Switchover speed: Hot replicas that support the global prefetching system are added. By prefetching data for multiple modules within the storage engine, the execution duration for promoting a replica to a primary node is optimized.
Switchover experience: When combined with the database proxy (PolarProxy), this feature supports persistent connections and transaction status preservation. During a cluster upgrade, downgrade, or minor version upgrade, if you enable these features, the system ensures that your connections and transactions are not interrupted. This provides a nearly seamless experience for proactive operations and maintenance (O&M).
Alibaba Cloud offers an experience center for its database solutions, where you can test a failover with a hot replica for PolarDB for MySQL online without purchasing any resources.
Impact
This feature trial does not involve deployment in a production environment and will not affect your business.
Costs
The resources used in this trial are not associated with your account, and no costs are incurred. You can try this feature without any concerns.
What you will experience
Trial environment
In this free trial, Alibaba Cloud provides a pre-configured environment with the following details:
Two PolarDB for MySQL clusters are provided for stress testing. One cluster uses the failover with hot replica feature, and the other uses a standard switchover. This lets you observe and compare the effects. Both clusters have the same specifications:
Kernel version: 8.0.2.2.19
Edition: Enterprise Edition
Series: Cluster Edition
Cluster specifications: A primary node with 8 cores and 32 GB of memory. The cluster contains one primary node and one read-only node.
A stress testing machine with the Sysbench tool installed is provided. It runs the same stress testing task on both PolarDB for MySQL clusters. The details of the stress test are as follows:
Test scenario:
oltp_write_only. This scenario tests the write performance of the PolarDB cluster, which has one primary node and one read-only node.Test table size:
--table_size=1000000and--tables=16. This means 16 tables, each with 1,000,000 rows of data.Number of concurrent threads:
--threads=16. This means 16 concurrent threads.Test duration:
--time=180. This means the test runs for 3 minutes.
Metrics to observe
Transactions Per Second (TPS): The number of transactions that the database executes per second. This metric is based on the number of successful COMMIT operations.
Procedure
Go to the Business Foundation System Solutions Experience Center.
Click Core Feature Trial. On the Instant Failover - PolarDB High Availability page, click Free Trial.
At the bottom of the page, click the Create Free Trial Task button. In the dialog box that appears, click OK to create the Sysbench stress testing task.
NoteThe stress testing task runs for three minutes. After the test starts, you can click Start Switchover Test to compare the results.
After a moment, click the
icon to refresh the task list. You can see that the stress testing task has started.NoteThe stress testing task runs for three minutes. You must complete the following steps before the Estimated End Time.
Click View Details to go to the real-time stress testing status page.
You can see that the stress testing task has started and that the TPS levels of the two PolarDB clusters are dynamically consistent under the same task.
In the upper-right corner, click Start Switchover Test to start the switchover for both PolarDB clusters.
You will soon observe the following:
The TPS of the PolarDB cluster that has failover with hot replica enabled does not drop to zero. It only experiences a brief dip and returns to its normal level within three seconds.
The TPS of the PolarDB cluster that uses a standard switchover drops to zero. It takes nearly 20 seconds to return to its normal level.