New issue
Advanced search Search tips

Issue 649469 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Docs server doesn't use very effective caching

Project Member Reported by asargent@chromium.org, Sep 22 2016

Issue description

In https://codereview.chromium.org/218363002 we changed the docserver to require clients to always do an http round-trip to revalidate that their cached copy of extension docs content hasn't changed. This isn't that great a strategy - it does possibly save a little bandwidth, but because the ETag is computed based on the content the server would have output, the server needs to do all the normal work to create a response before being able to tell the client that nothing has changed. 

A much more effective strategy would be to do the following:

-Let the client cache everything for some reasonable length of time (1-2 hours perhaps?) without needing to do a network round-trip to revalidate. The docs don't change all that often, and when they do being a little out-of-date isn't the end of the world. This would mean serving header like:

Cache-Control: public, max-age=3600

instead of

Cache-Control: public, max-age=0, no-cache

-Keep some sort of "version number" server-side in a fast-to-read place  (memcache?), and use that to generate the Etag (possibly hash it with the path?). When we find out something has actually changed as we are processing incoming changes from git, we increment the version number. 

 
Components: -Platform>Extensions Platform>Extensions>Documentation
A somewhat related thing we can do to improve docs performance is to move from having our python app code serve up the static resources (images, css, js) which is expensive since it requires spinning up an app server, to either using appengine's built-in static files support via a static_dir or static_files section in app.yaml, or possibly the Google Cloud CDN. This would require a bit of research work on our part to figure out how to push updates to these files from git, but I would expect there to be fairly straightforward APIs for this. 


https://cloud.google.com/appengine/docs/python/getting-started/serving-static-files
https://cloud.google.com/appengine/docs/python/config/appref#handlers

https://cloud.google.com/cdn/docs/
Project Member

Comment 3 by sheriffbot@chromium.org, Sep 27 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: karandeepb@chromium.org
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)
Cc: -catmulli...@chromium.org

Sign in to add a comment