Etags and Load-balanced environmetn

Maxim Dounin mdounin at
Wed May 28 17:24:37 UTC 2014


On Wed, May 28, 2014 at 06:55:17PM +0200, Lau Buru wrote:

> Hi,
> I've got 3 NGinx servers running under a load balancer. I've got ETags
> successfuly configured but the problem is that each server presents
> different ETag tag for the same content:
>   ETag: "531ee076-6b"
>   ETag: "531edf6a-6b"
>   ETag: "531ede5f-6b"
>   ETag: "531edd4f-6b"

That's because you've failed to sync file modification time between 

> I've read that NGinx is using inode for calculating the ETag so it's
> obvious that we will never get the same ETag for the same file in
> different servers. I know I could get this if I use shared disk but this
> is not an option for me.

You've read something totally wrong.  If you can remember where 
you read it, add the source to your blacklist (and you may also 
share it for others to do the same).

> I wonder if it's on schedule to implement FileEtag directive as exists
> in Apache (,
> this would solve these kind of problems.

The default and the only option is to use file modification time 
and size.  Problems with inode number are well known and were 
avoided in nginx from the initial introduction of the entity tags 

Maxim Dounin

More information about the nginx mailing list