Haproxy stats bug with nbproc > 1
Hi, With haproxy 1.4.22 and you enable the stats page (to monitor/enable/disable servers), it works great with nbproc set to 1(by default). When you enable nbproc > 1, Each time you refresh the page, a different page is shown depending on the thread. This is really annoying. (and I would almost call it a bug) When you try to enable/disable servers through the web gui, you have to refresh multiple times (so it can cycle through every thread) to actually enable/disable a server. Will this be fixed in Haproxy 1.5? (or current in Git?) Thanks. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Re: HAProxy, SSL, configuration check, and some questions (Xforward in C++ ?)
Hi Baptiste, and thanks for your anwser. Answers (and more questions maybe) inline too. Le 01/03/2013 06:52, Baptiste a écrit : Hi Boris, My answers inline. On Fri, Mar 1, 2013 at 5:07 AM, Boris Pigeot wrote: So first, my "soon running" configuration http://vpaste.net/j13Tb I'm using haproxy in front of 3 lighttpd. I have 3 "listen", we received some DOS, so sometimes we have to nullroute one of the IP, so we can keep 2/3 of our trafic. There is only one backend for now, the "backup" is just on another port for testing. So *first*, do you see anything really wrong with my config file ? Yes: option http-server-close option forceclose are mutually incompatible and from the rest of your mail, I can see "forceclose" takes the precedence. OK, so I take of this forceclose, I was quite sure one of this two options was the blocking one. I just updated my kernel to 3.7.10 to see if there is, or not any amelioration, I can't feel the difference for know (I'm the only one on this haproxy). this is more a question of kernel stability than performance... ok, for me "fastopen", I just saw the "fast" ;) Before the SSL handle, I was using a lighttpd in front => localhost: haproxy => backend lighttpd. *Other question* : I have a little bittorrent tracker, running on C++, since 2 days, I'm trying to find on Google some information on "how to get the X Forward header". char ip[INET_ADDRSTRLEN]; inet_ntop(AF_INET, &(client_addr.sin_addr), ip, INET_ADDRSTRLEN); std::string ip_str = ip; Should be in something arround this, I tried to find some stuff in HAProxy sources, but I'm not very familiar with this. what is your problem here? Your HAProxy setup already inserts a X-Forwarded-For header. My problem isn't haproxy related, it's more "how to get" this X Forward in "C++". For PHP $_SERVER[... ok For C++ ? No idea at all *Other Quesiton* : Any idea, maybe it could be a feature request, to add haproxy "user agent" on check. You mean on health check? If so: option httpchk GET / HTTP/1.0\r\nUser-Agent:\ Mozilla/6.0 don't forget to backslash spaces. Arf, so simple... *Keep Alive question* : On my ACL munin (the only page where I can have a real use of keepalive because of the number of images), I can't find a valid method to activate keepalive. remove the option forceclose and it may work. That's all for now, thanks in advance if you can help me, or just if you read this entire message. Boris. Baptiste Thanks again for all this precious informations ;)
HAProxy, SSL, configuration check, and some questions (Xforward in C++ ?)
So first, my "soon running" configuration http://vpaste.net/j13Tb I'm using haproxy in front of 3 lighttpd. I have 3 "listen", we received some DOS, so sometimes we have to nullroute one of the IP, so we can keep 2/3 of our trafic. There is only one backend for now, the "backup" is just on another port for testing. So *first*, do you see anything really wrong with my config file ? I just updated my kernel to 3.7.10 to see if there is, or not any amelioration, I can't feel the difference for know (I'm the only one on this haproxy). Before the SSL handle, I was using a lighttpd in front => localhost: haproxy => backend lighttpd. *Other question* : I have a little bittorrent tracker, running on C++, since 2 days, I'm trying to find on Google some information on "how to get the X Forward header". char ip[INET_ADDRSTRLEN]; inet_ntop(AF_INET, &(client_addr.sin_addr), ip, INET_ADDRSTRLEN); std::string ip_str = ip; Should be in something arround this, I tried to find some stuff in HAProxy sources, but I'm not very familiar with this. *Other Quesiton* : Any idea, maybe it could be a feature request, to add haproxy "user agent" on check. *Keep Alive question* : On my ACL munin (the only page where I can have a real use of keepalive because of the number of images), I can't find a valid method to activate keepalive. That's all for now, thanks in advance if you can help me, or just if you read this entire message. Boris.
Re: RoundRobin seems to be missing a bit
Thanks. Just tired it - still doesn't seem to work for some reason. By the way, thanks for those params - they are not listed even here: http://code.google.com/p/haproxy-docs/w/list I probably would've never guessed them if it wasn't for you. Well, back to the drawing board, as they say:) Boris. On Tue, Jan 22, 2013 at 12:14 PM, Zachary Stern wrote: > Example config line: > > server app1 6.6.6.6:80 check inter 30s fastinter 5s downinter 1s > > If you look up those parameters, inter, fasterinter, and downinter, you > should have what you need. (Do look them up). > > > > On Tue, Jan 22, 2013 at 12:07 PM, Boris Epstein wrote: > >> Thanks Zachary! >> >> Do you remember specifically which ones those would be? >> >> >> >> On Tue, Jan 22, 2013 at 12:05 PM, Zachary Stern >> wrote: >> >>> That's because HAproxy does not detect instantly that a backend server >>> is down. You have to set the intervals. >>> >>> >>> On Tue, Jan 22, 2013 at 11:59 AM, Boris Epstein wrote: >>> >>>> Hello all, >>>> >>>> I just configured a very primitive HAProxy installation on a CentOS 6 >>>> machine with the configuration that looks as follows: >>>> >>>> >>>> >>>> # Simple configuration for an HTTP proxy listening on port 80 on all >>>> # interfaces and forwarding requests to a single backend "servers" with >>>> a >>>> # single server "server1" listening on 127.0.0.1:8000 >>>> global >>>> daemon >>>> maxconn 1024 >>>> >>>> defaults >>>> mode http >>>> timeout connect 5000ms >>>> timeout client 5ms >>>> timeout server 2ms >>>> >>>> frontend http-in >>>> bind *:80 >>>> option http-server-close >>>> default_backend servers >>>> >>>> backend servers >>>> balance roundrobin >>>> server server1 10.12.204.18 check port 80 maxconn 32 >>>> server server1 10.12.204.19 check port 80 maxconn 32 >>>> >>>> >>>> ---- >>>> >>>> Everything seems to be OK but one pesky little problem: every time you >>>> shut off the HTTP server on either 10.12.204.18 or 10.12.204.19 and reload >>>> the HAProxy's URL on the external IP it skips a beat - i.e., you get the >>>> 503 error. But then you reload again and the remaining server kicks into >>>> action. >>>> >>>> Has anybody seen that? Does anybody have any idea as to why this would >>>> be? >>>> >>>> Thanks. >>>> >>>> Boris. >>>> >>> >>> >>> >>> -- >>> >>> zachary alex stern I systems architect >>> >>> o: 212.363.1654 x106 | f: 212.202.6488 | z...@enternewmedia.com >>> >>> 60-62 e. 11th street, 4th floor | new york, ny | 10003 >>> >>> www.enternewmedia.com >>> >> >> > > > -- > > zachary alex stern I systems architect > > o: 212.363.1654 x106 | f: 212.202.6488 | z...@enternewmedia.com > > 60-62 e. 11th street, 4th floor | new york, ny | 10003 > > www.enternewmedia.com >
Re: RoundRobin seems to be missing a bit
Thanks Zachary! Do you remember specifically which ones those would be? On Tue, Jan 22, 2013 at 12:05 PM, Zachary Stern wrote: > That's because HAproxy does not detect instantly that a backend server is > down. You have to set the intervals. > > > On Tue, Jan 22, 2013 at 11:59 AM, Boris Epstein wrote: > >> Hello all, >> >> I just configured a very primitive HAProxy installation on a CentOS 6 >> machine with the configuration that looks as follows: >> >> >> >> # Simple configuration for an HTTP proxy listening on port 80 on all >> # interfaces and forwarding requests to a single backend "servers" with a >> # single server "server1" listening on 127.0.0.1:8000 >> global >> daemon >> maxconn 1024 >> >> defaults >> mode http >> timeout connect 5000ms >> timeout client 5ms >> timeout server 2ms >> >> frontend http-in >> bind *:80 >> option http-server-close >> default_backend servers >> >> backend servers >> balance roundrobin >> server server1 10.12.204.18 check port 80 maxconn 32 >> server server1 10.12.204.19 check port 80 maxconn 32 >> >> >> >> >> Everything seems to be OK but one pesky little problem: every time you >> shut off the HTTP server on either 10.12.204.18 or 10.12.204.19 and reload >> the HAProxy's URL on the external IP it skips a beat - i.e., you get the >> 503 error. But then you reload again and the remaining server kicks into >> action. >> >> Has anybody seen that? Does anybody have any idea as to why this would be? >> >> Thanks. >> >> Boris. >> > > > > -- > > zachary alex stern I systems architect > > o: 212.363.1654 x106 | f: 212.202.6488 | z...@enternewmedia.com > > 60-62 e. 11th street, 4th floor | new york, ny | 10003 > > www.enternewmedia.com >