-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ansible/hg-web: serve static files as immutable content; r=sheehan
The commit message of the previous commit documented a problem with naive static file serving using httpd. In summary, Last-Modified and ETag values vary depending on the filesystem and across N servers this can result in different header values and caching state. This can result in lower cache hit rates. We can do better. Since the static files are checked into v-c-t, any particular revision of v-c-t has immutable state of those files. In addition, the HTTP Cache-Control header can be used to tell clients to always use a cached result without lookup (max-age) and that content is immutable (immutable). Putting these two properties together, it means that we can serve up static files from URLs with the v-c-t revision in them with very aggressive caching headers. This should result in very high cache hit rates coupled with the removal of conditional HTTP requests. What this means is that most hgweb page loads will require 1 roundtrip to the server (to fetch the main HTML) and static assets will load immediately. Differential Revision: https://phabricator.services.mozilla.com/D10786 --HG-- extra : moz-landing-system : lando
- Loading branch information
Showing
4 changed files
with
62 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters