Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

189
Visualizações
Where to check swarm load balancer logs?

I have docker compose file as

---
version: '3.7'
services:
  myapi:
    image: tiangolo/uwsgi-nginx-flask:python3.7
    env_file: apivars.env
    logging:
      driver: syslog
      options:
        syslog-address: "udp://127.0.0.1:514"
        tag: tags
        labels: labels
    ports:
      - "8080:80"
    deploy:
      placement:
        constraints:
          - node.role != manager
      mode: replicated
      replicas: 32
      update_config:
        parallelism: 4
        delay: 5s
        order: start-first
...

I have load balancer which will redirect request to this swarm manager.

My understanding is, if I hit www.myapi.com, it will got to LoadBalancer and then request will go to swarm manager, then swarm manager send that request to on of the 32 replicas.

Now issue is, LoadBalancer logs report some of the 502 errors.

# head -n1 /var/log/haproxy.log
Apr 28 09:35:28 localhost haproxy[43117]: 172.19.9.1:50220 [28/Apr/2020:09:35:08.549] main~ API_Production/swarmnode5 0/0/1/19952/19953 502 309 - - ---- 97/97/10/1/0 0/0 "GET /v2/students/?includeFields=name,id&per_page=1000&page=88 HTTP/1.1"

I have to check its reaching to swarm manager or swarmnode5 ?

I check the logs for nginx, but its not report any 502 errors. There are some exceptions, but not sure if exception is there in code, then why nginx not logs that api call and response?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda