-
Notifications
You must be signed in to change notification settings - Fork 849
Description
#7069 fixes loop detection in ATS 9. However, there are some circumstances where loop detection detection is not desirable and would like an overridable configuration parameter to disable the loop detection.
In our use case we want a peering edge cache group. Say we have an edge cache group of cache1, cache2, and cache3. Upstream, there is a mid-tier cache group in front of the origins, mid-tier1, and mid-tier2. We want to send a client to an edge in the edge cache group where the parent's are an edge's peers and itself so as to cache a large video across the edge cache group and reduce lookups to the mid-tier using two remaps and two parent.config entries.
remap.config on cache1:
map http://cache1.foo.com http://cdn-back-remap.foo.com
map http://cdn-back-remap.foo.com http://cdn-origin.foo.com
remap.config on cache2:
map http://cache2.foo.com http://cdn-back-remap.foo.com
map http://cdn-back-remap.foo.com http://cdn-origin.foo.com
remap.config on cache3:
map http://cache3.foo.com http://cdn-back-remap.foo.com
map http://cdn-back-remap.foo.com http://cdn-origin.foo.com
parent.config on cache1, cache2, cache3
dest_domain=cdn-origin.foo.com parent="mid-tier1:80|1.0;mid-tier2:80|1.0" round_robin=consistent_hash go_direct=false
dest_domain=cdn-back-remap.foo.com parent="cache1:80|1.0;cache2:80|1.0;cache3:80|1.0" round_robin=consistent_hash go_direct=false ignore_self_detect=true
With the above parent.configs, each edge, cache1, cache2, and cache3 will mark themselves down for SELF DETECTION but we say ignore the SELF DETECTION because ignore_self_detect for the parent.config entry is true.
A request comes into cache1 on the first remap and is remapped to cdn-back-remap.foo.com. it misses and hashes to one of the parents in the local edge cache group, possibly to itself. when the request is forwarded to the back-remap, it gets remapped to the origin and if it misses, goes upstream to the mid-tiers and possibly the origin and gets cached locally on the edge. In the end, a large asset is spread across the 3 edge caches drastically reducing the necessity to go to the higher tier or origin and makes better use of the cache in the edge group. With the two remaps it does not cause any looping issues as long as you're careful. In 8.1 a host will get marked down by parent selection if it detects itself in the parent list so, that's the reasoning for the ignore_self_detect flag. Normally the self detection in parent selection prevents looping.
This scenario also required setting proxy.config.http.insert_request_via_str INT 0 to prevent loop detection in HttpTransact.