Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

What Is ALT?

Updated on 2025-02-12 GMT+08:00

Database sessions may be interrupted when a read replica is promoted to primary, a minor version is upgraded, or specifications are changed. Applications need to check session statuses and react to changes by determining: whether a database connection or transaction has been interrupted, how to compensate for transactions, and how to rebuild session contexts.

To address these issues, TaurusDB provides ALT, which prevents database connection and transaction interruptions during database system switchover. There is no need to compensate for transactions or rebuild session contexts, ensuring application continuity.

Architecture

Figure 1 Architecture

ALT can be enabled for your application connections. When you connect to a proxy instance and then promote a read replica to primary, change specifications, or upgrade the minor version, the system can replicate your backend sessions. Once a secure transaction boundary is reached, backend sessions will be fully cloned to the destination node, and workloads do not even notice.

NOTE:

A secure transaction boundary refers to the status that a transaction in the current session has been committed but the next transaction is not started. A secure transaction boundary can be reached in any of the following situations:

  • Each statement in a transaction block with autocommit enabled is executed.
    start transaction;
    DML;
    commit;
  • The commit operation is complete with autocommit disabled.
  • A single DML or DDL statement is executed.
  • The lock is released when a table lock, backup lock, or user-defined lock is used.

Precautions

Table 1 Precautions

Category

Precaution

Version constraints

  • The kernel version of the TaurusDB instance must be 2.0.54.240600 or later.
  • The kernel version of the proxy instance must be 2.24.06.000 or later.

For details about how to check the kernel version, see How Can I Check the Version of a TaurusDB Instance?

Usage constraints

  • To use ALT, submit an application by choosing Service Tickets > Create Service Ticket in the upper right corner of the management console.
  • The TaurusDB instance has at least one read replica. A proxy instance has been created and the TaurusDB instance must be connected through the proxy address.
  • Proxy instances in read-only mode do not support ALT.
  • Proxy instances in primary/standby mode do not support ALT.
  • Single-node or multi-primary TaurusDB instances do not support ALT.
  • When you enable ALT for the first time, the TaurusDB instance will reboot. Enabling or disabling ALT will cause a proxy instance to reboot. Once ALT is disabled for all proxy instances, the TaurusDB instance will also reboot.
  • ALT requires no active transactions on each connection. When promoting a read replica to primary, you need to wait for ongoing transactions to end. The interval for waiting for the transactions to end is called the transaction draining timeout interval, which is controlled by rds_tac_drain_timeout. This parameter defaults to 5s and ranges from 1s to 60s.
    • Increase this interval for heavy workloads, numerous prepared statements, or time-consuming transactions.
    • Decreasing this interval is not recommended. If there are connections that do not drain transactions within the configured transaction draining timeout interval, ALT does not take effect for these connections.
  • During an ALT switchover, standby connections will be established on the new host for a brief period, equal in number to those on the original primary node. Ensure that the maximum number of connections of the TaurusDB instance is at least twice the current number of connections. To change the maximum number of connections, you need to evaluate the instance specifications and memory usage. For details, see What Is the Maximum Number of Connections to a TaurusDB Instance?
  • ALT supports prepared statements. During a switchover, the contexts of prepared statements are rebuilt. If there are a large number of prepared statements, the switchover success rate may be affected.
  • You are advised to perform an ALT switchover during off-peak hours. If the primary node and read replicas are overloaded, the switchover success rate may be affected.
  • For details about syntax and function constraints of proxy instances, see Precautions for Proxy Instances.

Unsupported functions

  • Enabling ALT makes your instance lose support for some system variable values.
    • innodb_ft_user_stopword_table: It can only be set to NULL.
    • transaction_write_set_extraction: It can only be set to OFF.
    • profiling: It cannot be set to 1 or ON.
  • ALT does not support Transparent Data Encryption (TDE).
  • ALT is unavailable when any of the following proxy capabilities is enabled:
    • Session-level connection pool
    • Any column containing more than 16 MB of data
    • Any query result set containing more than 16 MB of data
    • Prepared statement cache
  • ALT does not support temporary tables created by users.
  • ALT is not supported in the following scenarios where a secure transaction boundary cannot be reached:
    • InnoDB transaction blocks are not committed in a timely manner.
    • There are unreleased table locks, user locks, backup locks, and binlog locks.
    • XA transactions are not committed or rolled back.
  • ALT will be likely to fail if a switchover, minor version upgrade, or specification change occurs frequently within a short period of time.
  • If ALT is enabled, prepared statements cannot be transferred in the following scenarios:
    • The cursor is opened and not closed in a prepared statement.
    • The variable of a prepared statement has saved the LONG_DATA type.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback