Amazon Aurora Serverless — Features, Limitations, Glitches
Finally after an year AWS announced the AWS Aurora Serverless MySQL compatibility. I was expecting that they will release this in the reInvent 2018, but it live now. So now I’m expecting more new features for Aurora servers in the reInvent 2018. I have played with this baby and understood whats is doing and what we can do with that.
Here is the blog from AWS about Aurora Serverless
You may have heard of , a custom built MySQL and PostgreSQL compatible database born and built in the cloud. You may…aws.amazon.com
What is Aurora Serverless?
Aurora serverless provides seamlessly scale up and down its compute and memory. You can pay for how much resources that you have been used. No needs of creating and managing the Read Replica and HA(Multi-AZ).
How Aurora Serverless works?
As we all know that Aurora is using the Clustered Storage in its backend. It has 2 volumes per AZ (from 2 Az to 3Az). Its same in serverless as well. The magical part is the CPU and Memory. We can start the Aurora with the capacity that we want, this capacity it called as Units in Aurora. Each unit has particular amount of CPU and Memory. We can’t see the number of CPU cores attached to the Unit, but we can see they memory allocation.
The next layer is Proxy Fleet, this layer has warm pool of massive servers which are ready to server the traffic. During the scaleup, the proxy fleet will route the existing connections to the all other nodes without dropping them.
And the final layer is Network Load balancer, we can see this one. And an endpoint is behind this load balancer. We can use this endpoint to access the Aurora Serverless.
Creating the Aurora Serverless:
This is very simple steps to create. You can understand everything, so I don’t want to waste your time. Just simply give the explanations for the new terms.
It’ll scale seamlessly, but it won’t cross the capacity limit. Capacity is measured by Unit, each unit has some amount of CPU and Memory.
After creating, you can do the set capacity, this will effect immediately without any downtime.
- Minimum Unit: 2 (4GB Memory)
- Maximum Unit: 256 (488 GB Memory)
Auto Pause & Resume:
If your Aurora is not having any connection for the threshold period then it’ll pause its compute and memory, you’ll not be charged for this time. Pretty cool right?
But the only problem is, If your cluster is Paused and some connections came to access the DB, then the 1st connection will take upto 25 seconds to establish the connection.
Once you created the instance it’ll not show in the Instance Page, you can see this in Cluster Page.
Why we don’t want Read Replica and HA(auto failover)?
To answer this question, lets find the answer for why we need read replica?
- Master instance always busy and facing huge work load. So while running the report queries the resource might not be enough, so all of your workload will face slowness.
- For HA, if your master goes down, then we need another instance which has complete data.
Now you got the answer for topic. Aurora Serverless is automatically scaling up to serve your workload peaks, so due to the report queries, if your instance consumes much resources then it’ll automatically add the resources to your cluster. And you have to additionally pay only for that particular time. So NO NEED FOR READ REPLICA.
HA needs when the Server is not available, but it has pool of WARM servers, then why we need HA.
When Autoscaling Happen & What are all the conditions?
Scale Up: scale-up is 3 minutes since the last scaling operation
- CPU > 70%
- Connections > 90%
Scale Down: scale-down is 15 minutes since the last scaling operation
- CPU < 30%
- Connections < 40%
When Autocaling will going to be Failed?
During the scaling time,
- If any long running queries are running
- Temp tables or Tables Locks are held
Migrating To Aurora Serverless:
Credits: Brian Welcker
You can migrate your existing MySQL Aurora Cluster to Aurora Serverless. Also you can do migrate Serverless snapshot to Aurora provisioned cluster. But you can’t migrate RDS. If need Migrate RDS to Aurora Provisioned then Serverless.
Note: MySQL 5.6 is only supported.
(well documented in AWS Documentation, But I have add few more points here)
- You can use this only inside the VPC.
- It’ll not work in VPN Network or VPC peering networks.
- But it’ll work in AWS Direct Connection.
- No Publicly Accessible Option.
- It uses 3306, you can’t change the port.
- There is no Restart.
- There is no DB Parameter Group, Only Cluster Parameter group is there.
- The Aurora serverless will not show in the RDS → Instance Page. You can see this in RDS → Cluster’s page.
- BinLogs are disabled.
- We can’t setup the Replication from/to any EC2, RDS, Aurora.
- You can only modify the following cluster-level parameters:
- If you modify other cluster-level parameters, the changes have no effect, and the Aurora Serverless DB cluster uses the default values for these parameters.
Right now it has only 3 events.
Also you can see the scaling up, scaling down and Pause & resume in the Event.
I hope there will be a lot of new features are coming for Aurora Serverless. Im expecting the below features.
- Migrate existing MySQL/Postgresql RDS, Snapshot.
- Aurora Clone ( then we can use this for testing Purpose)
- Access outside the VPC.
- Event Notification during the auto scaling.
- MySQL 5.6 an ancient relic :) I’m sure 5.7 is in the works
- Then More and more and more….
UPDATE: 25Sep 2018
Thanks to Anoop Gupta (who informed this in the comment)
Aurora ServerLess supports in Cloud formation.
Click here to return to Amazon Web Services homepageaws.amazon.com
Thanks to Anoop Gupta (who informed this in the comment)
Aurora Serverless now available for PostgreSQL (beta)
Amazon Aurora Serverless is a deployment option that automatically starts, scales, and shuts down an Amazon Aurora…aws.amazon.com
Aurora Serverless supports Query Editor from AWS console.(Beta)