Bug 1843: multicast-siblings cache_peer option for optimising multicast ICP relations
'multicast-siblings' : this option is meant to be used only for cache peers of
type "multicast". It instructs Squid that ALL members of this multicast group
have "sibling" relationship with it, not "parent". This is an optimization
that avoids useless multicast queries to a multicast group when the requested
object would be fetched only from a "parent" cache, anyway. It's useful, e.g.,
when configuring a pool of redundant Squid proxies, being members of the same
multicast group.
<tag>cache_mem</tag>
<p>Default size increased to 256MB.
- <tag>cache_peer htcp-no-clr htcp-no-purge-clr htcp-only-clr htcp-forward-clr connection-auth[=on|off|auto] connect-fail-limit=N no-tproxy</tag>
+ <tag>cache_peer htcp-no-clr htcp-no-purge-clr htcp-only-clr htcp-forward-clr connection-auth[=on|off|auto] connect-fail-limit=N multicast-siblings no-tproxy</tag>
<p>New Options.
<verb>
use 'htcp-no-clr' to send HTCP to the neighbor but without
use 'no-tproxy' to specify that requests passed to this peer
are not to have the client IP spoofed. For use to prevent
packet routing issues with a cluster of peers behind WCCPv2.
+
+ <p><em>multicast-siblings</em> ported from 2.7
</verb>
<tag>cache_store_log</tag>
<p>COSS <em>maxfullbufs=</em> option not yet ported from 2.6
<tag>cache_peer</tag>
- <p><em>multicast-siblings</em> not yet ported from 2.7
<p><em>idle=</em> not yet ported from 2.7
<p><em>http11</em> not yet ported from 2.7
<p><em>monitorinterval=</em> not yet ported from 2.6
<p>COSS <em>maxfullbufs=</em> option not yet ported from 2.6
<tag>cache_peer</tag>
- <p><em>multicast-siblings</em> not yet ported from 2.7
<p><em>idle=</em> not yet ported from 2.7
<p><em>http11</em> not yet ported from 2.7
<p><em>monitorinterval=</em> not yet ported from 2.6
p->options.no_tproxy = 1;
} else if (!strcasecmp(token, "multicast-responder")) {
p->options.mcast_responder = 1;
+#if PEER_MULTICAST_SIBLINGS
+ } else if (!strncasecmp(token, "multicast-siblings")) {
+ p->options.mcast_siblings = 1;
+#endif
} else if (!strncasecmp(token, "weight=", 7)) {
p->weight = xatoi(token + 7);
} else if (!strncasecmp(token, "basetime=", 9)) {
userhash Load-balance parents based on the client proxy_auth or ident username.
sourcehash Load-balance parents based on the client source IP.
+
+ multicast-siblings
+ To be used only for cache peers of type "multicast".
+ ALL members of this multicast group have "sibling"
+ relationship with it, not "parent". This is to a mulicast
+ group when the requested object would be fetched only from
+ a "parent" cache, anyway. It's useful, e.g., when
+ configuring a pool of redundant Squid proxies, being
+ members of the same multicast group.
==== PEER SELECTION OPTIONS ====
if (d->type != PEER_NONE)
return d->type;
}
+#if PEER_MULTICAST_SIBLINGS
+ if (p->type == PEER_MULTICAST)
+ if (p->options.mcast_siblings)
+ return PEER_SIBLING;
+#endif
return p->type;
}
assert(request != NULL);
if (neighborType(p, request) == PEER_SIBLING) {
+#if PEER_MULTICAST_SIBLINGS
+ if (p->type == PEER_MULTICAST && p->options.mcast_siblings &&
+ (request->flags.nocache || request->flags.refresh || request->flags.loopdetect || request->flags.need_validation))
+ debugs(15, 2, "peerAllowedToUse(" << p->name << ", " << request->host << ") : multicast-siblings optimization match");
+#endif
if (request->flags.nocache)
return 0;
if (p->options.mcast_responder)
storeAppendPrintf(sentry, " multicast-responder");
+#if PEER_MULTICAST_SIBLINGS
+ if (p->options.mcast_siblings)
+ storeAppendPrintf(sentry, " multicast-siblings");
+#endif
+
if (p->weight != 1)
storeAppendPrintf(sentry, " weight=%d", p->weight);
/* for ICP_END */
#include "icp_opcode.h"
+#define PEER_MULTICAST_SIBLINGS 1
+
struct acl_name_list {
char name[ACL_NAME_SZ];
acl_name_list *next;
unsigned int sourcehash:1;
unsigned int originserver:1;
unsigned int no_tproxy:1;
+#if PEER_MULTICAST_SIBLINGS
+ unsigned int mcast_siblings:1;
+#endif
} options;
int weight;