backend using check of another backend
Hi, Is it possible to configure haproxy with some backend using check of only one backend ? My problem is that all my backend is hosted on same servers but need differents backend to apply some quotas. If I enable check on all my backend I send too many checks to the network. Somethink like that : backend b_mysitetocheck server server1 check maxconn 100 maxqueue 1 server server2 check maxconn 100 maxqueue 1 server server3 check maxconn 100 maxqueue 1 And for others backends without the check : backend b_othersiteXXX server server1 maxconn 100 maxqueue 1 # if server1 active on b_mysitetocheck server server2 maxconn 100 maxqueue 1 # if server2 active on b_mysitetocheck server server3 maxconn 100 maxqueue 1 # if server3 active on b_mysitetocheck How can I do that ? Thanks, Aurélien
Re: backend using check of another backend
Hi Aurélien, Le jeudi 21 octobre 2010 10:47:50, Aurélien Bras a écrit : Hi, Is it possible to configure haproxy with some backend using check of only one backend ? My problem is that all my backend is hosted on same servers but need differents backend to apply some quotas. If I enable check on all my backend I send too many checks to the network. See the track keyword in the documentation, it exactly answers to your need ;-) Somethink like that : backend b_mysitetocheck server server1 check maxconn 100 maxqueue 1 server server2 check maxconn 100 maxqueue 1 server server3 check maxconn 100 maxqueue 1 And for others backends without the check : backend b_othersiteXXX server server1 maxconn 100 maxqueue 1 # if server1 active on b_mysitetocheck server server2 maxconn 100 maxqueue 1 # if server2 active on b_mysitetocheck server server3 maxconn 100 maxqueue 1 # if server3 active on b_mysitetocheck Which can be written as : backend b_othersiteXXX server server1 ip:port maxconn 100 maxqueue 1 track b_mysitetocheck/server1 server server2 ip:port maxconn 100 maxqueue 1 track b_mysitetocheck/server3 server server3 ip:port maxconn 100 maxqueue 1 track b_mysitetocheck/server3 -- Cyril Bonté
weird error unknown option 'splice-auto'.
Copied a working 1.4.8 config to a Fedora 14 box with Fedora compiled 1.4.8 haproxy and it says unknown option 'splice-auto'. Is that correct? # service haproxy restart [ALERT] 292/190016 (3644) : parsing [/etc/haproxy/haproxy.cfg:2] : unknown option 'splice-auto'. [ALERT] 292/190016 (3644) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg [ALERT] 292/190016 (3644) : Fatal errors found in configuration. Errors in configuration file, check with haproxy check. # which haproxy /usr/sbin/haproxy # md5sum /usr/sbin/haproxy 6bf6c61a436f3e909be2903dbd702b79 /usr/sbin/haproxy # haproxy -vv HA-Proxy version 1.4.8 2010/06/16 Copyright 2000-2010 Willy Tarreau w...@1wt.eu Build options : TARGET = linux26 CPU = generic CC = gcc CFLAGS = -O2 -g OPTIONS = USE_LINUX_TPROXY=1 USE_REGPARM=1 USE_PCRE=1 Default settings : maxconn = 2000, bufsize = 16384, maxrewrite = 8192, maxpollevents = 200 Encrypted password support via crypt(3): yes Available polling systems : sepoll : pref=400, test result OK epoll : pref=300, test result OK poll : pref=200, test result OK select : pref=150, test result OK Total: 4 (4 usable), will use sepoll. # uname -a Linux xxyyzz 2.6.35.6-46.fc14.x86_64 #1 SMP Tue Oct 19 02:58:56 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
Re: weird error unknown option 'splice-auto'.
Hi Hank, Le jeudi 21 octobre 2010 20:41:11, Hank A. Paulson a écrit : Copied a working 1.4.8 config to a Fedora 14 box with Fedora compiled 1.4.8 haproxy and it says unknown option 'splice-auto'. Is that correct? (...) Build options : TARGET = linux26 CPU = generic CC = gcc CFLAGS = -O2 -g OPTIONS = USE_LINUX_TPROXY=1 USE_REGPARM=1 USE_PCRE=1 This option is only available if haproxy is compiled with USE_LINUX_SPLICE=1 -- Cyril Bonté