dwyl / redis-connection

:zap: Single Redis Connection that can be used anywhere in your node.js app and closed once (e.g in tests)
45 stars 12 forks source link

ElastiCache Connection #30

Open Danwhy opened 8 years ago

Danwhy commented 8 years ago

I've been looking into using this module with ElastiCache and the only problem I had was with the url.

Because ElastiCache can only be used by AWS EC2 instances, the Redis node is provided with an endpoint rather than a full url, in the format clusterName.xxxxxx.cfg.usw2.cache.amazonaws.com:port which means url.parse doesn't work. Also, there's no auth data in the url, as that's all handled by AWS security groups.

nelsonic commented 8 years ago

@Danwhy if you have time to implement a PR please do. Otherwise can you give a bit more detail and I will help if I can! 👍

Also, given that you guys are using Hapi for SMG you can use the Hapi version: https://github.com/dwyl/hapi-redis-connection (which uses this one under-the-hood but makes it available in the context of your hapi rout handler e.g: request.redis.get() etc.)

iagomelanias commented 7 years ago

Same here. 😄