Getting Started With AWS Aurora - Part 1

AWS announced Aurora MySQL compatible database engine last November. Aurora is a fully-managed, MySQL-compatible, relational database engine that combines the speed and availability of high-end commercial databases with the simplicity and cost-effectiveness of open source databases.

What is AWS Aurora?

Amazon Aurora is a relational database engine that combines the speed and reliability of high-end commercial databases with the simplicity and cost-effectiveness of open source databases. It delivers up to five times the throughput of standard MySQL running on the same hardware.

Amazon Aurora increases MySQL performance and availability by tightly integrating the database engine with an SSD-backed virtualized storage layer purpose-built for database workloads. Amazon Aurora's storage is fault-tolerant and self-healing.

If the entire instance fails, Amazon Aurora will automatically failover to one of up to 15 read replicas.

MySQL 5.6 Compatibility

According to the AWS, the Amazon Aurora database engine is designed to be wire-compatible with MySQL 5.6 using the InnoDB storage engine. Certain MySQL features like the MyISAM storage engine are not available with Amazon Aurora. In fact, when you create a table in Aurora, it's table type would default to InnoDB. There are other engines listed as available but only two engines work.

mysql> SELECT VERSION();
5.6.10
mysql> SHOW ENGINES;
MRG_MYISAM
CSV
MyISAM
BLACKHOLE
MEMORY
InnoDB (DEFAULT)
ARCHIVE
FEDERATED
PERFORMANCE_SCHEMA

After trying out all these table type options we can say that ...

AWS Aurora is MySQL 5.6 InnoDB Compatible Only

and bit ironically they kept the optional support of BLACKHOLE table type (/dev/null storage engine (anything you write to it disappears)). Other table types do not work - if you set table type to MyISAM it will change it to InnoDB. My biggest disappointment was that the support for MEMORY table type isn't there. Nevertheless this is no turn off factor for me - I am absolutely excited proceeding with the test and taking this to a production mode with one of our large scale webapps currently running Multi-AZ MySQL RDS.

HA for High Availability

Amazon Aurora is designed for 99.99% availability, it will automatically recover from instance and storage failures and will fail over to another read replica. The replication lag, according to Amazon, is very modest around 10-20 millisecond which sounds more than perfect.

Scalability

As your business grows, Amazon Aurora will scale with you. You won’t need to take your application off line in order to add storage. The storage is scaled automatically in 10GB increments for up to 64TB. You won't need to specify disk size or IOPS when running new database instance, and since disk scaling happens behind the scenes you won't need to stop (or fail-over) server in order to scale up. You'd still need to failover when scaling for additional CPU and memory.

VPC is required

There is one biggest difference between running MySQL RDS and Aurora RDS - Aurora runs in VPC only - that's a slight additional overhead to create, manage and maintain VPC.

Pricing

The cost is $0.29 / hour for db.r3.large instance type, $0.10 / GB / storage, $0.20 / 1M IOs.
For Multi-AZ setup ((1 x write + 1 x read replica) x 2 ) = $1.16 / hour = $835 / month + IO, but you can save up to 66% with 3yr commitment reserved instances (I would advise against committing for that long time simply because technology and hardware changes so quickly that in 3 years the instance type is so outdated and once committed its hard to get rid of the RIs).

Initial tests

I have modest-sized clickstream table with about 1M rows taking 200MB. I have also created a view that joins together the clickstream data, category and a product, and then aggregates sum values by date. Selecting everything from that view takes ~ 1.25 seconds with current MySQL server. With Aurora, the same selection takes 500ms or less. On my local SSD-backed iMac the same query runs 1.35 seconds.

Benchmarks

Continue to Part 2 - Performance Benchmarks (coming soon).

Screen shot from AWS Aurora console


Read more about AWS Aurora

Comments

Popular posts from this blog

Stubbing and Mocking Static Methods with PHPUnit

Enable HTTP/2 Support in AWS ELB

How To Attach Your EBS volume to multiple EC2 instances