Labels

Aws (32) MySQL (20) Aurora (12) Rds (7) DynamoDB (6) Cloudformation (4) Python3 (4) Unix (3) MongoDB (1)

Wednesday, 22 December 2021

Aurora 3.0 - Mysql 8.0 compatible is now out!

 Amazon Aurora MySQL 3 with MySQL 8.0 compatibility is now GA!

Aurora is compatible with MySQL 5.6, MySQL 5.7 and now also compatible with MySQL 8.0. 

Aurora MySQL 3 introduces several new features, including support for:
- Common table expressions (CTEs) 
- Role-Based authentication
- Replication enhancements
- Window functions
- Instant DDL

This article is for exploring more about it.

Closer compatibility with MySQL community Edition minor versions

AWS has changed the way how they maintain the Aurora version and the MySQL community edition releases. Starting with Aurora MySQL 3, their strategy is to map each Aurora MySQL 3 release with the corresponding MySQL 8.0 CE release. Example Aurora MySQL 3.01 maps to MySQL 8.0.23. This means each release will include all fixes and code changes that were added to that specific minor version.

Supported upgrade path from Aurora MySQL 2 to Aurora MySQL 3

It is recommended to run the upgrade assessment and address all flagged items. You can use the mysqlcheck --check-upgrade command. Following the application should be tested against the newer version more details here

The recommended procedure that you can undertake to upgrade the cluster's version with minimal downtime is:

1. Upgrade the cluster by using Aurora snapshot restore. Take a snapshot of the Aurora 2 and restore it in Aurora 3. Don't forget to create a compatible instance and cluster parameter groups. 
2. With the binlog enabled on the Primary Aurora 2, set the newer Aurora 3 as Replica, and when replication catches up with all changes,  you can stop replication and start using the Aurora MySQL 3 cluster as your primary database.

The IN-PLACE Aurora feature is not yet out.

AWS allows you to create an Aurora MySQL 3 Read Replica DB Cluster from an Aurora MySQL 2, when the replication has caught up and the replication delay is zero, you can promote it to be a standalone cluster and redirect the application to use it.

If the Aurora resource is handled via Cloudformation and created as a code, these steps are not easy to perform.


Key new features introduced in Aurora MySQL 3

Binary log improvements It is possible to turn on
    Multi-threaded replication which increases the I/O threads 
    Replication filtering you can choose what to replicate into the binlogs
    Binary log transaction compression allows to reduce the throughput data to send from Primary to Secondary

Instant DDL You can take advantage of this feature by using ALGORITHM=INSTANT which cause the ALTER TABLE to happen almost immediately. It is possible only for some changes.

Common table expressions This enable you to use temporary result set with a name that can be called within the scope of a statement

Window functions You can improve analytical queries by using window functions.

Improved parallel query support This is an Aurora enhancement, it can improve performance of certain types of queries by distributing and parallelizing the query processing into distributed storage layer of Aurora.

New index types Support for descending and invisible index types

User Roles You can create roles that act as a named collection of privileges


Conclusion

Testing the new features to figure out if they can resolve existing problems or speed up other operations. The Aurora cluster managed by CFN can't be upgraded smoothly some tricks are needed to keep the CFN template and the existing stack in sync.  



A document snipped from the AWS official blog here