Docker Swarm Load Balancing

Hi,
I've tried a lot of thing before deciding to ask for help :slight_smile:
I'm testing the load balancing feature and I do not understand if it is working as expected or not.

I have a docker swarm of 2 managers.

traefik container is running on host1.
whoami containers are running on host1 and host2

when calling http://whoami.domain.fr/, I got reply from containers only from host1.
I tried with 2 or 4 replicas and it's the same.

Is that normal behavior or is there a configuration that I missed?

Here is my services configs:


  traefik:
    image: "traefik:latest"
    command: 
      - "--log.level=INFO"
      - "--api.insecure"
      - "--entrypoints.http.address=:80"
      - "--entrypoints.https.address=:443"
      - "--entrypoints.traefik.address=:82"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
            
    ports:
      - "80:80"
      - "443:443"

    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    
    networks:
      - public  
          
    labels:
        - "traefik.enable=true"      
        - "traefik.docker.lbswarm=true"
        - "traefik.docker.network=public"

whoami:
    image: "containous/whoami"
    container_name: "whoami"
    labels:
      - "traefik.docker.lbswarm=true"
      - "traefik.enable=true"
      - "traefik.docker.network=public"
     
      - "traefik.http.routers.whoami.rule=Host(`whoami.domain.fr`)"
      - "traefik.http.routers.whoami.entrypoints=http"   
      - "traefik.http.routers.whoami.service=whoami"
      - "traefik.http.services.whoami.loadbalancer.server.port=80"
   
    deploy:
      mode: replicated
      replicas: 4
         
    networks:
      - public

Thank you !

ok, I found the issue myself...
the whoami labels should be in under the "deploy"....