aldikhan13

nginx load balancer config

Feb 14th, 2021
101
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. worker_processes 4;
  2. thread_pool default threads=50 max_queue=100000;
  3.  
  4. events {
  5.   worker_connections 1024;
  6. }
  7.  
  8. http {
  9.  
  10.   upstream webapp-service.io {
  11.     server companies-service:3000 weight=10 max_fails=3 fail_timeout=30s;
  12.     server jobs-service:3000 weight=10 max_fails=3 fail_timeout=30s;
  13.     server profiles-service:3000 weight=10 max_fails=3 fail_timeout=30s;
  14.     server users-service:3000 weight=10 max_fails=3 fail_timeout=30s;
  15.   }
  16.  
  17.   server {
  18.       listen 80;
  19.       listen [::]:80;
  20.       server_name webapp-service.io;
  21.  
  22.       location / {
  23.         proxy_pass http://webapp-service.io;
  24.         proxy_http_version 1.1;
  25.         proxy_redirect off;
  26.         proxy_buffering off;
  27.         proxy_set_header Host $host;
  28.         proxy_set_header Upgrade $http_upgrade;
  29.         proxy_set_header Connection "upgrade";
  30.         proxy_cache_bypass $http_upgrade;
  31.       }
  32.   }
  33. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×