This article is more than 1 year old

AWS Supercharges Amazon RDS at re:Invent 2022

The AWS open-source database commitment

Advertorial Each year, AWS cooks up something appealing for its AWS database customers at its re:Invent conference. This year is no exception. The company rolled out four new features for its Amazon Relational Database Service (Amazon RDS) designed to make life easier for its managed database customers.

In 2009, AWS pioneered fully-managed cloud database services for open-source database management systems (DBMS) with Amazon RDS. The company's goal was to accelerate the adoption of open-source databases, like MySQL and PostgreSQL. This was to help developers focus on building applications while removing what AWS defines as the 'undifferentiated heavy lifting' of supporting databases. These are the tasks that typically bog down database administrators (DBAs), such as regular patching cycles, performance optimization, backup, and disaster recovery.

To further improve the user experience, AWS has fostered relationships with multiple open-source communities to provide enhancements that open-source users want. In 2022, AWS added 435 accepted contributions across open-source communities, including PostgreSQL, Redis, and others.

Amazon RDS has grown over the past decade to support a collection of seven managed database services. Of these, Amazon RDS supports two commercial database engines – Amazon RDS for Oracle and Amazon RDS for SQL Server – and several open-source or open-source compatible varieties - Amazon Aurora PostgreSQL-Compatible Edition, Amazon Aurora MySQL-Compatible Edition, Amazon RDS for PostgreSQL, Amazon RDS for MySQL, and Amazon RDS for MariaDB.

AWS helps developers deploy their apps with open-source databases to production by providing leading capabilities for security, durability, availability, and reliability. Developers have access to familiar open-source tools and features they love. A great example is when AWS announced Amazon RDS support for MariaDB 10.6. This release included new capabilities available to MariaDB users, such as MyRocks storage engine support, Oracle PL/SQL compatibility, Atomic DDL support, and much more. Simultaneously, developers who love MariaDB can enjoy AWS-led innovations like Amazon RDS Blue/Green Deployments, which is one of their recently released features that automates an advanced DevOps operational technique.

As it continues to innovate, AWS says it will continue to work directly with open-source communities to accelerate innovation to improve these technologies for all users.

With its four releases at re:Invent, AWS continues this commitment by providing improvements to both the open-source communities it supports and its own customers with new capabilities that improved the performance, safety, and ease of use of PostgreSQL, MySQL, and MariaDB databases. Trusted Language Extensions for PostgreSQL make it safer for developers to quickly run extensions on their PostgreSQL databases. They also greatly expand the number of extensions available on Aurora and Amazon RDS. Amazon RDS Blue-Green Deployments make database updates a cinch. Finally, for developers looking to improve the performance of their Amazon RDS for MySQL databases, there are two new capabilities. Amazon RDS Optimized Writes accelerate write transaction throughput and Amazon RDS Optimized Reads speed up the processing of your most complex queries.

Trusted Language Extensions for PostgreSQL

At re:Invent 2022, AWS announced Trusted Language Extensions (TLE) for PostgreSQL. This is a new development kit and open-source project for PostgreSQL extensions for developers to build high-performance PostgreSQL extensions and safely run them on managed services, like Aurora and Amazon RDS.

Developers have been able to write extensions for PostgreSQL since version 9.1 of the project, enabling developers to extend the functionality of their PostgreSQL databases. However, PostgreSQL extensions run in the same process space as the database itself. While this increases database performance, it also renders the database vulnerable to potential bugs as creating and running extensions requires knowledge of the C language and PostgreSQL internals. If unresolved, bugs can disrupt operations or crash the database entirely.

As a result, in the past, managed services, like Aurora and Amazon RDS, would only offer a selection of extensions to run on their databases. While this helped remove the burden of verifying these extensions, it also prevented developers from using the full library of available PostgreSQL extensions.

TLE fixes this problem and allows developers to quickly build and safely run high performance PostgreSQL extensions without needing AWS to certify code by using trusted programming languages. The supported languages include JavaScript, PL/pgSQL, Perl, and SQL. Using these languages, it is now easier for coders to make extensions as they do not have to understand the inner workings of the PostgreSQL file system.

TLE helps provide DBAs with peace of mind as the project helps protect databases by restricting access to unsafe resources while limiting bugs to a single database connection. For Aurora and Amazon RDS customers, TLE runs as an extension itself and is administered via the rds_superuser role. DBAs can use this role to assign fine-grained permissions that control which users can install and run extensions.

AWS launched TLE as an open-source project and worked with the PostgreSQL core team to make it available upstream under the Apache-2.0 license. This means any PostgreSQL user can use TLE. Additionally, as a result, Independent Software Vendors (ISVs) can use TLE to provide their extensions to Aurora and Amazon RDS customers.

For PostgreSQL customers interested in learning more about or contributing to the project, they can now do so on the official Trusted Language Extensions GitHub repo. Developers looking to build and test with TLE in their local PostgreSQL databases can utilize the source code after cloning the repository. From new features, example extensions, additional documentation, to bug reports, all contributions are welcome.

