amazon-web-servicesredislatencyamazon-elasticachedistributed-caching

Does AWS ElastiCache Redis have a significant network latency?


I have a ASP.NET web application on IIS, that caches a lot of data to built-in ASP.NET cache. I want to move caching to Redis and use AWS ElastiCache Redis for that, because all currently my servers don't share their cache. They are hosted on EC2 already. I need to understand, whether I won't get performance decreasing by moving cache from basically same server, I host my application, to some network instance of AWS ElastiCache? I read that AWS Redis itself has a 'sub-millisecod latency', however I didn't get, if it is said about network latency too or what conditions must be met to gain this latency.

Here is my circumstances:

  1. 2 app servers on IIS EC2 WinServer2008R2 under load balancing
  2. Need to cache thousands of various objects as JSON, can be up to 1M symbols
  3. All servers can be set up in the same region

So here are a the questions:

  1. Is AWS ElastiCache Redis appropiate solution?
  2. What should I do in order to minimize latency to Redis?

Thank you in advance.


Solution

  • I need to understand, whether I won't get performance decreasing by moving cache from basically same server - Yes you will observe an increase in the latency in order of milliseconds, but since you are moving to centralized cache the data will not get duplicated in the instances if the instances share cache data.

    I read that AWS Redis itself has a 'sub-millisecod latency', however I didn't get, if it is said about network latency too or what conditions must be met to gain this latency. - No it does not include the network latency, network latency varies on how you place your instances in the subnets.

    Is AWS ElastiCache Redis appropriate solution? Yes it is, since you will get the capability of build in Expiries of keys, it supports rich data structures, your data is much more reliable by having a slave, you can make use of PUB/SUB capabilities etc.

    What should I do in order to minimize latency to Redis? if you have hosted the instances in single AZ instead of two AZ, host your redis master node in the same AZ it will reduce the latency.