Hello everyone
I have a question about the difference between etcd and redis
tl;dr
I'm creating a custom dynamic reverse proxy that will be a frontend to forward requests to internal resources (to their internal ips). Internal resources (un)register themselves to the proxy dynamically
Is it better to use Redis or ETCD (or something else) in this case to persist the data (mapping between url/internal resource)? I'm total noob (never used Redis/etcd)
Full version
I'm using Kubernetes with statefulset workload and I'm having a usecase where :
1- A client makes a request to have a new instance (new pod in my case)
The instance (pod) comes, registers its internal IP to the reverse proxy, to be accessible at "
http://serviceurl/nodes/21" (using headless services for k8s experts)
2- The client is redirected to "
http://serviceurl/nodes/21" to talk to its instance
3- Once gone, with a timeout, un-register the instance and destroy the pod
For that, I've coded a small reverse proxy that can register/unregister endpoints dynamically.
But to persist data, I'm wondering what can be the best option between ETCD and Redis (to store a map of integers to internal IP), a key value store like.
eg : {21 : 10.254.213.2}
Thank you in advance