Suppose there is a Docker Swarm cluster of N machines. It has M services that are different applications, some of which have replicas.
- How is access to applications organized for external clients? The first thing that comes to mind is nginx proxying requests depending on the hostname on the desired port of the node, but it seems to me that the vapiants should be more elegant.
- How are the ports distributed, and who makes sure that different applications do not use the same port?