Hervé COMMOWICK | 698ae00 | 2010-01-12 09:25:13 +0100 | [diff] [blame] | 1 | # This is a test configuration. |
| 2 | # It requires a mysql server running on local port 3306. |
| 3 | |
| 4 | global |
| 5 | maxconn 500 |
| 6 | |
| 7 | defaults |
Willy Tarreau | d4359fd | 2021-04-02 10:49:34 +0200 | [diff] [blame] | 8 | timeout connect 1000 |
| 9 | timeout client 5000 |
| 10 | timeout server 5000 |
Hervé COMMOWICK | 698ae00 | 2010-01-12 09:25:13 +0100 | [diff] [blame] | 11 | retries 1 |
| 12 | option redispatch |
| 13 | |
| 14 | listen stats |
| 15 | bind :8080 |
| 16 | mode http |
| 17 | stats enable |
| 18 | stats uri /stats |
| 19 | |
| 20 | listen mysql_1 |
| 21 | bind :3307 |
| 22 | mode tcp |
| 23 | balance roundrobin |
Hervé COMMOWICK | 8776f1b | 2010-10-18 15:58:36 +0200 | [diff] [blame] | 24 | option mysql-check user haproxy |
Hervé COMMOWICK | 698ae00 | 2010-01-12 09:25:13 +0100 | [diff] [blame] | 25 | server srv1 127.0.0.1:3306 check port 3306 inter 1000 fall 1 |
| 26 | # server srv2 127.0.0.2:3306 check port 3306 inter 1000 fall 1 |
| 27 | # server srv3 127.0.0.3:3306 check port 3306 inter 1000 fall 1 |
| 28 | # server srv4 127.0.0.4:3306 check port 3306 inter 1000 fall 1 |
| 29 | |