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 2020-12-12 01:20:42 +0000

kaos gravatar image

updated 2020-12-12 01:39:33 +0000

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
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-12-12 11:57:57 +0000

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.

edit flag offensive delete link more

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: 2020-12-12 01:20:42 +0000

Seen: 2,067 times

Last updated: Dec 12 '20