Hi Àbéjídé,
On 24/07/2018 17:59, Àbéjídé Àyodélé wrote: > Hi Friends, > > I am trying to bump session limits via the maxconn in the global > section as > below: > > cat /etc/haproxy/redacted-haproxy.cfg > global > maxconn 10000 > stats socket /var/run/redacted-haproxy-stats.sock user haproxy group > haproxy > mode 660 level operator expose-fd listeners > > frontend redacted-frontend > mode tcp > bind :2004 > default_backend redacted-backend > > backend redacted-backend > mode tcp > balance leastconn > hash-type consistent > > server redacted_0 redacted01.qa:8443 <http://redacted01.qa:8443> > check agent-check agent-port 8080 weight 100 > send-proxy > server redacted-684994ccd-6rn9q 192.168.39.223:8443 > <http://192.168.39.223:8443> check port 8443 weight 100 > send-proxy > server redacted-684994ccd-c88d9 192.168.46.66:8443 > <http://192.168.46.66:8443> check port 8443 weight 100 > send-proxy > server redacted-canary-58ccdb7cf4-47f4m 192.168.53.47:8443 > <http://192.168.53.47:8443> check port 8443 > weight 100 send-proxy > > NOTE: I removed some portion of the config for conciseness sake. > > However this did not seem to have any impact on HAProxy after a reload > as seen > below: > > echo "show stat" | socat > unix-connect:/var/run/redacted-haproxy-stats.sock stdio > | cut -d"," -f7 > slim > 2000 > > > > > 200 When slim is used in a Frontend line (in your case: redacted-frontend) it refers to the maxconn of the frontend. By default, when maxconn is not specified it is equal to 2000: https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#4.2-maxconn When slim is used in a Backend line (in your case: redacted-backend) it refers to the fullconn param because backends does not have maxconns. The fullconn param is a little bit more complicated to understand than maxconn. You can find more information about it in the doc: https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#4.2-fullconn or if you search the mailing list history but most of the time you don't need to use it. To understand the 200 value, you need to consider the following statement from the doc : > Since it's hard to get this value right, haproxy automatically sets it to 10% of the sum of the maxconns of all frontends that may branch to this backend So 10% of 2000 = 200 ++ - Moemen. > > I do not know where 2000 and 200 are coming from as I did not at any point > configure that, the maxconn was previously 4096. > > A more detailed stats output is below: > > echo "show stat" | socat > unix-connect:/var/run/redacted-haproxy-stats.sock stdio > # > pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,lbtot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli_abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,agent_status,agent_code,agent_duration,check_desc,agent_desc,check_rise,check_fall,check_health,agent_rise,agent_fall,agent_health,addr,cookie,mode,algo,conn_rate,conn_rate_max,conn_tot,intercepted,dcon,dses, > redacted-frontend,FRONTEND,,,0,2,2000,3694,0,0,0,0,0,,,,,OPEN,,,,,,,,,1,2,0,,,,0,3,0,9,,,,,,,,,,,0,0,0,,,0,0,0,0,,,,,,,,,,,,,,,,,,,,,tcp,,3,9,3694,,0,0, > redacted-backend,redacted_0,0,0,0,1,,2,0,0,,0,,0,0,0,0,UP,94,1,0,0,0,1582,0,,1,3,1,,2,,2,0,,1,L4OK,,0,,,,,,,,,,,0,0,,,,,683,,via > agent : up,0,0,0,0,L7OK,0,50,Layer4 check passed,Layer7 check > passed,2,3,4,1,1,1,10.185.57.54:8443 > <http://10.185.57.54:8443>,,tcp,,,,,,,, > redacted-backend,redacted-684994ccd-6rn9q,0,0,0,1,,46,0,0,,0,,0,0,0,0,UP,100,1,0,0,0,1582,0,,1,3,2,,46,,2,0,,1,L4OK,,0,,,,,,,,,,,0,0,,,,,6,,,0,0,0,1,,,,Layer4 > check passed,,2,3,4,,,,192.168.39.223:8443 > <http://192.168.39.223:8443>,,tcp,,,,,,,, > redacted-backend,redacted-684994ccd-c88d9,0,0,0,1,,45,0,0,,0,,0,0,0,0,UP,100,1,0,0,0,1582,0,,1,3,3,,45,,2,0,,1,L4OK,,0,,,,,,,,,,,0,0,,,,,12,,,0,0,0,0,,,,Layer4 > check passed,,2,3,4,,,,192.168.46.66:8443 > <http://192.168.46.66:8443>,,tcp,,,,,,,, > redacted-backend,redacted-canary-58ccdb7cf4-47f4m,0,0,0,1,,45,0,0,,0,,0,0,0,0,UP,100,1,0,0,0,1582,0,,1,3,4,,45,,2,0,,1,L4OK,,0,,,,,,,,,,,0,0,,,,,10,,,0,0,0,1,,,,Layer4 > check passed,,2,3,4,,,,192.168.53.47:8443 > <http://192.168.53.47:8443>,,tcp,,,,,,,, > redacted-backend,BACKEND,0,0,0,2,200,3694,0,0,0,0,,0,0,0,0,UP,394,4,0,,0,1582,0,,1,3,0,,138,,1,3,,9,,,,,,,,,,,,,,0,0,0,0,0,0,6,,,0,0,0,1,,,,,,,,,,,,,,tcp,leastconn,,,,,,, > > I need guidance on what I need to do to configure session limits > correctly and > also make it reflect in the exported metrics. > > Thanks! > > Abejide Ayodele > It always seems impossible until it's done. --Nelson Mandela

