Zero-downtime restart (ZDR) for Amazon Aurora MySQL - Amazon Aurora

Zero-downtime restart (ZDR) for Amazon Aurora MySQL

The zero-downtime restart (ZDR) feature can preserve some or all of the active connections to DB instances during certain kinds of restarts. ZDR applies to restarts that Aurora performs automatically to resolve error conditions, for example when a replica begins to lag too far behind the source.

Important

The ZDR mechanism operates on a best-effort basis. The Aurora MySQL versions, instance classes, error conditions, compatible SQL operations, and other factors that determine where ZDR applies are subject to change at any time.

ZDR for Aurora MySQL 2.x requires version 2.10 and higher. ZDR is available in all minor versions of Aurora MySQL 3.x. In Aurora MySQL version 2 and 3, the ZDR mechanism is turned on by default and Aurora doesn't use the aurora_enable_zdr parameter.

Aurora reports on the Events page activities related to zero-downtime restart. Aurora records an event when it attempts a restart using the ZDR mechanism. This event states why Aurora performs the restart. Then Aurora records another event when the restart finishes. This final event reports how long the process took, and how many connections were preserved or dropped during the restart. You can consult the database error log to see more details about what happened during the restart.

Although connections remain intact following a successful ZDR operation, some variables and features are reinitialized. The following kinds of information aren't preserved through a restart caused by zero-downtime restart:

  • Global variables. Aurora restores session variables, but it doesn't restore global variables after the restart.

  • Status variables. In particular, the uptime value reported by the engine status is reset.

  • LAST_INSERT_ID.

  • In-memory auto_increment state for tables. The in-memory auto-increment state is reinitialized. For more information about auto-increment values, see MySQL Reference Manual.

  • Diagnostic information from INFORMATION_SCHEMA and PERFORMANCE_SCHEMA tables. This diagnostic information also appears in the output of commands such as SHOW PROFILE and SHOW PROFILES.

The following table shows the versions, instance roles, and other circumstances that determine whether Aurora can use the ZDR mechanism when restarting DB instances in your cluster.

Aurora MySQL version ZDR applies to the writer? ZDR applies to readers? ZDR always enabled? Notes

2.x, lower than 2.10.0

No

No

N/A

ZDR isn't available for these versions.

2.10.0–2.11.0

Yes

Yes

Yes

Aurora rolls back any transactions that are in progress on active connections. Your application must retry the transactions.

Aurora cancels any connections that use TLS/SSL, temporary tables, table locks, or user locks.

2.11.1 and higher

Yes

Yes

Yes

Aurora rolls back any transactions that are in progress on active connections. Your application must retry the transactions.

Aurora cancels any connections that use temporary tables, table locks, or user locks.

3.01–3.03

Yes

Yes

Yes

Aurora rolls back any transactions that are in progress on active connections. Your application must retry the transactions.

Aurora cancels any connections that use TLS/SSL, temporary tables, table locks, or user locks.

3.04 and higher

Yes

Yes

Yes

Aurora rolls back any transactions that are in progress on active connections. Your application must retry the transactions.

Aurora cancels any connections that use temporary tables, table locks, or user locks.