[PATCH 0/9] Enhance show/clear table socat commands

2011-06-15 Thread Simon Horman
Hi, This patch series unifies the arguments taken by the show table and clear table socat commands by allowing: * show table key * clear table data. It also allows non IPv4 keys to be used.

[PATCH 3/9] [MINOR] Break out processing of clear table

2011-06-15 Thread Simon Horman
This will allow the code to be reused for showing a table filtered by key --- src/dumpstats.c | 126 +-- 1 files changed, 66 insertions(+), 60 deletions(-) diff --git a/src/dumpstats.c b/src/dumpstats.c index 309651d..e99153a 100644 ---

[PATCH 4/9] [MINOR] Allow listing of stick table by key

2011-06-15 Thread Simon Horman
--- doc/configuration.txt | 26 -- src/dumpstats.c | 32 +--- 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index b788c13..5455f7c 100644 --- a/doc/configuration.txt +++

[PATCH 1/9] [CLEANUP] dumpstats: make symbols static where possible

2011-06-15 Thread Simon Horman
--- include/proto/dumpstats.h |9 - src/dumpstats.c | 38 -- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/include/proto/dumpstats.h b/include/proto/dumpstats.h index 89e656e..850819a 100644 ---

[PATCH 2/9] [MINOR] Break out dumping table

2011-06-15 Thread Simon Horman
This will allow the code to be reused for showing a table filtered by key Signed-off-by: Simon Horman ho...@verge.net.au --- src/dumpstats.c | 315 +-- 1 files changed, 165 insertions(+), 150 deletions(-) diff --git a/src/dumpstats.c

[PATCH 9/9] [MINOR] Allow showing and clearing by key of string stick tables

2011-06-15 Thread Simon Horman
--- doc/configuration.txt |6 -- src/dumpstats.c |4 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 1d334df..7dfa2b1 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -9345,7 +9345,8 @@

[PATCH 7/9] [MINOR] Allow showing and clearing by key of ipv6 stick tables

2011-06-15 Thread Simon Horman
--- doc/configuration.txt |4 ++-- src/dumpstats.c | 16 +++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 538be58..00e83f1 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -9345,7

[PATCH 6/9] [MINOR] More flexible clearing of stick table

2011-06-15 Thread Simon Horman
* Allow clearing of all entries of a table * Allow clearing of all entries of a table that match a data filter --- doc/configuration.txt | 47 include/proto/dumpstats.h |1 + src/dumpstats.c | 41

[PATCH 8/9] [MINOR] Allow showing and clearing by key of integer stick tables

2011-06-15 Thread Simon Horman
--- doc/configuration.txt |4 ++-- src/dumpstats.c | 29 - 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 00e83f1..1d334df 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@

[PATCH 5/9] [MINOR] Break out all stick table socat command parsing

2011-06-15 Thread Simon Horman
This will allow reuse for clearing table entries other than by key --- src/dumpstats.c | 150 +++ 1 files changed, 73 insertions(+), 77 deletions(-) diff --git a/src/dumpstats.c b/src/dumpstats.c index bc1c2a4..6adcee2 100644 ---

RE: Apache translates 500 to 502 from haproxy

2011-06-15 Thread Sachin Shetty
I also think apache is the issue. I think we have a few mischievous modules like mod_rpaf that I need to disable and test. I will keep you posted. For now do you see any severe problem if I disabe httpclose as a workaround? Thanks Sachin -Original Message- From: Willy Tarreau

error with ipv6 backend www server

2011-06-15 Thread Delta Yeh
Hi, I run into error when I try to proxy http request to an ipv6 www server, the error is : debian:~/v6# ./haproxy -f v6.cfg [ALERT] 165/142945 (23488) : parsing [v6.cfg:28] : Unknown host in '3ffe::21da:7:3c06:7c4c:8215:2' [ALERT] 165/142945 (23488) : Error(s) found in configuration file :

Re: Apache translates 500 to 502 from haproxy

2011-06-15 Thread Willy Tarreau
On Wed, Jun 15, 2011 at 12:11:58PM +0530, Sachin Shetty wrote: I also think apache is the issue. I think we have a few mischievous modules like mod_rpaf that I need to disable and test. I will keep you posted. For now do you see any severe problem if I disabe httpclose as a workaround? As I

Re: error with ipv6 backend www server

