What Is ALT?
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

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.
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.
Basic Concepts
Secure transaction boundary: it refers to the state where a transaction in the current session has been committed and the next transaction has not started.
A secure transaction boundary can be reached after:
- 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.
- A table lock, backup lock, or user-defined lock is released if any.
Precautions
Category |
Precaution |
---|---|
Version constraints |
For details about how to check the kernel version, see How Can I Check the Version of a TaurusDB Instance? |
Usage constraints |
|
Unsupported functions |
|
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot