title: How do networking and load balancer work in docker swarm mode?
body: <p>I am new to Dockers and containers.  I was going through the tutorials for docker and came across this information.
  <a href="https://docs.docker.com/get-started/part3/#docker-composeyml" rel="noreferrer">https://docs.docker.com/get-started/part3/#docker-composeyml</a></p>
  
  <pre><code>   networks:
       - webnet
  networks:
    webnet:
  </code></pre>
  
  <p>What is webnet? The document says</p>
  
  <blockquote>
    <p>Instruct web’s containers to share port 80 via a load-balanced network called webnet. (Internally, the containers themselves will publish to web’s port 80 at an ephemeral port.)</p>
  </blockquote>
  
  <p>So, by default, the overlay network is load balanced in docker cluster? What is load balancing algo used? </p>
  
  <p>Actually, it is not clear to me why do we have load balancing on the overlay network.</p>