Chapter 8, Orchestration Using Docker Swarm, showed us how applications work when deployed on top of a Docker Swarm cluster.
We will use service objects to deploy applications in Docker Swarm. Internal communication between services is always allowed if they run in the same network. Therefore, we will deploy an application's components in the same network and they will interact with other published applications. If two applications have to interact, they should share the network or be published.
Publishing applications is easy; we will just specify the ports that should be listening on the host where the process is running. However, we learned that Docker Swarm will publish an application's ports on all cluster hosts, and Router Mesh will route internal traffic to reach an appropriate service's tasks. Let's go back to these topics relating to containers and services before reviewing multi-service applications.
We have...