On 3/04/2013 9:45 a.m., Ed W wrote:
On 02/04/2013 21:14, Andrew Beverley wrote:
(I will always have another proxy as my upstream). If so then actually
I need to reset the mark for each request?
I *think* you could just set the mark on the upstream connection for
each request.
I think this is the correct answer (so that it handles persistent
connections).
If I was understanding your requirements you involved switching upstream
link depending on the MARK.
Switching the link used by packets of a TCP connection mid-stream will
encounter problems. Squid only selects persistent connection to re-use
via a src:dest IPs and domain name combo. So you will need to set the
tcp_outgoing_addr per-MARK to ensure TCP connections contain only
requests to the same uplink.
I confess to not yet having continued to explore the code, but I guess
I need recommendations on a good place to insert this - basically I
need the point where a new request hits the network in the direction
of the upstream
A leg up would be welcome, I will continue to explore the code in the
meantime.
Upstream HTTP traffic is handled in src/http.cc the outbound request
hits the upstream link in the Comm::Write at the end of
HttpStateData::sendRequest().
NP: this is long after the connection selection, which will just need a
new ACL for testing the client MARK or something equivalent.
Opening of new connections and setup of all flags which need to be done
before TCP SYN is done in src/comm/ConnOpener.*.
Amos