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:
So here are a the questions:
Thank you in advance.
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.