5 ms·
Docker Networking and DNS: The Good, the Bad, and the Ugly
- falcolas 10y agoYou also have to account for how your individual programming language handles DNS lookups - i.e. does it do its own caching? Round robin can quickly breaks down when using DNS.
- vfarcic 10y agoMy intention was to send the same message. That's why I put Docker DNS as "potentially useful but still in its infancy".
- jjn2009 10y agoThis is the reason why kubernetes uses proxying rather than DNS for load balancing. The number of pitfalls with using DNS for loadbalancing are just too large.
- HorizonXP 10y agoPersonally, I like how Kubernetes handles this with an independent service that's built upon flannel (Kube-DNS). I'd rather Docker stick to running containers, and that's it.
- jmspring 10y agoWeave (https://github.com/weaveworks/weave https://github.com/weaveworks/weave) is actually a nice DNS/SDN solution for Docker. Quick and easy to set up.
- yissachar 10y agoI tried Weave but ultimately had to abandon it, as there were too many issues in resolving DNS directly to containers. Kubernetes resolves DNS to a virtual IP that in turns maps to the container IPs, which I found to be a much better approach.
- jmspring 10y agoMy initial work with it was pre-docker networking. Admittedly, I need to spend more time with Kubernetes, but the rapid evolution and multiple solutions to service discoverability, load balancing, and networking in the Docker eco-system is a bit of a challenge to keep on top of and figure out what's best/right for the situation. I suspect, near term, the solution is "what works for me now, I'll figure out something else as I have time/down the road."