circuit

Amazon Aurora Serverless (v1 vs v2): What's the Difference?

Learn the difference between Amazon Aurora Serverless v1 and v2.




What is Amazon Aurora

Amazon Aurora is a relational database management system (RDBMS) built for the cloud with full MySQL and PostgreSQL compatibility. Aurora gives you the performance and availability of commercial-grade databases at one-tenth the cost.

source: AWS

AWS Aurora databases are Amazon’s proprietary engines compatible with MySQL & PostgresSQL databases. It is also known as serverless databases. They are called serverless because they run on the cloud and scale capacity up or down based on your application’s requirements. AWS introduced it in 2017’s Re: Invent and it has been widely adopted by the development community since then.

What is serverless v1?

At the time of becoming generally available in 2018, it was called serverless v1 and had some really exciting new features for a relational database, like

  • Data API - It offers an HTTPS endpoint to insert, update, delete, or query data directly from your web applications
  • Autoscaling - It scales up or down automatically. You don’t have to provision in advance and you do not have to rely on guesswork for those unknown spikes or downtimes
  • Sleep - It can be configured to go to sleep after a certain period of inactivity, meaning you only pay for what you use (serverless at its best!). However, this also means that your application will have to deal with some kind of cold start situation. At worst, it can take more than 30 seconds to warm up and this could lead to request timing out errors.

However, there were some pain points with serverless v1. It does not come with any kind of multi-A-Z support. Hence, if something goes wrong in the region of your database, then your application will face downtime. AWS does guarantee no data loss due to failure in your zone because it uses distributed, fault-tolerant, self-healing storage with 6-way replication that will automatically grow as you add more data.

It also had no support for read-only replicas and you are not able to export data to S3.

With all that in mind, you would have to think twice before using this version of the database in a Production Environment or an application that is frequently used.

What is serverless v2?

In Re: Invent 2020, AWS announced Aurora v2 with some major updates to v1

  • Multi A-Z support: Aurora Serverless v2 comes with support for multi-AZ. No need to worry about downtime due to a failure in one particular zone
  • Read Replicas: With v2, you can now access data from the read replicas of your DB cluster

However, there are some things missing from v1. You do not have access to the data API and you can no longer put your DB cluster to sleep during the inactive period. The pricing model for v2 is also very high for smaller applications and if you combine that with no sleep mode, then you are looking at a heavy bill at the end of your monthly cycle.

A quick calculation for running an instance on the eu-west-1 region gives you a monthly bill of approximately $40.00, and this will only go up as your application grows. Hence, this is not good news for developers working on smaller applications.

Conclusion

I have used v1 for the last few years and I never had to worry about the cost of running it. With v2, I think it is a good RDBMS for applications in a Production Environment with heavy traffic. It has solved issues in v1. But, since AWS has taken away the ability to spin an instance in the v1 environment, I am worried that developers may not be able to use RDBMS for smaller projects or POCs anymore.




Continue Learning