AWS Elasticache - Redis Autoscaling
Asked Answered
P

2

5

There is an redis instance been created in ElasticCache and this will be used to store and retrieve data as usual.

Is there any max memory for this redis instance and how can that be checked?

All I need is say example if the data size in redis reaches above 100 mb then it should be auto scaled without me having to manually scale it or create a new instance and things like that.

And when the data size is reduced(example: From 300mb to 50 mb due to less traffic) then the instances should be reduced so that there is no extra cost incured. How can this be configured in AWS ElastiCache?

Phlebotomy answered 30/7, 2020 at 17:33 Comment(0)
I
7

unfortunately there is no auto-scaling policy attach with Elasticcache out of the box, amazon ElastiCache provides console, CLI, and API support for scaling your Redis (cluster mode disabled) replication group up.

One option that you can try is to set cloud watch alarm base on node memory and then trigger lambda function that will scale up and down base on metrics.

  • Create a CW alarm
  • Select Elastic cache metrics
  • Select Node level metrics
  • Select Free memory metrics
  • Trigger notification to SNS topic
  • Subscribe lambda function
  • scaleup/scaledown base on metrics

enter image description here

enter image description here

enter image description here

Item answered 30/7, 2020 at 18:14 Comment(1)
You can ask another question as this question was focused on how to trigger the eventItem
L
5

Now Elasticache supports autoscaling https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoScaling.html

Literalism answered 25/8, 2021 at 8:27 Comment(2)
This is very close to a link only answer (which would be deleted). Please provide more details on "Now". Which version introduced it?Amand
Please take this as an improvement proposal, not as an attack. I said it is close to a link-only answer, but is not one, because it DOES provide the info that support has been added. And yes, the link does provide more info. But whatever is only linked is considered to be vulnerable by link-rot and is not considered part of a StackOverflow answer. If you just add the info of which version introduced the support I consider this a spotless, link-supported answer. Which in turn matches How to Answer and could harvest upvotes for being perceived as being as helpful as you intend it to be.Amand

© 2022 - 2024 — McMap. All rights reserved.