Aurora vs. RDS: engineering guide to choose the right AWS database for 2024
Hi and welcome to Database DevOps Academy #28!
Each week, we share Database DevOps insights and best practices for modern engineering organizations. If you enjoy this newsletter, we ask you to subscribe and share. ❤️
In this Issue #28, we provide our engineering perspective by comparing Amazon Aurora and RDS through different dimensions.
Once again, AWS is ranked among the top in the latest Gartner 2023 Magic Quadrant for Cloud Database Management Systems. The AWS OLTP relational database portfolio consists of 2 products:
When an engineering team onboard AWS, one of the very first tasks is to choose Aurora or RDS as their main database (unless they decide to go NoSQL, then they need to pick between MongoDB and DynamoDB). Below we provide our engineering perspective to compare the following dimensions:
Supported Databases
RDS supports all mainstream relational databases including MySQL, PostgreSQL, MariaDB, SQL Server, Oracle, and Db2.
Aurora supports MySQL and PostgreSQL.
For RDS, you can choose all upstream versions. For Aurora, you are limited by a set of upstream versions mapped to the Aurora versions.
Architecture
RDS mostly runs the vanilla database engines on the cloud. While Aurora is a cloud-native database service. Aurora is cloud-native because it leverages the cloud environment to separate compute and storage, uses Amazon S3 to persist data. This novel approach increase performance, high availability, and scalability.
Compatibility
Both Aurora and RDS bear the same limitation as a Cloud database:
Though Aurora is a proprietary technology, it mostly differs from the vanilla MySQL / PostgreSQL on the storage engine layer. On the other hand, the server layer, which determines most user-facing behaviors is almost identical. Thus the main compatibility gaps for Aurora is storage engine related. e.g. Aurora for MySQL only supports InnoDB, while RDS supports old engines such as MyISAM (however, you won't use MyISAM engine anyway if you start a new project).
Saying that, Aurora codebase diverges more from the vanilla MySQL/Postgres than RDS, thus you should expect more lags for the AWS team to bring in the latest upstream update. e.g. Aurora PostgreSQL added the popular pgvector extension 2 months later than RDS.
Performance
According to the official website, Aurora offers up to 5x the throughput of MySQL and 3x the throughput of PostgreSQL.
This benchmark suggesting Aurora can be 60 times faster than RDS.
Aurora provides better write performance because it reduces the write amplification by only sending the redo log to the remote storage service, which eliminates other writes during transaction commit path such as the infamous double-write buffer.
Aurora provides better read scalability because of the log-based architecture, it can support up to 15 read-replicas. RDS can only support 5, RDS doesn't support more because the classic streaming replication carries more performance penalty on the primary. Aurora also incurs much lower replication lags, especially under write-heavy load.
RDS uses EBS, the disk performance differs based on the storage types.
Recommended by LinkedIn
In general, Aurora outperforms RDS considerably. But you still need to benchmark for your own workload.
Elasticity
RDS doesn't have much elasticity, if you choose the gp2 SSD storage, it can be bursted and that's pretty much it.
Standard Aurora can provision read-replicas quickly, other than that, it doesn't provide elasticity out of the box.
Aurora Serverless and especially its Serverless v2 offers great elasticity to scale up/down computing resources. Great for workloads such as e-commerce.
High Availability
RDS offers multi-AZ HA setup with a SLA of up to 99.95%, while Aurora HA offers up to 99.99%. Aurora can failover faster because of its log-based architecture. And for write-intensive load, RDS failover are more problematic because of the high replication lag.
Aurora also has global databases to enable low latency global reads and disaster recovery from outages across an AWS Region.
Pricing
If you follow the AWS wizard to pick the production template (8c64g r6g.2xlarge + multi-AZ HA), you will find the price for Aurora is much cheaper than RDS. Too good to be true.
The caveat is Aurora also charges on I/O that is not included in the pricing estimate. This surprised quite a few customers when they receive a huge AWS bill. This unpredictable cost was the biggest concern for teams adopting Aurora initially. In 2023, Aurora fixed this by introducing Aurora I/O-Optimized to include the I/O cost in the storage.
Besides, only RDS offers free-tier and low db instance tiers starting from 2c1g t3.micro. Standard Aurora starts from 2c16g r5.large and burstable classes start from 2c4g t3.medium. Aurora Serverless can specify 0.5 ACU as the minimum. 1 ACU provides 2 GiB of memory and corresponding compute and networking.
You should use AWS Pricing Calculator and it's also a good idea to monitor your database cost by using a specialized tool such as Vantage.
Recommended Setup
Capability-wise, AWS Aurora beats RDS in almost every aspect. AWS also invests more resources in Aurora than in RDS since Aurora is a key differentiator from other cloud vendors. Though Aurora is mostly MySQL / PostgreSQL compatible, it creates a different vendor lock-in by providing unmatched ROI.
For bootstrapped or small business, Aurora is still pricy and RDS is a cost-effective solution:
For growth stage business, Aurora is more suitable, and Aurora Serverless offers the extra flexibility to optimize the cost.
After you decide the database product, there remains task to figure out the database development workflow:
If you are thinking about these problems, please check out Bytebase. It's an all-in-one tool to centralize all human-to-db operations for heterogeneous databases.