title: Redis client Lettuce Master/Slave configuration for AWS Elasticache
body: <p>I have been using Lettuce as a Redis client to talk to AWS Elasticache. The specific configuration that I am currently using is the <a href="https://github.com/mp911de/lettuce/wiki/Master-Slave#static-masterslave-with-predefined-node-addresses" rel="noreferrer">Static Master/Slave with predefined node addresses</a>. Recently, the primary node took a tumble kicking off a failover process and eventually causing all application write requests to fail with the following error:</p>
  
  <pre><code>redis.RedisCommandExecutionException: READONLY You can't write against a read only slave.
  </code></pre>
  
  <p>Since then, I have been doing some research and realized that <a href="https://github.com/mp911de/lettuce/wiki/Master-Slave#standalone-masterslave" rel="noreferrer">Standalone Master/Slave</a> is probably the configuration that fits the purpose of talking to Elasticache (in non-clustered mode) as according to the AWS docs, the client should always only talk to the primary endpoint - which gets updated to point to the new master in an event of a failover.</p>
  
  <p>This has left me wondering, why does the author make the recommendation of using the <a href="https://github.com/mp911de/lettuce/wiki/Master-Slave#static-masterslave-with-predefined-node-addresses" rel="noreferrer">Static Master/Slave with predefined node addresses</a> method when using AWS Elasticache?</p>
  
  <p>Any thoughts?</p>
  
  <p>Configuration: 1 Master and 2 Slave nodes</p>