Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!