AWS Elevates Amazon RDS at re:Invent 2023
ANNOUNCEMENT AWS never fails to impress its database customers at its annual re:Invent conference, and this year was no different. Amazon Relational Database Service (RDS) received four game-changing updates, aimed at simplifying the lives of managed database customers.
AWS blazed the trail for fully-managed cloud database services in 2009 with Amazon RDS, targeting the adoption of open-source databases such as MySQL and PostgreSQL. The goal was to ease the burden of database administration, allowing developers to concentrate on building applications without worrying about repetitive tasks like patching, performance tuning, backup, and disaster recovery.
To continuously improve the user experience, AWS has established partnerships with various open-source communities to deliver desired enhancements. In 2022, AWS made 435 contributions to communities like PostgreSQL, Redis, and more.
Over the years, Amazon RDS has expanded to offer seven managed database services, including two commercial database engines: RDS for Oracle and RDS for SQL Server, and multiple open-source or open-source compatible options – Amazon Aurora PostgreSQL-Compatible Edition, Amazon Aurora MySQL-Compatible Edition, RDS for PostgreSQL, RDS for MySQL, and RDS for MariaDB.
AWS provides developers with a powerful platform to deploy their apps to production, offering cutting-edge security, durability, availability, and reliability features. Developers can access their preferred open-source tools and features, such as the recently announced Amazon RDS support for MariaDB 10.6, which offers new capabilities like MyRocks storage engine support, Oracle PL/SQL compatibility, Atomic DDL support, and more. AWS also offers its own innovations like Amazon RDS Blue/Green Deployments, an automated DevOps technique that simplifies database updates.
The company intends to continue collaborating with open-source communities to drive innovation and enhance these technologies for all users. At re:Invent, AWS reinforced this commitment by launching four new releases that enhance the performance, safety, and usability of PostgreSQL, MySQL, and MariaDB databases. Trusted Language Extensions for PostgreSQL provide a secure platform for developers to run extensions on their databases and expand the number of available extensions on Aurora and Amazon RDS. Amazon RDS Blue-Green Deployments simplify database updates.
For developers seeking to boost the performance of their Amazon RDS for MySQL databases, two new features are available: Amazon RDS Optimized Writes, which accelerates write transaction throughput, and Amazon RDS Optimized Reads, which speeds up the processing of complex queries.
Revolutionizing PostgreSQL with Trusted Language Extensions
AWS has introduced a game-changing development kit and open-source project, Trusted Language Extensions (TLE), at re:Invent 2022. The TLE empowers developers to effortlessly create high-performance PostgreSQL extensions while ensuring their safe operation on managed services like Aurora and Amazon RDS.
Previously, writing extensions for PostgreSQL (since version 9.1) was possible but required a deep understanding of C and the inner workings of PostgreSQL. As a result, extensions were executed in the same process space as the database, which improved performance but also exposed the database to potential bugs and crashes.
To address these concerns, managed services like Aurora and Amazon RDS only offered a limited selection of extensions, limiting the full potential of PostgreSQL. With TLE, developers can now create and run high-performance PostgreSQL extensions using trusted programming languages like JavaScript, PL/pgSQL, Perl, and SQL, without the need for certification from AWS.
TLE offers a level of security and peace of mind for DBAs as it restricts access to unsafe resources and limits bugs to a single database connection. TLE runs as an extension on Aurora and Amazon RDS and can be managed through the rds_superuser role, allowing DBAs to grant permissions to users who can install and run extensions.
AWS has launched TLE as an open-source project under the Apache-2.0 license, making it available to any PostgreSQL user and ISVs to provide their extensions to Aurora and Amazon RDS customers. The official Trusted Language Extensions GitHub repo invites PostgreSQL customers to learn more, contribute, and test TLE with the source code available for cloning. All contributions, including new features, example extensions, documentation, and bug reports, are welcome.
AWS Launches Amazon RDS Blue/Green Deployments
AWS has released a powerful new feature, the fully-managed Amazon RDS Blue/Green Deployments. This tool aims to assist customers in making safer, simpler, and faster database updates while ensuring data preservation. Compatible with Aurora MySQL-Compatible Edition 5.6 and above, RDS for MySQL 5.7 and above, and RDS for MariaDB 10.2 and up, Blue/Green Deployments allow for a rapid switchover in as little as one minute with no need for application changes.
Previously, updating databases in Aurora and Amazon RDS had its challenges. In-place updates meant overwriting the old database with a new version, which posed risks to production workloads and often resulted in unexpected downtime.
Another method involved using Amazon RDS database cloning and read replicas to manually create a staging environment, which was kept in sync with the production environment. This process was time-consuming and required customers to verify the change in the staging environment before promoting it to production.
With Blue/Green Deployments, the creation of the staging environment, also known as the ‘green environment’, is automated. Logical replication is used to synchronize the green and production, or ‘blue’, environments, taking the burden off the customer. The switchover process is made smoother through ‘switchover guardrails’ which temporarily halt writes to both environments during updates, allowing the green environment to catch up to the blue and avoiding data loss. These guardrails also monitor for potential issues such as replication errors, database instance health, and long-running transactions, helping customers achieve their recovery time objectives by setting a maximum tolerable downtime as low as 30 seconds. If the switchover exceeds this, writes are resumed to the blue environment.
Customers can take advantage of Blue/Green Deployments for updates like major/minor version upgrades, schema modifications, instance scaling, engine parameter changes, and maintenance updates through the Amazon RDS console.
Maximizing Write Performance with Amazon RDS
According to AWS, Amazon RDS customers utilizing MySQL can enhance the performance of their databases by experiencing a twofold increase in write transaction speed with the implementation of Amazon RDS Optimized Writes.
MySQL writes data in 16 kibibyte (KiB) pages, incrementally stored in 4 KiB chunks in memory. This method, however, puts the data at risk of corruption in the case of a system malfunction, causing loss of the data. To counter this, MySQL employs the “doublewrite buffer”, which writes the data first to the buffer and then to storage. This ensures the availability of an intact copy of the data even in the event of failure.
But this security measure also comes with a cost. By writing the data twice, the time taken to write increases and also consumes twice the IOPs bandwidth. In scenarios with a high number of concurrent transactions, the provision of extra storage IOPs to sustain performance requirements can result in increased costs.
Optimized Writes, exclusive to Amazon RDS for MySQL customers, offers a solution to this challenge. The 16 KiB data pages are written in a single atomic operation, eliminating the need for the doublewrite buffer. This is made possible with the Torn Write Prevention feature within the AWS Nitro System, which ensures all-or-nothing write transactions to storage.
This optimization comes at no additional cost and is currently available to customers creating new databases in supported versions and instance types of RDS for MySQL. Existing databases can also be converted to Optimized Writes by creating a new supported database and transferring data using the AWS Database Migration Service.
Accelerate Your Complex Queries with Amazon RDS Optimized Reads
Maximize your database performance with Amazon RDS Optimized Reads, a feature that provides a 2x improvement in query speed for RDS for MySQL and RDS for MariaDB.
Processing queries through Amazon Elastic Block Store (EBS) is efficient for most workloads. However, complex queries, such as those requiring sorting or grouping, can result in temporary objects that exceed memory capacity and need to be stored on disk. This slows down the speed of queries.
RDS Optimized Reads solves this problem by storing complex query temporary tables directly on the database instance’s local NVMe (non-volatile memory express) SSD storage, reducing the time it takes to process these types of queries. It’s perfect for those who require fast execution of queries involving sorts, hash aggregations, high-load joins, and Common Table Expressions (CTEs).
The Optimized Reads feature is available to RDS for MySQL customers using versions 8.0.28 and above, and for RDS for MariaDB customers using versions 10.4.25, 10.5.16, 10.6.7 and above.
Amazon RDS and Amazon Aurora have continued to revolutionize open-source and open-source compatible databases, making it easier for AWS and open-source users to implement and manage their databases. By automating database management processes, Amazon RDS and Amazon Aurora help reduce internal management costs and pass the benefits on to their customers.