3 ms·
Can someone explain use cases of using remote redis? Doesn't network delay is a big downside?
by f311a 8y ago
Can someone explain use cases of using remote redis? Doesn't network delay is a big downside?
- ssambros 8y agoIt is intended to be accessed by resources running in the same Google Cloud zone/region, so the network latency is minimal.
- monocasa 8y agoIn a datacenter, a network request to a server that has the information in DRAM can be faster than pulling it locally off of an SSD. It goes back and forth with perf gains on either side, but they're on the same order with different tradeoffs.
- ryanworl 8y agoEspecially if that "local SSD" is really a virtualized block device over a network anyway, which is how most people are deploying their cloud stuff for convenience.
- qeternity 8y agoIs this still the case? We don’t use much cloud from the big boys but I thought even they were moving towards local storage. All of our OVH instances are local SSD backed.
- ryanworl 8y agoBoth are available and AWS and GCP are pretty up-front about what you should use depending on the use case. The virtualized devices do have advantages in terms of being able to be moved around and not tied to the life of a single instance.
- deleted 8y ago[deleted]
- dominotw 8y agowhat about local rocksDB database that state stores use in kafka streams. Something like that would be best of both worlds.
- tybit 8y agoIt depends on the use case. eg if you have multiple web servers and a lot to keep cached then it’s more economical to have one machine with a lot of memory than each web server. Another would be keeping the cache consistent, a single instance of Redis offers atomic operations and strong consistency. E.g ensuring rate limiting is correctly applied across a service’s instances. Another would be decoupling state from apps which is especially important for serverless/FaaS where app memory is frequently cleared. If latency is an issue it can be mostly resolved by using a 2 tier cache, an in memory cache that is backed by a Redis cache. Redis pub sub can then be used to keep the in memory caches in sync. Stackoverflow is a good example of this architecture.