Skip to content

Commit 70359e5

Browse files
committedMay 22, 2014
Merge pull request #39 from derekwaynecarr/centos_haproxy
HAProxy configuration for 10 node server pool
2 parents 63e701b + 1a0db1a commit 70359e5

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
 
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM centos
2+
MAINTAINER Derek Carr <decarr@redhat.com>
3+
4+
# update, install required, clean
5+
RUN yum -y update && yum install -y haproxy && yum clean all
6+
7+
# setup haproxy configuration
8+
ADD ./etc/haproxy.conf /etc/haproxy.conf
9+
10+
# Expose ports
11+
EXPOSE 80
12+
EXPOSE 1936
13+
14+
CMD ["haproxy", "-f", "/etc/haproxy.conf"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
global
2+
maxconn 4096
3+
pidfile /var/run/haproxy.pid
4+
defaults
5+
mode http
6+
retries 3
7+
option redispatch
8+
maxconn 2000
9+
contimeout 5000
10+
clitimeout 50000
11+
srvtimeout 50000
12+
listen HA_GROUP :80
13+
mode http
14+
cookie HA_GROUP insert
15+
balance roundrobin
16+
option httpclose
17+
option forwardfor
18+
server SERVER_01 192.168.1.2:8080 cookie HA_GROUP_SERVER_01 check inter 1000
19+
server SERVER_02 192.168.1.3:8080 cookie HA_GROUP_SERVER_02 check inter 1000
20+
server SERVER_03 192.168.1.4:8080 cookie HA_GROUP_SERVER_03 check inter 1000
21+
server SERVER_04 192.168.1.5:8080 cookie HA_GROUP_SERVER_04 check inter 1000
22+
server SERVER_05 192.168.1.6:8080 cookie HA_GROUP_SERVER_05 check inter 1000
23+
server SERVER_06 192.168.1.7:8080 cookie HA_GROUP_SERVER_06 check inter 1000
24+
server SERVER_07 192.168.1.8:8080 cookie HA_GROUP_SERVER_07 check inter 1000
25+
server SERVER_08 192.168.1.9:8080 cookie HA_GROUP_SERVER_08 check inter 1000
26+
server SERVER_09 192.168.1.10:8080 cookie HA_GROUP_SERVER_09 check inter 1000
27+
server SERVER_10 192.168.1.11:8080 cookie HA_GROUP_SERVER_10 check inter 1000
28+
listen stats :1936
29+
mode http
30+
log global
31+
maxconn 10
32+
clitimeout 100s
33+
srvtimeout 100s
34+
contimeout 100s
35+
timeout queue 100s
36+
stats enable
37+
stats hide-version
38+
stats refresh 30s
39+
stats show-node
40+
stats realm Haproxy\ Statistics
41+
stats uri /haproxy?stats
42+
stats auth admin:password

0 commit comments

Comments
 (0)