Using memcache client with ruby

前端 未结 1 702
情话喂你
情话喂你 2020-12-06 23:21

Am trying to connect created amazon elastiCache cluster endpoint using memcache-client. But am getting the error

MemCache::MemCacheError: No connection to s         


        
相关标签:
1条回答
  • 2020-12-06 23:45

    Ok, for me, the problem was the security groups. You can only access Elasticache nodes from ec2 instances that have a security group that is listed in the Elasticache security group.

    So for me, my ec2 instance has a security group of "web". In elasticache, I then added "web" to the "default" elasticache security group.

    Further explanation here: http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheSecurityGroup.html

    Also, try using either of these two gems:

    https://github.com/mperham/dalli

    https://github.com/ktheory/dalli-elasticache

    I'm using the latter and it works great because it uses autodiscovery of the nodes.

    0 讨论(0)
提交回复
热议问题