My application is running in Kubernetes pods and I would like to use golang/groupcache to distribute key/value entities amongst instances of the app.
The groupcache library in each of my app instances is required to know the connection details (IP & port) of all the other app instances so it can distribute the key/value entities as it sees fit. How can I let groupcache know the connection details of the other running instances of my application? Would it be preferable/possible to use the Kubernetes Go Client Library?
Go Client Library is one of the options. Another (more simple) option is to setup a headless service for groupcache, so with a single DNS lookup you can get all IP addresses of all groupcache pods.