First time here? Check out the FAQ!

Ask Your Question
0

can a proxy use a single tcp connection to a remote website for many different client connections (serialize several client requests into one outgoing request)?

asked Dec 12 '0

kaos gravatar image

updated Dec 12 '0

my understanding was that proxies create a new TCP connection to a remote website for every client connection. Recently I got a tcpdump (sorry, cannot share it here) with a single TCP connection between the proxy and a remote website and several GET requests from two different users (both User-Agents and cookies are different). Can this behaviour confuse the web server? Does a server require X-Forwarded-For or similar header to disqungish such requests?

here is a "follow tcp stream" output excerpt:

GET /a HTTP/1.1
Cookie: JSESSIONID=123
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: example.com
Via: proxy1
Cache-Control: max-age=0, max-stale=0
Connection: keep-alive

HTTP/1.1 304 Not Modified
Date: Tue, 10 Dec 2018 01:01:01 GMT
Content-Type: text/plain;charset=utf-8
Cache-Control: no-cache
Pragma: no-cache


GET /b HTTP/1.1
Cookie: JSESSIONID=456
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/533.11 (KHTML, like Gecko) Chrome/81.0.2.3 Safari/533.11
Host: example.com
Via: proxy1
Cache-Control: max-age=20000, max-stale=0
Connection: keep-alive

HTTP/1.1 304 Not Modified
Date: Tue, 10 Dec 2018 01:01:01 GMT
Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered Dec 12 '0

SYN-bit gravatar image

Yes, Web-proxies can be configured to optimize by multiplexing client requests over existing serverside requests. On the webserver-side you need to take this into account. You should handle each request on it's own and not each TCP connection. So if there is a stateful session, use session cookies to distinguish requests from different users.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: Dec 12 '0

Seen: 2,167 times

Last updated: Dec 12 '20