Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETag is bad for clustered environment #25

Open
asafyish opened this issue Feb 15, 2012 · 0 comments
Open

ETag is bad for clustered environment #25

asafyish opened this issue Feb 15, 2012 · 0 comments

Comments

@asafyish
Copy link

Hi,

I see that you calculate the etag using the file mtime (modify time), this is all nice and good when working from a single machine with a single copy of the file been served, but can be really problematic when serving from a cluster since the file is located across machines (with different mtime) and therefor different etag, causing the cached file to invalidated over and over again.

Maybe you can use md5/sha1 of the file instead of mtime, this way even from different machines in the cluster you will get the same etag.

I am aware that I shouldn't serve static files straight from node.js and use some kind of reverse proxy(nginx, varnish, squid) between node.js and the outer world.

See
http://developer.yahoo.com/performance/rules.html#etags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant