Is there any way to configure Squid to choose a peer cache based on the latency in communication to the http port on the destination webserver?
For example, let's say we have two Squid caches - server 'A' in the USA and server 'B' in China. We know accessing any websites outside China means that it adds about 200-250ms round trip time to the packet due to cables crossing the Pacific. I would like Squid on server 'A' to probe that and only forward the request on to server 'B' if the latency is above a certain threshold. Otherwise, it accesses the webserver directly.
If this behaviour must be programmed into Squid, do you have any suggestions on where to plug it in to the architecture?