Re: Servers logged as UP when they haven't been down?

2010-08-17 Thread Alexander Staubo
On Tue, Aug 17, 2010 at 7:34 AM, Willy Tarreau w...@1wt.eu wrote: If you log to local deamon, you should not lose anything in UDP. Yes, I am logging to a local daemon. However, if the syslog daemon starts after haproxy or can't keep up with log rate, it can lose logs but then the unix socket

Re: Servers logged as UP when they haven't been down?

2010-08-17 Thread Alexander Staubo
On Tue, Aug 17, 2010 at 11:33 AM, Willy Tarreau w...@1wt.eu wrote: On Tue, Aug 17, 2010 at 11:30:46AM +0200, Alexander Staubo wrote: No, but a local file definitely would. :-) Indeed, but a local file is not compatible with chroot and above all, it would not permit to be completely

Re: Servers logged as UP when they haven't been down?

2010-08-17 Thread Willy Tarreau
On Tue, Aug 17, 2010 at 12:00:01PM +0200, Alexander Staubo wrote: Indeed, but a local file is not compatible with chroot and above all, it would not permit to be completely asynchronous, meaning that the traffic would stall when performing writes. The real advantage of the local syslog is

HAProxy analyzes contents in tcp mode

2010-08-17 Thread wilfred wang
Hi, In our system, front end send request to back end with tcp protocol. So we configure HAProxy working in tcp mode. Can we configure or develop in HAProxy and let HAProxy check contents in request and dispatch request to specific server based on arbitrary rule ? Regards

RE: 'haproxy' in AIX OS for C++ Applications

2010-08-17 Thread Turlapati, Sreenivasa
Hi, We compiled the HAProxy on Solaris and did the basic configuration in haproxy.cfg file where it receives the request from our Front End application and distribute to different back-end servers. We configured the HAProxy as TCP mode. Now as per our requirement, we need to read the incoming

RE: 'haproxy' in AIX OS for C++ Applications

2010-08-17 Thread Turlapati, Sreenivasa
Hi, Thxs a lot. Could you kindly let us know how can we read and understand the incoming request. I read we need to carry out the below changes to capture the HAProxy log. edit the value of SYSLOGD in /etc/default/syslogd SYSLOGD=-r Then set up syslog facility local0 and direct it to file

Re: 'haproxy' in AIX OS for C++ Applications

2010-08-17 Thread Willy Tarreau
On Tue, Aug 17, 2010 at 10:27:04AM -0400, Turlapati, Sreenivasa wrote: Hi, Thxs a lot. Could you kindly let us know how can we read and understand the incoming request. Just do as you would with other rules, however if you want to match some contents data (eg: protocol or HTTP request), you

Re: HATop - Interactive ncurses client for HAProxy

2010-08-17 Thread Jeremy Hinegardner
On Tue, Aug 17, 2010 at 02:29:45PM +0200, John Feuerstein wrote: On 08/17/2010 01:49 AM, Jakov Sosic wrote: If you're interested I can build RPM for RHEL v4.x and v5.x (x86_64 i386) and publish it in my company's repo, and also you could put it to your website too... I would like to get

Re: 'haproxy' in AIX OS for C++ Applications

2010-08-17 Thread Willy Tarreau
On Tue, Aug 17, 2010 at 02:52:29PM -0400, Turlapati, Sreenivasa wrote: Hi, As part of the request, the Front end sends the user name and some sort if sql script name to the back end needs that needs to execute. Here is the snapshot of our requirement If(sql script name = 'a..sql')

RE: 'haproxy' in AIX OS for C++ Applications

2010-08-17 Thread Turlapati, Sreenivasa
Hi, We are not trying to use sql proxy, indeed we are using the TCP proxy. Just we need to read the incoming request and based on the sql file name we need to route the request to a backend server. We doesn't need to bother what the sql file got and how to execute it, we need to care which group

Re: 'haproxy' in AIX OS for C++ Applications

2010-08-17 Thread Hank A. Paulson
You are going need something like mysql proxy for that. haproxy can only look at the attributes of a connection (port, is there data available from the client (aka did the client speak first), etc. And in the case of httpd the headers but it can't look at the full contents of the whole data

Re: 'haproxy' in AIX OS for C++ Applications

2010-08-17 Thread Willy Tarreau
On Tue, Aug 17, 2010 at 03:50:19PM -0400, Turlapati, Sreenivasa wrote: Hi, We are not trying to use sql proxy, indeed we are using the TCP proxy. Just we need to read the incoming request and based on the sql file name we need to route the request to a backend server. We doesn't need to

RE: 'haproxy' in AIX OS for C++ Applications

2010-08-17 Thread Turlapati, Sreenivasa
Thxs a lot. Sorry, if I am misguiding you. I am just curious to know, when HAProxy is set at TCP mode, we want to scan or glance over the incoming request for a particular string say 'XYZ'. If the incoming request contains the 'XYZ' string, route the request to a backend xyz group else route

Re: Can't get server check to work with virtual hosts

2010-08-17 Thread Graeme Donaldson
Hi Roy You simply need to send an HTTP 1.1 request with a Host: header in the http check, like this: option httpchk GET /index.html\r\nHost: vhost.example.com Graeme. On 17 August 2010 23:19, Roy Smith r...@panix.com wrote: I'm running HA-Proxy version 1.3.22 on Ubuntu Linux. I've got

Re: Can't get server check to work with virtual hosts

2010-08-17 Thread Roy Smith
Ah, OK, that's getting me closer. Thanks! Now I've got option httpchk GET /index.html HTTP/1.1\r\nHost:test1.cluster6.corp.amiestreet.com server webA test1.cluster6.corp.amiestreet.com:80 cookie A check inter 2s server webB test2.cluster6.corp.amiestreet.com:80 cookie B check

Re: 'haproxy' in AIX OS for C++ Applications

2010-08-17 Thread Hank A. Paulson
On 8/17/10 2:16 PM, Turlapati, Sreenivasa wrote: Thxs a lot. Sorry, if I am misguiding you. I am just curious to know, when HAProxy is set at TCP mode, we want to scan or glance over the incoming request for a particular string say 'XYZ'. If the incoming request contains the 'XYZ' string,

Re: 'haproxy' in AIX OS for C++ Applications

2010-08-17 Thread David Birdsong
If you want haproxy to load balance across your databases and do so by some value in the traffic, you'll need to expose your database via a protocol that haproxy supports. Write an RPC service that speaks HTTP and have haproxy load balance across your RPC servers using HTTP values. This is

Re: Can't get server check to work with virtual hosts

2010-08-17 Thread Carlo Flores
How about passing healthcheck.cluster6.corp.amiestreet.com for the option httpchk, and also have the Apache VirtualHosts recognize healthcheck as a ServerAlias? The idea here is your healthcheck will be standardized to each host in the cluster, which you'll also want when you split these hosts,

RE: 'haproxy' in AIX OS for C++ Applications

2010-08-17 Thread Turlapati, Sreenivasa
Thxs a lot for the solution. Unfortunately our client(Front End)is a legacy system and it was developed around 20 years back and the current design of the client can't send A B actions to one backend server/HAProxy port and B D to another backend server/proxy. Unfortunately the client is not

Re: 'haproxy' in AIX OS for C++ Applications

2010-08-17 Thread Willy Tarreau
On Tue, Aug 17, 2010 at 11:36:23PM -0400, Turlapati, Sreenivasa wrote: Thxs a lot for the solution. Unfortunately our client(Front End)is a legacy system and it was developed around 20 years back and the current design of the client can't send A B actions to one backend server/HAProxy