skip to Main Content

is there a way to promote a replica node to primary with cluster mode enabled? I have googled but only found solution with cluster mode disabled.

2

Answers


  1. You can send CLUSTER FAILOVER command to the replica to promote it to be a new master. However, you must ensure that the replica has already been known by majority of the masters in the cluster.

    Check the doc on manually failover for detail.

    Login or Signup to reply.
  2. Is not usually recommended to promote a certain replica to primary, since Elasticache already monitor the cluster and perform the necessary failover operations in case of bad cluster status (so no manual intervention is needed).

    There is the possibility to invoke the failover API as described here https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_TestFailover.html. You will be able to choose the shard (called node group in the API) where to
    perform the failover, but not which replica will become primary. Also this is a limited API call (can be invoked limited number of time) and is designed only for testing purposes

    aws elasticache test-failover --region <region> 
    --replication-group-id <value> 
    --node-group-id <value>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search