September 2018
Intermediate to advanced
764 pages
20h 6m
English
At the moment, our API container can communicate with our Elasticsearch container because, under the hood, they're connected to the same network, on the same host machine:
$ docker network lsNETWORK ID NAME DRIVER SCOPEd764e66872cf bridge bridge local61bc0ca692fc host host localbdbbf199a4fe none null local$ docker network inspect bridge --format='{{range $index, $container := .Containers}}{{.Name}} {{end}}'elasticsearch hobnob
However, if these containers are deployed on separate machines, using different networks, how can they communicate with each other?
Our API container must obtain network information about the Elasticsearch container so that it can send requests to it. One way to do this is by using a service discovery ...
Read now
Unlock full access