How do I kill an Elasticache node

262 Views Asked by At

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

?

2

There are 2 best solutions below

1
On

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

0
On

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