Amazon RDS Blue/Green Deployments

The second big feature released by AWS is the fully managed Amazon RDS Blue/Green Deployments feature. This capability targets customers that want to make safer, simpler, and faster database updates while ensuring zero data loss. Available in Aurora MySQL-Compatible Edition 5.6 and up, RDS for MySQL from version 5.7 and up, and RDS for MariaDB 10.2 and up, Blue/Green Deployments are designed to let developers switchover their database as fast as a minute and with no application changes.

In the past, Aurora and Amazon RDS customers could choose from two methods when updating their databases. First, with in-place updates customers overwrote their old database with a new version containing their change. This method would risk the safety of production workloads and often introduced unpredictable periods of downtime.

A more sophisticated approach required that Amazon RDS customers use Amazon RDS database cloning and read replicas to manually create a staging environment and keep it synchronized with the production environment. Creating, synchronizing, and updating that environment took effort though. Customers would also have to handle the verification of the change in the staging environment and then promote it to production when they were finished.

Amazon RDS Blue/Green Deployments handles the creation of the staging environment automatically, which is called a 'green environment'. They then use logical replication to synchronize the staging and production, or 'blue', environments, removing the burden from the customer so when they are ready to switchover the process can happen in as fast as a minute.

Blue/Green Deployments also make the switchover process easier. Using 'switchover guardrails', they pause writes to both environments during the update process, which allows the green environment to catch up to the blue to provide customers with zero data loss. These guardrails also check for snags, such as replication errors, database instance health, and long-running transactions. These guardrails help customers meet their RTO, or recovery time objectives, by allowing them to set their maximum tolerable downtime – as low as 30 seconds. If the switchover exceeds this designated time, Blue/Green Deployments resume writes to the blue environment.

Builders can start using Blue/Green Deployments to make updates, such as major/minor version upgrades, schema modifications, instance scaling, engine parameter changes, and maintenance updates using the Amazon RDS console.

Amazon RDS Optimized Writes

With Amazon RDS Optimized Writes, according to AWS, RDS for MySQL customers can make their databases more performant by doubling write transaction throughput.

MySQL writes its 16 kibibyte (KiB) pages in-memory incrementally to storage in 4 KiB chunks. The danger is that the data could be corrupted in the event of a system failure and these do not make it to storage. To protect against this, MySQL uses the 'doublewrite buffer', so data is first written to the buffer and then storage. This means, even in the event of a failure, users have access to an intact copy of their data.

This extra protection comes at a cost. By writing twice, it doubles the time taken to write data and also takes up twice as much IOPs bandwidth. If a user has a high number of concurrent transactions, they will need to provision extra storage IOPs to maintain their performance requirements, which can increase costs.

Optimized Writes solve for this problem for RDS for MySQL customers. Instead of writing data twice, they write the 16 KiB data pages in a single atomic operation. To do this, they draw upon Torn Write Prevention, a new feature within the AWS Nitro System that ensures data is written to storage in all-or-nothing write transactions, eliminating the need for the doublewrite buffer.

Optimized Writes are available at no extra cost and are available at this time to customers creating new databases in RDS for MySQL using supported versions and instance types. Customers can convert their existing database to use Optimized Writes by creating a new supported database and performing a data transfer from the old instance to the new using AWS Database Migration Service.

Amazon RDS Optimized Reads

Finally, RDS for MySQL and RDS for MariaDB builders whose workloads require complex query processing can benefit from a 2x improvement in the speed of their queries with Amazon RDS Optimized Reads.

Typically, when processing queries, RDS for MySQL and RDS for MariaDB read from Amazon Elastic Block Store. While this process is efficient for most workloads, those that deal with complex queries, such as those that require grouping or sorting, result in RDS for MySQL and RDS for MariaDB generating temporary objects. When these objects don't fit into memory, they are moved to disk storage, meaning they are written-to and read-from Amazon EBS.

Optimized Reads speeds up complex query processing in RDS for MySQL and RDS for MariaDB by placing complex queries' temporary tables directly on the database instance's local NVMe (non-volatile memory express) SSD storage. Optimized Reads will improve the speed of queries whose use cases require complex queries that involve sorts, hash aggregations, high-load joins, and Common Table Expressions (CTEs).

Optimized Reads is available to RDS for MySQL customers using versions 8.0.28 and higher and RDS for MariaDB customers using versions 10.4.25, 10.5.16, 10.6.7 and higher.

Over the past few years, Amazon Aurora and Amazon RDS have continued to innovate upon their open-source and open-source compatible databases, and they show no sign of slowing down. These innovations continue to simplify the database implementation process for AWS and open-source users alike. By continuing to build automation into its managed offerings, Amazon Aurora and Amazon RDS customers are able to lower their internal management costs and pass those benefits on to their customers.

Sponsored by AWS.

More about

More about

More about

TIP US OFF

Send us news