On Wed, Jan 4, 2012 at 3:42 PM, Rüdiger Plüm <[email protected]> wrote: > > > Eric Covener wrote: >>> The different handling of conn->port and conn->hostname doesn't look >>> right to me. Can the r->proxyreq check actually be false at this point or is >>> it simply redundant? And shouldn't the strcasecmp(conn->hostname, >>> uri->hostname) check be done regardless of r->connection->keepalives? >> >> I did not understand the r->keepalives "optimization", maybe comparing >> hostnames could just come last. >> > > I don't think that this "optimization" is valid, because this can IMHO lead to > a situation where a non keepalive frontend connection reuses the wrong backend > connection. Keepalives between frontend and backend connections are decoupled. > > So it should be simply removed.
Just to close the loop on this aspect -- AFAICT the reason we have this is a vestige of 2.0.x where the backend proxy_conn_rec was cached in the frotnend per-connection config. There you could easily hit /app1 and /app2 over keepalive and this check would kick in. But this is n/a in 2.2 and later (the strcmp is not needed at all as opposed to being needed on initial req). > > > Regards > > Rüdiger -- Eric Covener [email protected]
