[squid-users] re-forwarding questions

Antonio SJ Musumeci trapexit at spawn.link
Wed Oct 9 17:34:49 UTC 2019

I've a setup with N origin servers and N squid instances setup with the 
intent that each squid instance is logically associated with one of the 
origin servers and lists the other N-1 origin servers as other parents. 
Each origin has the same immutable data but spread across buildings. I 
only want them to reach out across buildings if the initial forward 
fails (or perhaps is overloaded). Initial tests seem to work but they 
always try the first origin server and when it fails (in this case with 
a 502 as the backend of a webservice is down) it tries the second. It 
doesn't appear that there is a negative cache on the failure. Is that 
configurable? Regardless, it doesn't cache the re-forward response (a 
200). Is that expected? Configurable? It caches the primary fine when 
functional. A snippet of my config is below. I've looked over the docs 
and source but I'm not finding anything. Also, is it possible from the 
logs to see the name or hostname:port of the cache_peer being forwarded to?

cache_peer HOSTNAME0 parent PORT 0 no-query originserver no-digest ignore-cc
cache_peer HOSTNAME1 parent PORT 0 no-query originserver no-digest ignore-cc
retry_on_error on
cache allow all
refresh_pattern . 1440 100% 10080 ignore-no-cache ignore-no-store 


More information about the squid-users mailing list