Is it possible to use one haproxy process to load-balance more than one protocol/port?
I’ve got haproxy to work for us. But right now there are two haproxy processes running. One for HTTP and the other for TCP (RTMP). I’ve tried to configure both proxies in one configuration file but haproxy only handles HTTP then.
My configuration file:
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#daemon
debug
user haproxy
group haproxy
maxconn 4096defaults
log global
mode tcp
option tcplog
option dontlognull
option redispatch
retries 3
maxconn 2000
contimeout 10000
clitimeout 50000
srvtimeout 50000listen http :80
mode tcp
balance roundrobin server h1 xxx.xxx.xxx.xxx:80 check
server h2 xxx.xxx.xxx.xxx:80 checklisten rtmp :1935
mode tcp
balance roundrobin server s1 xxx.xxx.xxx.xxx:1935 check
server s2 xxx.xxx.xxx.xxx:1935 check
This doesn’t work for me. It only works when I split the configuration in two (one HTTP, one RTMP) and start two haproxy processes.
Ok, I have to answer my own question one more time. Yes, it is possible and my configuration file works. The problem was somewhere outside of HAProxy. Mea culpa.
Check more discussion of this question.
Related posts:
Leave a comment
Recent Posts
- Cron expression that runs every 5 minutes from 1:30 am – 6:00 am [duplicate]
- Understanding redundant power supplies
- Is there a way for administrators to disable users from installing Firefox extensions?
- Is there research material on NTP accuracy available?
- How to create a limited “domain admin” that does not have access to domain controllers?
Tags
active-directory
amazon-ec2
apache
apache2
backup
bash
centos
cisco
command-line
debian
dns
email
exchange
firewall
iis
iis7
iptables
linux
macosx
monitoring
mysql
networking
nginx
performance
permissions
php
postfix
raid
security
sql-server
sql-server-2005
sql-server-2008
ssh
ssl
ubuntu
unix
virtualization
vpn
webserver
windows
windows-7
windows-server-2003
windows-server-2008
windows-server-2008-r2
windows-xp





