Last active
August 29, 2015 13:55
-
-
Save meineerde/8693557 to your computer and use it in GitHub Desktop.
Example HAProxy configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frontend http | |
bind :80 | |
mode http | |
option http-server-close | |
# send request to the main backend until it has 50 parallel request | |
use_backend main if { be_conn(main) le 50 } | |
# send further requests to the others backend | |
use_backend others if { be_conn(main) gt 50 } | |
backend main | |
server main-server 102.168.1.1:80 maxconn 100 | |
backend others | |
server backup1 102.168.1.11:80 maxconn 50 | |
server backup2 102.168.1.12:80 maxconn 50 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment