title: ElastiCache URL I can hit that always uses primary node
body: <p>This morning I ran into an issue were my primary node in replication group was changed. I still need to investigate why this happened.</p>
  
  <p>The upshot was lots of failures in a Rails application as it was trying to write to what was the primary node but had become a read replica.</p>
  
  <p>Is there a URL I can use that basically says "write to the primary node of this replication group, I don't care which node that is"</p>
  
  <p>Right now I am using something similar to;</p>
  
  <pre><code>name-002.aaaaa.0001.use1.cache.amazonaws.com
  </code></pre>
  
  <p>My "fix" for now was changing what was <code>name-001</code> to <code>name-002</code> but until I know the reason why the primary node was changed I have to assume this will break again.</p>