You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Amila Liyanaarachchi <am...@gmail.com> on 2011/10/06 19:03:10 UTC

Caching - Generating E-Tags

Hi Dev,

I'm working on a caching protocol similar to HTTP on a different research. I
have the following question regarding the e-tags.
When does exactly apache computes the e-tag for a certain resource?
Does it compute that when there is a request for that particular resource or
is it computed by the server whenever a resource get modified in the
server?

Thanks,
Amila

Re: Caching - Generating E-Tags

Posted by Igor Galić <i....@brainsware.org>.

----- Original Message -----
> 
> 
> Am 10.10.2011 00:10, schrieb Igor Galić:
> > ----- Original Message -----
> >> request time because it normally contains the inode
> > 
> > Which makes it quite useless in a farm with multiple servers
> > as the same files will have different inodes.
> > My recomendation is to use size and mtime
> 
> well, most setups are NOT a farm with multiple servers

In this age and time I wonder how long that statement
will hold true.

> so if you have not a default-setup change the defaults
> 
> FileETag -INode

i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 571B 8B8A FC97 266D BDA3  EF6F 43AD 80A4 5779 3257

Re: Caching - Generating E-Tags

Posted by Reindl Harald <h....@thelounge.net>.

Am 10.10.2011 00:10, schrieb Igor Galić:
> ----- Original Message -----
>> request time because it normally contains the inode
> 
> Which makes it quite useless in a farm with multiple servers
> as the same files will have different inodes.
> My recomendation is to use size and mtime

well, most setups are NOT a farm with multiple servers
so if you have not a default-setup change the defaults

FileETag -INode


Re: Caching - Generating E-Tags

Posted by Igor Galić <i....@brainsware.org>.

----- Original Message -----
> 
> Am 06.10.2011 19:03, schrieb Amila Liyanaarachchi:
> > Hi Dev,
> > 
> > I'm working on a caching protocol similar to HTTP on a different
> > research. I have the following question regarding
> > the e-tags.
> > When does exactly apache computes the e-tag for a certain resource?
> > Does it compute that when there is a request for that particular
> > resource or is it computed by the server whenever
> > a resource get modified in the server?
> 
> request time because it normally contains the inode

Which makes it quite useless in a farm with multiple servers
as the same files will have different inodes.

My recomendation is to use size and mtime:

http://httpd.apache.org/docs/current/mod/core.html#fileetag

ETag is then an MD5 sum of a combination of all values considered.

Be wary that the calculation of the ETag can sometimes take more
effort than just delivering the ETag.

See Theo Schlossnagle's performance talks for reference:
http://omniti.com/seeds/yslow-to-yfast-in-45-minutes
http://lethargy.org/~jesus/writes/web-performance-boot-camp


i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 571B 8B8A FC97 266D BDA3  EF6F 43AD 80A4 5779 3257

Re: Caching - Generating E-Tags

Posted by Reindl Harald <h....@thelounge.net>.
Am 06.10.2011 19:03, schrieb Amila Liyanaarachchi:
> Hi Dev,
> 
> I'm working on a caching protocol similar to HTTP on a different research. I have the following question regarding
> the e-tags.
> When does exactly apache computes the e-tag for a certain resource?
> Does it compute that when there is a request for that particular resource or is it computed by the server whenever
> a resource get modified in the server? 

request time because it normally contains the inode


Re: Caching - Generating E-Tags

Posted by Stefan Fritsch <sf...@sfritsch.de>.
Hi,

On Thursday 06 October 2011, Amila Liyanaarachchi wrote:
> I'm working on a caching protocol similar to HTTP on a different
> research. I have the following question regarding the e-tags.
> When does exactly apache computes the e-tag for a certain resource?
> Does it compute that when there is a request for that particular
> resource or is it computed by the server whenever a resource get
> modified in the server?

If you don't need to be compatible to HTTP and don't want to make the 
same errors,  http://www2002.org/CDROM/refereed/444.pdf is a good 
read.

Cheers,
Stefan