Etags and Load-balanced environmetn

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”

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.

I wonder if it’s on schedule to implement FileEtag directive as exists
in Apache (http://httpd.apache.org/docs/2.0/mod/core.html#fileetag),
this would solve these kind of problems.

Thanks a lot,
Lau Buru

Hello!

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
servers.

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 (http://httpd.apache.org/docs/2.0/mod/core.html#fileetag),
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
support.


Maxim D.
http://nginx.org/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs