Thread: proxying connections
Hi, I am trying to develop a proxy for postgresql that will distribute the load between multiple postgresql database servers and have so far failed to even get a connection. What I am trying to do is to create a TCP socket server and a client and forward all requests coming into the server through the client and vice versa. So far, it has not worked at all. Can anybody shed any light on this or a better way of doing this. Thanks and best wishes, Mork _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com
Kundham Saare wrote: > Hi, > > I am trying to develop a proxy for postgresql that > will distribute the load between multiple postgresql > database servers and have so far failed to even get a > connection. > > What I am trying to do is to create a TCP socket > server and a client and forward all requests coming > into the server through the client and vice versa. > > So far, it has not worked at all. > > Can anybody shed any light on this or a better way of > doing this. Did you take a look at sqlrelay or pgpool ? Regards Gaetano Mendola
> I am trying to develop a proxy for postgresql that > will distribute the load between multiple postgresql > database servers and have so far failed to even get a > connection. > What I am trying to do is to create a TCP socket > server and a client and forward all requests coming > into the server through the client and vice versa. In the past I wrote a similar thing in C to forward TCP requests. I think you have to use either fork() or threads in order to keep on listening on connection while you serve others. I used fork() at the time but I would use threads nowadays. Anyway, after I saw the rising of all these replication mechanism I wonder if such utility would be still necessary. Ciao, Federico