By RalekArts
I’m relatively new to nearly everything with web development, but I’ve been playing around with Docker recently. While my local environment is basically a bunch of Docker images interconnected, my actual production environment is going to spread out among multiple servers so I can better load balance and scale.
My question is, docker allows you to use the name of the docker image as a stand-in for IP addresses, since it has an internal DNS server that will resolve them to the correct IP on the subnet.
For example, using redis:6379 instead of [redis server IP]:6379 because internally, ‘redis’ resolves automatically to the correct private IP via Docker’s DNS.
So what I’m wondering is, does Digitalocean offer an inbuilt functionality for something like this? Or will I have to host my own DNS server for my droplets that redirects to their private IP’s as needed? Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey!
What you are looking for is a service discovery tool like Hashicorp’s Consul [1] or Netflix’s Eureka [2].
If you’re using Kubernetes, you can reference their services using a DNS [3].
If you’re using Hashicorp’s Nomad, it comes with Consul integration built in [4].
[1] https://www.consul.io/use-cases/service-discovery-and-health-checking [2] https://github.com/Netflix/eureka [3] https://kubernetes.io/docs/concepts/services-networking/dns-pod-service [4] https://www.nomadproject.io/docs/integrations/consul-integration/
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.