httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dietz, Phil E." <PEDi...@West.com>
Subject ETAGs and webfarm switches
Date Wed, 13 Dec 2000 22:09:35 GMT
I just noticed Microsoft IE 5.50 will not cache images to my site.

Upon further analysis, it is because:
	1) we use a Cisco "Local Director" layer 2 switch to round robin to
multiple web servers of our web farm by the same URL.
	2) Apache generates ETags based on inode.

Each time the site is hit, the image will be served from a different server
(though rsync'ed, still have a different inode).  Because a different ETag
is generated, it replaces the previous ETag stored in the browser/cache
engine.  Thus a refresh will rarely use cached images.  As your web farm
grows, the odds of hitting the same server for the same image decrease.

(Netscape must not use ETags as it caches the images off the URL and
last-modified only.  304's are never sent.)

Now some questions:
	1) why is inode used in ap_make_etag() ?
		ap_make_etag() uses inode, filesize, and lastmodtime for
making ETags.  
		Looking at the W3.org "reference" JigSaw Server, they use a
random number and last-modified time instead.
		If it's a random number, then jeeze what's the point ??

	2) Since ETags are designed "so the end system can determine it's
own content cache-ability", wouldn't that mean that each "handler" would
determine it's own etag ?  The cgi-handler would make it's own ETag, while
the default_handler would make its own ??  Would I have to make an
ImageHandler that would make a unique ETags for images-only ??  Since the
default-handler handles file-system type static images...couldn't we just
have it not send the inode ??

	3) The w3.org doc on "caching" makes it clear that Etags and
Last-Modified headers should always be sent in unison (so HTTP/1.0 browsers
are not affected). With this in mind, what if I turned off Etags period ??
Proxies and browsers are supposed to use Last-Modified date instead  - as
per the w3.org doc I just mentioned.

	4) Can your group add Directives to control the generation of ETags
better ?
		Perhaps an option:
			ETagWeakAge	 duration	- determine when
weak tags should be made instead of 1 sec.  (see Netware email thread).
			ETagUseInode	on|off		- use inode to make
etags
		You could really go overboard by doing:
			EtagFormat "%w/%i-%m-%s"	- custom format that
may be too much.

	5) Please keep this in mind for Apache2.0 development.

Phil


Mime
View raw message