
On Sat, Jan 29, 2005 at 07:33:47PM +0200, Tommi Virtanen wrote:
Andrea Arcangeli wrote:
3) the load balancer misses an API with the real webserver to pass up the client IP address, that's annoying, especially the logs gets screwed
We need that for reverse proxying, too.
My current idea is to replace the /vhost/http/hostname[:port]/path style with /vhost;host=hostname[;port=port][;scheme=https][;client=1.2.3.4]/path to allow passing arbitrary variables. That way it's easy to extend in the future.
Isn't that going to waste more resources and isn't it much more complex than the approach I've taken to simply pass a variable to appserver.NevowSite(proxyPeer = 1). Perhaps proxyPeer isn't the right name for the variable but you get the idea. Now my patch is too dirty to even think at applying it, but it still shows the place to touch and I didn't need to play with vhost complexity, I keep the trigger as a parameter to NevowSite (the literal parameter isn't implemented yet, and that's why it clearly cannot be applied). In theory banana could pass down the whole object returned by getPeer() from the load balancer to the http server, but I was scared to hurt performance by using banana, and I'm only dealing with .host and .port which I'm sure will go fast.