by the origin server. Doing so could cause bandwidth spikes and/or
negative hit ratio.
- httpd_accel_single_host squid.conf directive
+ - "round-robin" cache_peer counters are reset every 5 minutes to
+ compensate previously dead peers
Changes to Squid-2.4.DEVEL2 ():
/*
- * $Id: cache_cf.cc,v 1.339 2000/05/02 18:51:50 hno Exp $
+ * $Id: cache_cf.cc,v 1.340 2000/05/02 20:31:44 hno Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
head = &(*head)->next;
*head = p;
Config.npeers++;
+ peerClearRR(p);
}
static void
/*
- * $Id: neighbors.cc,v 1.281 2000/05/02 18:47:34 hno Exp $
+ * $Id: neighbors.cc,v 1.282 2000/05/02 20:31:44 hno Exp $
*
* DEBUG: section 15 Neighbor Routines
* AUTHOR: Harvest Derived
return q;
}
+/* This gets called every 5 minutes to clear the round-robin counter. */
+void
+peerClearRR(void *data)
+{
+ peer *p = data;
+ p->rr_count -= p->rr_lastcount;
+ if (p->rr_count < 0)
+ p->rr_count = 0;
+ p->rr_lastcount = p->rr_count;
+ eventAdd("peerClearRR",peerClearRR, p, 5*60, 0);
+}
+
peer *
getDefaultParent(request_t * request)
{
/*
- * $Id: protos.h,v 1.360 2000/05/02 20:15:49 hno Exp $
+ * $Id: protos.h,v 1.361 2000/05/02 20:31:45 hno Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
extern peer *peerFindByNameAndPort(const char *, unsigned short);
extern peer *getDefaultParent(request_t * request);
extern peer *getRoundRobinParent(request_t * request);
+EVH peerClearRR;
extern peer *getAnyParent(request_t * request);
extern lookup_t peerDigestLookup(peer * p, request_t * request, StoreEntry * entry);
extern peer *neighborsDigestSelect(request_t * request, StoreEntry * entry);
/*
- * $Id: structs.h,v 1.322 2000/05/02 20:28:30 hno Exp $
+ * $Id: structs.h,v 1.323 2000/05/02 20:31:45 hno Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
struct in_addr addresses[10];
int n_addresses;
int rr_count;
+ int rr_lastcount;
peer *next;
int test_fd;
#if USE_CARP