3 ms·
Could you use Kubernetes to solve this? Have a single pod running the Redis instance and then multiple running Node.js talking to the Redis instance via somethi
by llamaLord 3y ago
Could you use Kubernetes to solve this? Have a single pod running the Redis instance and then multiple running Node.js talking to the Redis instance via something like DAPR (https://dapr.io/ https://dapr.io/)
- actionfromafar 3y agoYes, but the question is should you. If you already have Kubernetes knowledge and infrastructure, why not? Otherwise, maybe not.
- llamaLord 3y agoYeah I should be clear, I meant this question purely as a curiosity, not a recommendation. I'm a PM, trying to properly understand K8's, definitely not providing recommendations hahaha.
- joshribakoff 3y agoWouldn't Kubernetes and/or Dapr just add even more latency before the packets reach Redis? It seems like the parent comment's author is implying that Redis is already too slow even when running it on bare metal and connecting directly to it. Adding additional things like service discovery and proxies in the network path will not speed it up. To speed it up you would need to bring Redis closer, so perhaps you meant using k8 tools like "pod topology spread contraints" to do so (juxtaposing with the default k8 behavior that may spread workloads out in an undesirable manner)? Simply going from "we are not using k8s" to "we are using k8s" won't speed up latency to Redis.
- llamaLord 3y agoI was under the assumption OP's redis instance was running on a separate machine and they wanted to be and to achieve a setup that "felt like" it was distributed (container isolation, etc) but without the network hops adding in latency. My question was more around whether you could use K8's to effectively simulate that, but on a single beefy machine to remove the network hops. It was also a curiosity "is this possible" type of question, not an "I'm saying this is a good idea" type of question.
- wongarsu 3y agoThe irony of having someone comment on the complexity of running bare redis on the same server, only for someone else suggesting a whole Kubernetes setup for essentially the same thing. If you're already heavily invested in Kubernetes this is certainly a solution, though I feel this adds too much abstraction for the amount of problem it's solving.