Mysql cluster not scaling up after half an hour at 80% cpu in writer

0

I currently have a single RDS for my production environment and I'm moving on to a aurora cluster to enable autoscaling. Yesterday I configured the dms to migrate all the data from the current RDS to the new cluster, which currently contains 1 writer and 1 reader (both are db.x2g.large). The current RDS contains like 100 tables with millons of rows in many of them, so the dms took some time to migrate everything (like 5 hours). The cluster has been configured to autoscale like this:

target metric: Average CPU utilization of Aurora Replicas target value: 80% Scale in cooldown period: 300 seconds Scale out cooldown period: 300 seconds min: 1 aurora replica max: 15 aurora replicas

As it was a migration from the RDS to the cluster, all the requests the cluster received were writes, and the writer instance was at 90% most of the time. What I would expect is that after reaching the 80% cpu usage for 5 minutes, it would add another writer instance, but this didn't happen. My question is: does the autoscaling only affect the reader instances? Is there any way to autoscale writer instances?

Thank your for your time!

3 Answers
1
Accepted Answer

Hello,

Yes, AutoScaling only scales the number or read replicas, since clusters can only have 1 writer at at time. These are the 'Replicas' mentioned here https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Integrating.AutoScaling.html

When looking at the AutoScaling API for registering a cluster, it shows that for RDS, the type is ReadReplicaCount

AutoScaling doesn't support changing the writer size, since that would involve downtime from a stop/start to resize it

I've submitted feedback to both the RDS and AutoScaling doc teams about making this more clear, but in the future feel free to click the 'feedback' button in the top right of any doc and it will be send directly to the relevant doc team

AWS
answered 7 months ago
  • And just a quick question. In terms of financial transactions, where a transaction consists on multiple reads and writes to the db until it is completed, should this process use the main instance for both reads and writes? I'm just thinking about the case where the read replicas take like a couple of seconds to be in sync with the main db, so this would be a problem for financial transactions. Imagine creating a payment order (insert in db), then reading it from the read-only int the next few seconds and not having this payment order yet in the read-only db.

    If read instance is always in sync with the main one, we could move all the reads to the reader endpoint, but only if we are 100% sure that this read-only db contains exactly the same updated info than the main db.

0

Hi Shahad, thanks for your answer. You say "clusters can only have 1 writer at at time". Does this mean that a writer endpoint can only contain 1 instance?

Pascual
answered 7 months ago
0

After a lot of reading, I just found a post on stackoverflow from 2018 saying that Aurora only autoscales on reads but not on writes. Is that still like this nowadays? If this is true, then the only way to scale write instances would be manually adding them?

Pascual
answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions