upstream backend { server app:8000; server app2:8000; } server { listen 80; server_name _; location / { proxy_pass http://backend; } }