Skip to content

Instantly share code, notes, and snippets.

@nairihar
Last active June 22, 2018 08:18
Show Gist options
  • Save nairihar/330da5702d473f98e7217a47146a8f6a to your computer and use it in GitHub Desktop.
Save nairihar/330da5702d473f98e7217a47146a8f6a to your computer and use it in GitHub Desktop.
NodeJS Health Check and Overload Protection, medium
global
log 127.0.0.1 local0 notice
user haproxy
group haproxy
defaults
log global
mode http
option httplog
frontend tracker
bind *:3000
mode http
default_backend trackers
backend trackers
mode http
balance roundrobin
option httpchk GET /check
http-check expect status 200
server srv01 127.0.0.1:8000 check 5s fall 1 rise 2
server srv02 127.0.0.1:8001 check 5s fall 1 rise 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment