/ Zope / Apsis / Pound Mailing List / Archive / 2007 / 2007-05 / Configuration for number of connections to a backend

[ << ] [ >> ]

[ [PATCH] Pound-1.10 bug: terminating null not ... ] [ ANNOUNCE: Pound - reverse proxy and load balancer ... ]

Configuration for number of connections to a backend
David Giffin <dgiffin(at)imsafer.com>
2007-05-18 00:47:34 [ FULL ]
Hi There,

I was wondering if there is a way to limit the number of concurrent  
connections to a backend server? I'm going to be setting up pound to  
serve up a pack of mongrels and would like to limit the number of  
connections to each mongrel.

Thanks,
David

Re: [Pound Mailing List] Configuration for number of connections to a backend
Robert Segall <roseg(at)apsis.ch>
2007-05-18 10:34:19 [ FULL ]
On Thu, 2007-05-17 at 18:47 -0400, David Giffin wrote:[...]

No, and it would be impractical to implement: a browser may open any
number of connections to a server for a single page, so a "request" is
difficult to define.[...]

Re: [Pound Mailing List] Configuration for number of connections to a backend
David Giffin <dgiffin(at)imsafer.com>
2007-05-18 23:17:02 [ FULL ]
Hi Robert,

Maybe I should have elaborated. I'm not dealing with browsers. We use  
pound to load balance xmlrpc requests over http. We send a curl based  
request to pound which gets forwarded to a backend server. Each  
request contains all of the necessary state information within the  
xmlrpc call. Therefore a request can make it's way to any backend  
server without any session tracking.

I've been looking through the pound source and it looks feasible to  
add an additional counter to the backend structure, which would get  
incremented and decremented upon starting and ending a request. An  
additional config parameter would define the number of concurrent  
connections to the backend server. If the number of current  
connections is larger than the config parameter a different backend  
would be selected. The code for checking concurent connections could  
be added to the rand_backend function similar to the priority. Looks  
like the best place to increment and decrement the connection counter  
would be in the thr_http function.

I know this feature would not be for everyone, but there maybe a  
select few folks that could benefit from this.

Does this sound reasonable?

Thanks,
David


On May 18, 2007, at 4:34 AM, Robert Segall wrote:
[...][...][...]

Re: [Pound Mailing List] Configuration for number of connections to a backend
Robert Segall <roseg(at)apsis.ch>
2007-05-21 18:50:09 [ FULL ]
On Fri, 2007-05-18 at 17:17 -0400, David Giffin wrote:[...]

I suggest you create a patch and we'll link to it on the Pound page. As
you say, this is limited to very few people and I don't see it as part
of the regular distribution.[...]

MailBoxer