cache::alternate_domains is used at the varnish layer to move a hostname from the (default) text cluster to misc. It's also used to set a specific caching policy that it can be one of ["normal", "pass", "pipe", "websockets"].
In the current ATS puppetization, the function profile::trafficserver_caching_rules is used to generate /etc/trafficserver/cache.config according to cache::alternate_domains content + profile::trafficserver::mapping_rules content.
If a cache::alternate_domain caching policy is set to pass it gets translated to action=never-cache in /etc/trafficserver/cache.config but if the caching policy is set to websockets, ATS considers the hostname as cacheable and varnish does the opposite:
sub wm_recv_pass {
<%
def uc_action(uc)
if uc == "pass"
return "return (pass);"
elsif uc == "pipe"
return "return (pipe);"
elsif uc == "websockets"
return %Q[if (req.http.upgrade ~ "(?i)websocket") { return (pipe); } else { return (pass); }]
elsif uc == "normal"
return ""
else
raise Error, "Invalid caching action #{uc}"
end
endSomething similar happens with pipe, in pipe mode varnish behaves as a TCP proxy so it doesn't perform any kind of caching and ATS should honor that as well.