httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: [PATCH] mod_proxy Keepalives
Date Mon, 02 Apr 2001 13:25:41 GMT
On Mon, 2 Apr 2001, Greg Stein wrote:

> On Mon, Apr 02, 2001 at 02:55:11AM -0400, Chuck Murcko wrote:
> > Graham Leggett wrote:
> > > Greg Stein wrote:
> >...
> > > > Further, using a conn_rec for an *outbound* connection is just wrong.
> > > > there is a tiny bit of similarity. But things like base_server,
> > > > vhost_lookup_data, remote_logname, double_reverse, local_ip, local_host,
> > > > ... none of those apply whatsoever to outbound connections.
> > >
> > > Using a conn_rec for an outbound connection has allowed us to use
> > > filters - which has cut down the proxy code by an enormous amount.
> > > Outbound connections are almost identical to inbound ones - once the
> > > status or request lines have been removed both outbound and inbound
> > > requests are virtually the same.
> >
> > Greg, are you suggesting we need to reimplement filters for outbound
> > connects (in general) to gain their benefits? That just sounds like too
> > big a bit of reusability to toss. I mean, it sure looks to me like
> > there's at least as much stuff in a conn_rec that an outbound connect
> > can use as there is that it can't. And what's not used is a matter of
> > bytes per connection, not a large amount of wastage.
> The filters should not be tied to request_rec or conn_rec. Unfortunately,
> they are.
> I'd be most interested in understanding how the proxy-outbound filters you
> are using (I forgot the list) are tied to the conn_rec. If we can discover
> how they are tied, then we can get them fixed.
> Filters are arranged as a simple chain. Somewhere, you record the head of
> that chain, and you organize how items are inserted into a current/active
> chain. I don't believe that conn_rec.output_filters is any benefit to you;
> the filter system itself: yes. I believe you can use the filters, and that
> you can use them without needing a conn_rec.
> Summary: for expediency, I can see how you may want to use a conn_rec. But
> please recognize and (I hope) make it a long-term goal to remove them. As a
> precondition, that means the (builtin) filters that you want to use need to
> fixed. I'd totally agree to those fixes on two reasons: make the filters
> more isolated/independent/less-coupled, and enable mod_proxy to stop using
> conn_rec for outbound connections.
> [ consider: any filter referencing a conn_rec or a request_rec becomes
>   tightly coupled with the Apache system. And ideal filter is just massaging
>   data that flows through it. ]

I seriously disagree with modifying filters.  Our filters are designed for
Apache, to de-couple them from Apache would remove a lot of what makes
them perfect for us.  There is a lot of information that is retrieved from
the conn and request rec's, and making all of that inaccessible to filters
is a bad idea IMHO.

Having said that, I was involved on the initial proxy development, where
we decided to use filters for both incoming and outbound connections.  To
be honest, the design is rather slick.  Yes, there are some fields that do
not apply to outbound connections.  The solution for that, isn't to remove
conn and request recs from filters, but rather to remove those fields from
the conn and request recs.  The fields can be moved into some non-central


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message