varnish / hitch

A scalable TLS proxy by Varnish Software.
https://www.varnish-software.com/
Other
1.87k stars 157 forks source link

Shared-cache update peer-list in k8s #351

Open edgsantos opened 3 years ago

edgsantos commented 3 years ago

Going through the hitch repo I noticed that hitch has support for shared-cache Problem being, from my understanding if i have a 3 POD setup, each hitch container must know the IP of the remaining PODs to fill the shared-cache-peer list.

Any guidance on how this could be done in kubernetes? In a VM setup it would be relatively easy to change the configuration upon a change using Puppet or Chef. Using a more dynamic setup like kubernetes i'm struggling to find a proper way to keep the peer list updated?

Thanks

gquintard commented 3 years ago

Hi,

There are a couple of facets to that (interesting) question:

edgsantos commented 3 years ago

that being said, given that there appears to be multicast support (I haven't tested it), does it matter that you can't precisely list all the pods?

Multicast works and seems a way better alternative than keeping lists of IPs 👍 @gquintard are you able to point me to some documentation / code that talks about multicast support?

gquintard commented 3 years ago

I really only looked https://github.com/varnish/hitch/issues/115#issuecomment-335822312 which seems straightforward, but there may be dragons