2011-06-15 Thread Willy Tarreau
Hi, On Wed, Jun 15, 2011 at 02:42:58PM +0800, Delta Yeh wrote: Hi, I run into error when I try to proxy http request to an ipv6 www server, the error is : debian:~/v6# ./haproxy -f v6.cfg [ALERT] 165/142945 (23488) : parsing [v6.cfg:28] : Unknown host in

RE: Apache translates 500 to 502 from haproxy

2011-06-15 Thread Sachin Shetty
Does disabling httpclose also mean that haproxy will not even log subsequent requests on the same connection? Thanks Sachin -Original Message- From: Willy Tarreau [mailto:w...@1wt.eu] Sent: Wednesday, June 15, 2011 12:40 PM To: Sachin Shetty Cc: 'Cassidy, Bryan'; haproxy@formilux.org

Re: [PATCH] [MINOR] Allow shutdown of sessions when a server becomes unavailable

2011-06-15 Thread Simon Horman
On Wed, Jun 08, 2011 at 10:55:44AM +0200, Willy Tarreau wrote: [snip] Not necessarily : currently, if you only close on the server side, the effect will be propagated to the client side, so it already does the right thing and at the same time will allow us to improve on this later. Hi Willy,

Re: url_beg

2011-06-15 Thread Gerd Müller
Hi Willy, got your mail but was ill :( Sorry I checked the haproxys logfile and there I found the right backend. So before I will report an error I will check my application twice ... Thank you Gerd On 14.06.2011 07:12, Willy Tarreau wrote: Gerd, I'm not sure you got this mail since you did

Re: error with ipv6 backend www server

2011-06-15 Thread Brane F. Gračnar
On Wednesday 15 of June 2011 09:12:00 Willy Tarreau wrote: The server address syntax is : server name ip:port So you should have a colon and not a space before '80' : 3ffe::21da:7:3c06:7c4c:8215:2:80 Note that the syntax is non-ambiguous because the last colon is

Re: error with ipv6 backend www server

2011-06-15 Thread Delta Yeh
+1 cent 2011/6/15 Brane F. Gračnar brane.grac...@najdi.si: On Wednesday 15 of June 2011 09:12:00 Willy Tarreau wrote: The server address syntax is :      server  name ip:port So you should have a colon and not a space before '80' :     3ffe::21da:7:3c06:7c4c:8215:2:80 Note that the

Re: Apache translates 500 to 502 from haproxy

2011-06-15 Thread Willy Tarreau
On Wed, Jun 15, 2011 at 01:09:13PM +0530, Sachin Shetty wrote: Does disabling httpclose also mean that haproxy will not even log subsequent requests on the same connection? Exactly. But that's only an issue if that ever happens. Willy

unsubscribe

2011-06-15 Thread André Lemos

Are lots of small back-end pools handled efficiently?

2011-06-15 Thread Chris Allen
Hello, The architecture of our application is such that we are running haproxy with a large number (perhaps 700-800) of back-end pools, each containing a single server. Is this something that haproxy can handle efficiently? Are there any caveats as the number of pools increases? Perhaps memory

RE: Apache translates 500 to 502 from haproxy

2011-06-15 Thread Sachin Shetty
tried with option http-server-close instead of option httpclose - no luck it does not work. The only way I can get it to work is without either. Thanks Sachin -Original Message- From: Willy Tarreau [mailto:w...@1wt.eu] Sent: Wednesday, June 15, 2011 12:40 PM To: Sachin Shetty Cc:

nice wiki doc of haproxy

2011-06-15 Thread shreyas pandya
There is a nice wiki doc on haproxy configuration at http://code.google.com/p/haproxy-docs/ I m sharing this because i didn't see it's mention on main site http://haproxy.1wt.eu/ it's easy to read than original txt doc

Re: Are lots of small back-end pools handled efficiently?

2011-06-15 Thread Aurélien Bras
2011/6/15 Chris Allen chris.al...@photobox.com Hello, The architecture of our application is such that we are running haproxy with a large number (perhaps 700-800) of back-end pools, each containing a single server. Is this something that haproxy can handle efficiently? Are there any

HAProxy for PostgreSQL Failover

2011-06-15 Thread Alan Gutierrez
I'd like to use HAProxy to implement a simple proxy that can perform failover for a pair of PostgreSQL configured as master/slave with PostgreSQL 9.0 streaming replication to replicate the master to the slave. Only the master is active for client connections, unless the master fails, then

Re: Handling errors 502 Bad Gateway

2011-06-15 Thread Alexey Vlasov
Hi Willy Tarreau! On Thu, Jun 09, 2011 at 10:36:14PM +0200, Willy Tarreau wrote: Here, actually, I've found the description of the same problem. At Apache falling/restart, haproxy returns to users 502 error. http://www.formilux.org/archives/haproxy/0812/1575.html Here I give the

Re: Are lots of small back-end pools handled efficiently?

2011-06-15 Thread Willy Tarreau
Hello, On Wed, Jun 15, 2011 at 12:16:57PM +0100, Chris Allen wrote: Hello, The architecture of our application is such that we are running haproxy with a large number (perhaps 700-800) of back-end pools, each containing a single server. Is this something that haproxy can handle

Separated config file support

2011-06-15 Thread Igor
Got a very long haproxy.conf, is there any way to separate config file by using any directive like include *.conf? Bests, -Igor

Re: Separated config file support

2011-06-15 Thread Harvey Yau
On 6/15/11 3:59 PM, Igor wrote: Got a very long haproxy.conf, is there any way to separate config file by using any directive like include *.conf? Bests, -Igor A config directory would be nice as well. Would make it nice and easy to rsync config files around as well - pretty nice. --

Re: Separated config file support

2011-06-15 Thread Willy Tarreau
On Wed, Jun 15, 2011 at 04:02:09PM -0400, Harvey Yau wrote: On 6/15/11 3:59 PM, Igor wrote: Got a very long haproxy.conf, is there any way to separate config file by using any directive like include *.conf? Bests, -Igor A config directory would be nice as well. Would make it nice and

Re: nice wiki doc of haproxy

2011-06-15 Thread Willy Tarreau
On Wed, Jun 15, 2011 at 06:43:14PM +0530, shreyas pandya wrote: There is a nice wiki doc on haproxy configuration at http://code.google.com/p/haproxy-docs/ I m sharing this because i didn't see it's mention on main site http://haproxy.1wt.eu/ it's easy to read than original txt doc Yes,

Re: nice wiki doc of haproxy

2011-06-15 Thread Cyril Bonté
Hi all, Le mercredi 15 juin 2011 22:12:18, Willy Tarreau a écrit : On Wed, Jun 15, 2011 at 06:43:14PM +0530, shreyas pandya wrote: There is a nice wiki doc on haproxy configuration at http://code.google.com/p/haproxy-docs/ I m sharing this because i didn't see it's mention on main site

Re: nice wiki doc of haproxy

2011-06-15 Thread carlo flores
Looks trivial to fork this and turn the regex.txt into a script. I'm up for taking that once we have free cycles at work (couple days max). https://github.com/tmslnz/HAProxy_Markdown On Wed, Jun 15, 2011 at 1:12 PM, Willy Tarreau w...@1wt.eu wrote: On Wed, Jun 15, 2011 at 06:43:14PM +0530,

Re: nice wiki doc of haproxy

2011-06-15 Thread James Bardin
Just throwing my $.02; how about converting the documentation to something more easily parse-able, like markdown? -- -jim

Re: nice wiki doc of haproxy

2011-06-15 Thread Willy Tarreau
Hi Cyril, On Wed, Jun 15, 2011 at 10:21:21PM +0200, Cyril Bonté wrote: What we need is an automatic converter for various formats. Some very nice conversions were posted something like one year ago, which were almost automatic but unfortunately nobody had time to takeover the project and

Re: nice wiki doc of haproxy

2011-06-15 Thread Willy Tarreau
On Wed, Jun 15, 2011 at 04:37:16PM -0400, James Bardin wrote: Just throwing my $.02; how about converting the documentation to something more easily parse-able, like markdown? You mean the mainline doc ? If so, it's been discussed to great length in the past, and the short answer is no. The

RE: Separated config file support

2011-06-15 Thread Mike Hoffs
Maybe it is possible to add an include conf.d in the main config, and after that part all other config files will be automaticly included. Something like apache can do ? Met een vriendelijke groet, Mike Hoffs Mijn-Sleutel Peperstraat 33 6678 AL Oosterhout Tel: +31 (0)24 8200208

Re: Separated config file support

2011-06-15 Thread Willy Tarreau
On Wed, Jun 15, 2011 at 11:21:57PM +0200, Mike Hoffs wrote: Maybe it is possible to add an include conf.d in the main config, and after that part all other config files will be automaticly included. Something like apache can do ? As I explained in another thread, includes are really nasty

Re: HAProxy for PostgreSQL Failover

2011-06-15 Thread Rauf Kuliyev
Hello Alan, You can use the built-in health check for PostgreSQL servers (since 1.5-dev4). Regards, Rauf On Wed, Jun 15, 2011 at 10:54 AM, Alan Gutierrez a...@prettyrobots.com wrote: I'd like to use HAProxy to implement a simple proxy that can perform failover for a pair of PostgreSQL

Re: Separated config file support

2011-06-15 Thread Willy Tarreau
On Wed, Jun 15, 2011 at 11:21:57PM +0200, Mike Hoffs wrote: Maybe it is possible to add an include conf.d in the main config, and after that part all other config files will be automaticly included. Something like apache can do ? Not convinced at all because I don't see how it solves all

Re: nice wiki doc of haproxy

2011-06-15 Thread Patrick Mézard
Le 15/06/11 23:09, Willy Tarreau a écrit : On Wed, Jun 15, 2011 at 04:37:16PM -0400, James Bardin wrote: Just throwing my $.02; how about converting the documentation to something more easily parse-able, like markdown? You mean the mainline doc ? If so, it's been discussed to great length in

Re: [PATCH] [MINOR] Allow shutdown of sessions when a server becomes unavailable

2011-06-15 Thread Simon Horman
On Wed, Jun 15, 2011 at 10:03:17PM +0200, Willy Tarreau wrote: On Wed, Jun 15, 2011 at 05:01:32PM +0900, Simon Horman wrote: On Wed, Jun 08, 2011 at 10:55:44AM +0200, Willy Tarreau wrote: [snip] Not necessarily : currently, if you only close on the server side, the effect will be

[RFC v2 0/4] Allow shutdown of sessions when a server becomes unavailable

2011-06-15 Thread Simon Horman
Hi, I believed this addresses all of the issues raised with the previous version of this change. I have also verified that connections are shutdown a backend is placed in maintenance mode.

[PATCH 1/4] [CLEANUP] peers.h: fix declarations

2011-06-15 Thread Simon Horman
* The declaration of peer_session_create() does not match its definition. As it is only used inside of peers.c make it static. * Make the declaration of peers_register_table() match its definition. * Also, make all functions in peers.c that are not also in peers.h static ---

[PATCH 4/4] [MINOR] Allow shutdown of sessions when a server becomes unavailable

2011-06-15 Thread Simon Horman
--- v2 * Iterate per-server session list instead of global session list in shutdown_sessions() * Set nice level of tasks of sessions to be closed to 1024 * Use TASK_WOKEN_OTHER instead of TASK_WOKEN_RES in shutdown_sessions() As suggested by Willy Tarreau * Use list_for_each_entry_safe()

[PATCH 2/4] [CLEANUP] session.c: Make functions static where possible

2011-06-15 Thread Simon Horman
--- include/proto/session.h |3 +- src/session.c | 68 +++--- 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/include/proto/session.h b/include/proto/session.h index 15f3fe7..c9195f6 100644 --- a/include/proto/session.h +++

[PATCH 3/4] [MINOR] Add active connection list to server

2011-06-15 Thread Simon Horman
--- include/proto/session.h | 15 +++ include/types/server.h |1 + include/types/session.h |1 + src/cfgparse.c |1 + src/peers.c |2 +- src/proto_http.c|2 +- src/queue.c |3 ++- src/session.c |6 +++---

Re: [RFC v2 0/4] Allow shutdown of sessions when a server becomes unavailable

2011-06-15 Thread Willy Tarreau
Hi Simon, On Thu, Jun 16, 2011 at 09:10:37AM +0900, Simon Horman wrote: Hi, I believed this addresses all of the issues raised with the previous version of this change. I have also verified that connections are shutdown a backend is placed in maintenance mode. That's really cool, thank

Re: [RFC v2 0/4] Allow shutdown of sessions when a server becomes unavailable

2011-06-15 Thread Simon Horman
On Thu, Jun 16, 2011 at 07:24:00AM +0200, Willy Tarreau wrote: Hi Simon, On Thu, Jun 16, 2011 at 09:10:37AM +0900, Simon Horman wrote: Hi, I believed this addresses all of the issues raised with the previous version of this change. I have also verified that connections are shutdown

Re: [RFC v2 0/4] Allow shutdown of sessions when a server becomes unavailable

2011-06-15 Thread Willy Tarreau
On Thu, Jun 16, 2011 at 02:41:03PM +0900, Simon Horman wrote: One question though : what flags are emitted in the logs when a session is closed that way ? I'm wondering if we should not add a new flag such as D (for down) and/or K (for killed) on the first character to indicate why the