How to Autoscale (add a node) Memcached cluster?

0

Hi, I am using Memcached cluster with one node. I did setup an alarms which will kickoff either 50% CPU or 50% Memory. Can I add a node when alarm gets triggered using auto scaling? fyi: I'm using Terraform to build my AWS infrastructure. Thanks in advance.

Ajju
質問済み 1年前306ビュー
1回答
0
承認された回答

You can not directly scale your memcached cluster from CloudWatch. If it would be Redis, then application auto scaling would be the easy solution. Fortunately there is no problem that can not be solved with bit of custom code and Lambda function. On high-level it would go like this; CloudWatch alarm gets triggered -> CloudWatch Events rule matches the alarm -> Lambda function is triggered to add a node to the cluster. Similar case is described in below blog post.

https://aws.amazon.com/blogs/mt/customize-amazon-cloudwatch-alarm-notifications-to-your-local-time-zone-part-1/ https://docs.aws.amazon.com/autoscaling/application/userguide/what-is-application-auto-scaling.html

Ps. Adding nodes to a Memcached cluster increases the number of your cluster's partitions. When you change the number of partitions in a cluster some of your key spaces need to be remapped so that they are mapped to the right node. Remapping key spaces temporarily increases the number of cache misses on the cluster.

profile picture
エキスパート
Kallu
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