Which method is more efficient to scale, use a Redis as a service or Redis on disk?

I have a question regarding the best approach to caching data using redis. I would like to use a Redis as a Service like Amazon Elasti Cachi or some other.

But I am in doubt if the network latency that I would have in my searches when querying through a connection with a machine that is outside my cluster, would harm my performance too much, to the point of being more feasible to have a machine inside my VPC, to use Redis.

Does anyone know how big would be the performance gap between open network sent I/O vs direct I/O on local disk or one inside a machine of my private network within the same region on Amazon?

For performance gain, is it worth taking on the responsibility and costs of managing a redis infrastructure? Or is it more feasible and practical to use it as a service?

 1
Author: Dimi Antoni Vargas, 2016-10-18

2 answers

At first disk is always faster than network, even more so if you have to go through the internet... If the volume of data you intend to use is not too large, there would be no problem putting Redis on another host within the same network, if the volume is large, the best thing to do is to use it local and "clog" the local host of memory...

 1
Author: Eldius, 2016-10-18 17:43:33

I use redis on the same network, but I have already had problems with the volume trafficked in network with the Redis keys. This problem I solved used MessagePack to decrease the size of the data (rather than using the value of the keys in json). To scale redis, we use twemProxy in front of 3 Redis servers, it distributes the keys between the servers and does the query as well, this decreases the amount of hits in each redis.

 1
Author: user3070292, 2019-02-13 12:34:54