Minor additions inside.

On 06.08.2010 14:49, "Plüm, Rüdiger, VF-Group" wrote:


-----Original Message-----
From: Paul Fee
Sent: Freitag, 6. August 2010 14:44
To: [email protected]
Subject: Re: Talking about proxy workers


Also, is it possible to setup these three reuse styles for a
forward proxy?

1: No reuse, close the connection after this request.

Yes, this the default.

2: Reuse connection, but only for the client that caused its creation.

No.

Even if you configure pooled connections like in the example given in 3, the connections are returned to the pool after each request/response cycle. They are not directly associated with the client connection.

But: if the MPM is prefork, the client connection is handled by a single process which doesn't handle any other requests during the life of the client connection. Since pools are process local, in this case the pool will always return the same connection (the only connection in the pool). Note that this pooled connection will not be closed when the client connection is closed. It can live longer or shorter than the client connection and you can't tie their lifetime together.

Whether the proxy operates in forward or reverse mode doesn't matter, it only matters how the pool aka worker is configured. See 3.

3: Pool connection for reuse by any client.

Yes, but this is needed separately for every origin server you forward to:

<Proxy http://www.frequentlyused.com/>
    # Set an arbitrary parameter to trigger the creation of a worker
    ProxySet keepalive=on
</Proxy>

Pools are associated with workers, and workers are identified by origin URL. In case of a reverse proxy you often only have a few origin servers, so pooling works fine. In case of a forward proxy you often have an enormous amount of origin servers, each only visited every now and then. So using persistent connections is less effective. It would only make some sense, if we could optionally tie together client connections and origin server connections.

Regards,

Rainer

Reply via email to