0

I have set up a new AWS EC2 environment with Elasticache Redis.

I'd like to test failure scenarios.

Does anybody know how to Kill:

A cluster

A node

?

RobD
  • 1,695
  • 2
  • 24
  • 49

2 Answers2

1

AWS provides support for testing automatic fail-overs on Elasticache nodes. This can be done in one of the three ways.

  1. AWS Console - Go to elasticache page and select the shard name and the node on which you want to execute failover as Failover Primary and choose Continue.

  2. AWS CLI

    aws elasticache test-failover --replication-group-id redis00 --node-group-id redis00-0003

  3. ElastiCache API

curl https://elasticache.us-west-2.amazonaws.com/
    ?Action=TestFailover
    &NodeGroupId=redis00-0003
    &ReplicationGroupId=redis00
    &Version=2015-02-02
    &SignatureVersion=4
    &SignatureMethod=HmacSHA256
    &Timestamp=20140401T192317Z
    &X-Amz-Credential=<credential>

Replace with the appropriate cluster name, region etc.

Reference:

https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html#auto-failover-test-cli

user1302884
  • 783
  • 1
  • 8
  • 16
  • Brilliant! Stack Overflow used to have a badge called "Necromancer" for reviving very old questions. You certainly deserve it for this one :-) Thanks for the help, although I'm pretty sure that the system that this Redis cache was a part of is long dead. Still this answer will be useful to others for sure. – RobD Jan 20 '23 at 11:27
0

A few things come to mind:

  • Fill up the entire cluster with data
  • Go into the ElastiCache dashboard and delete the cluster
  • Return a "failure" in an abstraction layer
Bas Peeters
  • 3,269
  • 4
  • 33
  • 49