2

I've been attempting to use elasticache on aws to cache some of my data for faster retrieval, but calling elasticache (an m1.small instance) is slower than calling my RDS instance! Any tips on how to optimize or fix this issue? All of my instances are in the same zone.

Thoughts?

daSn0wie
  • 121
  • 2
  • How much slower are we talking about here? Have you properly benchmarked or is this just a feeling? – ceejayoz Sep 24 '14 at 18:52
  • it's clearly slower... from a sub 1 second page load to over 8 seconds – daSn0wie Sep 25 '14 at 19:22
  • If you try `telnet your-url.cache.amazonaws.com 11211` and execute some commands is it similarly slow? – ceejayoz Sep 25 '14 at 20:14
  • hmm it's actually not bad... there must be something in code... good idea. thanks! – daSn0wie Sep 26 '14 at 21:36
  • @daSn0wie did you ever find a conclusive answer for this issue? Was it your code? I feel like I have the same issue, with PHP and an external Redis server, local redis instance is fine – Tim Wachter May 13 '16 at 14:43
  • @timwachter it ended up being some code on my end that was slowing down the process. test it with a different client to see if there's latency. – daSn0wie May 15 '16 at 13:11
  • @daSn0wie I'm starting to suspect my security group settings and VPC :) Think my connection goes over the public internet – Tim Wachter May 15 '16 at 16:06

1 Answers1

0

I can confirm this problem with AWS Redis Elasticache. In my case I get atm more than 5000 ms delay when I run netcat call:

time nc -vz my-redis-cache.cache.amazonaws.com 6379

Connection to my-redis-cache.cache.amazonaws.com 6379 port [tcp/*] succeeded!
real    0m5.005s
user    0m0.000s
sys 0m0.000s

The issue comes sporadically, and I can't see any pattern or problem from the Monitoring -view. We are using Redis heavily for mostly writing counters.

Since 5000ms rendering time is unacceptable for our customers, I have no other answer than not to use Redis or Elasticache. I switched some cache on a memcached running on localhost on the EC2 instance.

PHZ.fi-Pharazon
  • 261
  • 1
  • 10