I am having a cluster of coreos machines. I am running the database on a container in one of the hosts and I am running the appserver on another container in a different host. Since the two containers are not on the same host, I can't really use the 'docker link' command to link these containers together so I wonder what's the best practice to actually inform the webserver about the ip address of the database server.
This sounds like a good candidate for the ambassador pattern. In a few words: the idea is to create local ambassador containers to link with, and leave them with the responsibility to create the "remote links" with the other hosts. In the end, the goal is to avoid explicitly knowing about the remote hosts from within your application containers.
Here are some resources on this topic:
progrium/ambassadord
: a recently contributed generic implementation of the ambassador patternIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With