Skip to content

Instantly share code, notes, and snippets.

@tenfourty
Created April 9, 2011 07:53
Show Gist options
  • Save tenfourty/911226 to your computer and use it in GitHub Desktop.
Save tenfourty/911226 to your computer and use it in GitHub Desktop.
A sample configuration file for HAProxy that allows it to load balance ODBC and JDBC connections for Teiid.
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 4096
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
#debug
#quiet
defaults
log global
mode http
option httplog
option dontlognull
option redispatch
retries 3
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000
listen stats :9090
balance
mode http
stats enable
stats auth admin:admin
listen eds_jdbc :32000
mode tcp
option tcplog
balance leastconn
server eds_jdbc01 147.114.24.141:31000 check
server eds_jdbc02 147.114.24.141:31100 check
server eds_jdbc03 147.114.24.136:31000 check
server eds_jdbc04 147.114.24.136:31100 check
listen eds_odbc :31200
mode tcp
option tcplog
balance leastconn
server eds_odbc01 147.114.24.141:35432 check
server eds_odbc02 147.114.24.141:35532 check
server eds_odbc03 147.114.24.136:35432 check
server eds_odbc04 147.114.24.136:35532 check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment