Re: [SQU] tcp session sharing

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 02 Feb 2001 07:27:25 +0100

Schuster, Dan wrote:

> Can two separate web sessions going to the same IP address share the same
> TCP session?

Yes, as per RFC2616.

> We are having a problem when two different clients go through squid
> (2.3.STABLE4-hno.20000819) to access a web site that is load-balanced
> through an F5 BIG-IP box to two web servers. The BIG-IP is using cookies to
> get the user back to the same web server each time, so once a user has
> established a session with a web server they will be routed back to the same
> web server each time.
>
> Here's the problem: User1 logs on to web server A and waits. Now User2
> logs on to web server B. The next time that User1 accesses a web page the
> request is sent on User2 TCP session to web server B.

TCP sessions are NOT tied to users in HTTP. They are per hop
communication channels, and specifications encourages proxies to reuse
idle channels.

There is a number of TCP sessions between your browser and the proxy,
and a different set of TCP sessions between the proxy and the next hop
in the request chain. If the proxy has idle TCP sessions when a request
comes in, the idle session will be used.

> Is squid doing this on purpose? I could see that there might be a
> performance gain by sending data to the same web server over one TCP
> session. But in this case, the one ip address of the web server is actually
> two web servers, and we need the users to be routed back to the same web
> server. Is it possible to stop this?

It is on purpose.

The only way to stop it is do disable the use of persistent server
connections. This way Squid will open a new TCP connection for each and
every request.

--
Henrik Nordstrom
Squid hacker
--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Fri Feb 02 2001 - 00:45:03 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:57:51 MST