1

I'm soon to implement Elasticache in Rails app using the Elasticache-Dalli gem. Their documentation details how to refresh the nodes, but it doesn't detail how often to refresh them or by what means.

AWS documentation says the following:

If a node fails, ElastiCache takes down that node and spins up a replacement. The replacement process takes a few minutes. During this time the metadata in all the nodes still shows the endpoint for the failed node, but any attempt to interact with the node will fail. Therefore, your logic should always include retry logic. http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/AutoDiscovery.HowAutoDiscoveryWorks.html

  • How often should we refresh the nodes?
  • How do we go about refreshing the nodes in the Rails app using this Gem? In other words, should it be a cron job, or do we need to bounce the Rails server?
  • Also, do apps that use Elasticache-dalli need to build their own "retry logic"? If so, how?
Peter P.
  • 3,221
  • 2
  • 25
  • 31

1 Answers1

0

The gem and aws link you are looking at is for ElastiCache (memcached), which uses client side load balancing as opposed to server side.

If you're using a redis cluster, there is no need to worry about refreshing node endpoint, as server side load balancing and fail-over logic takes care of all the work of redirecting traffic to a healthy node.

Bill Yang
  • 1,413
  • 17
  • 28