An Introduction to Amazon Aurora
Without changing the existing application's architecture, how can we improve our application's performance? The answer is AWS Aurora.
Join the DZone community and get the full member experience.
Join For FreeIn today's age, almost all applications are getting a bigger and bigger userbase, and serving more users means you need more optimized application. Optimization of applications has some limitations, and after some level, it's not possible without enhancing/changing the application architecture. Most existing applications use relational databases, which are meant for monolithic architecture. This monolithic architecture and SQL queries are making them slow. It doesn't matter how good and robust of a query you are writing; it has some certain threshold to deal with and will die afterward.
So, the million dollar question: Without changing the existing application's architecture, how can we improve our application's performance? The answer is AWS Aurora.
Amazon's definition is:
"AWS Aurora is a MySQL compatible, enterprise-grade relational database engine built for the cloud. With respect to database migrations, the focus is changing from a “lift and shift” approach to migrating (that is, migrating as-is and running databases on virtual servers in the cloud) to fully managed, cloud-native database services like Amazon Aurora. One of the key objectives of Amazon Aurora is to overcome the performance, scalability, and availability limitations of traditional databases in a cost-effective manner similar to open-source databases. Amazon Aurora provides up to five times better performance than MySQL at a price point one-tenth that of a commercial database while delivering similar performance and availability."
Amazon Web Services (AWS) has been the world’s most trusted and broadly adopted cloud platform. It provides services for compute, analytics, storage, enterprise applications, mobile, and databases. AWS Aurora was made to support the databases part of AWS. Aurora is based on Amazon Relational Database Service (Amazon RDS), which is a service to set up, operate, and scale a relational database in the cloud. Amazon RDS supports MySQL, MariaDB, PostgreSQL, Oracle, and Microsoft SQL Server DB engines. Aurora delivers over 500,000 SELECT
s/sec and 100,000 updates/sec.
Architecture
Whenever we create an Aurora instance, we create a DB cluster. A DB cluster consists of one primary instance and one cluster volume; additionally, we can create an Aurora replica. It does continuous backups to AWS S3 (Simple Storage Service) to maintain 99.999999999% durability.
Aurora starts with a 80GB blocks assigned to the instance and allocates 10GB blocks as part of auto-scaling.
Primary instance:
Supports read/write workloads.
Performs all of the data modifications to the cluster volume.
Cluster volume:
SSD virtual database storage volume.
Supports multiple Availability zones (AZ).
Each AZ has two copies of cluster data.
Getting shared by primary instance and aurora replica.
Aurora replica:
Supports read-only operations.
The maximum number of replicas could be 15.
Multiple Aurora replicas to support the distribution of read workloads.
Multiple Aurora replicas mean increased database availability.
If a primary instance fails, one of the Aurora replicas will be promoted as primary instance.
Let's look at a diagram that depicts this:
Aurora is a SOA-based implementation with several layers: storage, logging, and caching as a separate layer, while SQL and transaction has been kept in a single layer. This kind of architecture achieves more scalability, availability, and performance.
Creating Aurora Instance
Log in to the AWS management console and navigate to the Amazon RDS section for the creation of Aurora clusters. You choose the database, size of the primary instance, database credentials, database name, port number, etc. Then, choose Launch DB Instance to launch the Aurora Instance. Under the Instances tab, you can see your newly created instance, which has an endpoint and port number that can be used to connect from your applications.
I hope this will help you get familiar with Amazon Aurora. Happy learning!
Opinions expressed by DZone contributors are their own.
Comments