#
-# $Id: cf.data.pre,v 1.359 2004/10/10 02:49:04 hno Exp $
+# $Id: cf.data.pre,v 1.360 2004/10/18 12:20:09 hno Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
disable persistent connections with clients and/or servers.
DOC_END
+NAME: balance_on_multiple_ip
+TYPE: onoff
+LOC: Config.onoff.balance_on_multiple_ip
+DEFAULT: on
+DOC_START
+ Some load balancing servers based on round robin DNS have been
+ found not to preserve user session state across requests
+ to different IP addresses.
+
+ By default Squid rotates IP's per request. By disabling
+ this directive only connection failure triggers rotation.
+DOC_END
+
NAME: pipeline_prefetch
TYPE: onoff
LOC: Config.onoff.pipeline_prefetch
/*
- * $Id: client_side_reply.cc,v 1.73 2004/10/14 23:32:45 hno Exp $
+ * $Id: client_side_reply.cc,v 1.74 2004/10/18 12:20:09 hno Exp $
*
* DEBUG: section 88 Client-side Reply Routines
* AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
}
e = http->storeEntry();
- /* Release negatively cached IP-cache entries on reload */
+ /* Release IP-cache entries on reload */
+
+ if (r->flags.nocache) {
+
+#if USE_DNSSERVERS
- if (r->flags.nocache)
ipcacheInvalidate(r->host);
+#else
+
+ ipcacheInvalidateNegative(r->host);
+
+#endif /* USE_DNSSERVERS */
+
+ }
+
#if HTTP_VIOLATIONS
- else if (r->flags.nocache_hack)
+ else if (r->flags.nocache_hack) {
+
+#if USE_DNSSERVERS
+
ipcacheInvalidate(r->host);
-#endif
+#else
+
+ ipcacheInvalidateNegative(r->host);
+
+#endif /* USE_DNSSERVERS */
+
+ }
+
+#endif /* HTTP_VIOLATIONS */
#if USE_CACHE_DIGESTS
lookup_type = http->storeEntry() ? "HIT" : "MISS";
/*
- * $Id: comm.cc,v 1.395 2004/08/30 05:12:31 robertc Exp $
+ * $Id: comm.cc,v 1.396 2004/10/18 12:20:09 hno Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
assert(ia->cur < ia->count);
cs->in_addr = ia->in_addrs[ia->cur];
- ipcacheCycleAddr(cs->host, NULL);
+
+ if (Config.onoff.balance_on_multiple_ip)
+ ipcacheCycleAddr(cs->host, NULL);
+
cs->addrcount = ia->count;
+
cs->connstart = squid_curtime;
+
cs->connect();
}
/*
- * $Id: ipcache.cc,v 1.245 2004/10/15 21:12:47 hno Exp $
+ * $Id: ipcache.cc,v 1.246 2004/10/18 12:20:10 hno Exp $
*
* DEBUG: section 14 IP Cache
* AUTHOR: Harvest Derived
static void
ipcacheRelease(ipcache_entry * i)
{
+ debug(14, 3) ("ipcacheRelease: Releasing entry for '%s'\n", (const char *) i->hash.key);
hash_remove_link(ip_table, (hash_link *) i);
dlinkDelete(&i->lru, &lru_list);
ipcacheFreeEntry(i);
assert(answers);
- for (j = 0, k = 0; k < nr; k++) {
+ for (k = 0; k < nr; k++) {
if (answers[k].type != RFC1035_TYPE_A)
continue;
*/
}
+void
+ipcacheInvalidateNegative(const char *name)
+{
+ ipcache_entry *i;
+
+ if ((i = ipcache_get(name)) == NULL)
+ return;
+
+ if (i->flags.negcached)
+ i->expires = squid_curtime;
+
+ /*
+ * NOTE, don't call ipcacheRelease here becuase we might be here due
+ * to a thread started from a callback.
+ */
+}
+
ipcache_addrs *
ipcacheCheckNumeric(const char *name)
{
{
ia->bad_mask[k] = TRUE;
ia->badcount++;
+ i->expires = XMIN(squid_curtime + XMAX((time_t)60, Config.negativeDnsTtl), i->expires);
debug(14, 2) ("ipcacheMarkBadAddr: %s [%s]\n", name, inet_ntoa(addr));
}
/*
- * $Id: protos.h,v 1.495 2004/08/30 05:12:31 robertc Exp $
+ * $Id: protos.h,v 1.496 2004/10/18 12:20:10 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
SQUIDCEXTERN EVH ipcache_purgelru;
SQUIDCEXTERN const ipcache_addrs *ipcache_gethostbyname(const char *, int flags);
SQUIDCEXTERN void ipcacheInvalidate(const char *);
-SQUIDCEXTERN void ipcacheReleaseInvalid(const char *);
+SQUIDCEXTERN void ipcacheInvalidateNegative(const char *);
SQUIDCEXTERN void ipcache_init(void);
SQUIDCEXTERN void stat_ipcache_get(StoreEntry *);
-SQUIDCEXTERN int ipcacheQueueDrain(void);
SQUIDCEXTERN void ipcacheCycleAddr(const char *name, ipcache_addrs *);
SQUIDCEXTERN void ipcacheMarkBadAddr(const char *name, struct in_addr);
/*
- * $Id: structs.h,v 1.492 2004/10/14 23:31:30 hno Exp $
+ * $Id: structs.h,v 1.493 2004/10/18 12:20:10 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
#endif
int request_entities;
+ int balance_on_multiple_ip;
int check_hostnames;
int via;
int emailErrData;