www-modproxy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: modproxy load balancer
Date Tue, 17 Jun 2003 15:58:15 GMT
Bill Stoddard wrote:

> Ping to all list citizens (listizens?) ...
> Who would be interested in seeing some load balancing function being put 
> into mod_proxy?

Very interested: There is a placeholder in the existing code for this, 
along the lines of "order the list of IPs I should try and connect to here".

A better approach would be to turn this into a hook - then we can have 
proxy_balancer in addition to proxy_http, proxy_ftp, etc.

During Apachecon 2002, there were some discussions on bringing in 
mod_backhand in to do this - backhand could handle the load balancing, 
and proxy would handle the protocol.

> - selectable load balancing algorithm: Round robin, LRU,  response time, 
> url driven, session affinity, ?

Each load balancer in its own module.

> - automatic detection of backend server failure and removal of the 
> failed server from the load balancing routing tables (forever? for a 
> period of time? other?)

And the concept of URL retry - example: if the first server returns a 
4xx or a 5xx, then try the next one transparently.

> - connection pooling using HTTP keep-alive (this is a no brainer since 
> it is a simple extension of what browsers already do, but it needs to be 
> designed in from the start)

Connection pooling was given a lot of thought, and I don't think that 
the performance advantage is worth the effort.

In a reverse proxy situation, the network between the proxy and the 
backend is likely to be fast enough that pooling gives virtually no 

In a forward proxy situation, the large spread of URLs being accessed 
means that the vast majority of pooled connections will simply hang 
around unused, eating up server resources.

> - must be effective with multiple child processes, each child must make 
> routing decisions globally based on stats maintained in a shared memory 
> segment
> To do this properly, I would think we need some new config directives. 
> Perhaps a new container directive to define a group of backend servers,  
> another container directive to define URLs served by a particular group 
> of backend servers. Need some way to bind a url group to a server group.

We should just define some sane namespaces for directives, and then do 
them on a per-module basis.

minfrin@sharp.fm		"There's a moon
					over Bourbon Street

View raw message