0

I have a web farm in amazon and one of my sites need some caching. I am considering the use of Elasticache redis.

Can anyone shed some ligth on how I would connect and interact with this cache?

I have read about several client sdks like stackexchange redis, service stack etc. .NET is my preferred platform.

Can these client sdks be used to interact with redis on elasticache? Anyone know about some documentation and/or code examples using elasticache redis (with the stackexchange redis sdk)?

Im guessing I will have to authenticate using a key / secret pair, is this supported in any of these client sdks?

thanks in advance! Lars

Lars Anundskås
  • 1,345
  • 10
  • 24

1 Answers1

4

Elasticache is connected to the same way you connect to any other Redis instance. Once you create a new Elasticache instance, you'll be given the hostname to connect to. No need for secret/key pair. All access to the Redis instance there is configured through security groups just like with other AWS instances in EC2, RDS, etc...

With that said, there are two important caveats:

  1. You will only be able to connect to elasticache from within the region and/or VPC in which it's launched, even if you open up the security group to outside IPs (for me, this is one of the biggest reasons not to use Elasticache).

  2. You cannot set a password on your Redis instance. Anyone on a box that is given access to the instance in security groups (keeping in mind the limitations from caveat 1) will be able to get access to your Redis instance with full rights to add/delete/modify whatever keys they like. This is the other big reason not to use Elasticache, though it certainly still has use-cases where these drawbacks are less important.

Eli
  • 36,793
  • 40
  • 144
  • 207
  • Ok, i was expecting an auth mechanism like the one for S3 etc. So, it's just completely open within the security group? Is it as vunerable as if my colleague coincidentally choose to use the same key as me in his completely different project, he would overwrite my data? :) how does this fit into a shared environment? – Lars Anundskås Sep 19 '15 at 10:55
  • @LarsAnundskås it is completely open in the security group, but as for your colleague overwriting your data: you should use a separate db, or a separate instance, per project. Unrelated projects should never have information thrown into the same db. – Eli Sep 20 '15 at 06:08
  • Happy to help. Good luck! – Eli Sep 20 '15 at 19:58
  • You can connect to your Elasticache from outside the AWS using a NAT instance. – Mohsen Kamrani Jan 09 '18 at 21:37