-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add an application cache for REST API #9173
Conversation
Signed-off-by: Jeff Schmidt <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9173 +/- ##
============================================
- Coverage 92.57% 92.57% -0.01%
Complexity 7047 7047
============================================
Files 915 917 +2
Lines 29870 29953 +83
Branches 3773 3788 +15
============================================
+ Hits 27653 27729 +76
- Misses 1446 1453 +7
Partials 771 771 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Jeff Schmidt <[email protected]>
…on-cache-for-rest-api
Signed-off-by: Jeff Schmidt <[email protected]>
…-null next(). Signed-off-by: Jeff Schmidt <[email protected]>
…e miss and hit tests. Signed-off-by: Jeff Schmidt <[email protected]>
…on-cache-for-rest-api
…nstance initialization order. Signed-off-by: Jeff Schmidt <[email protected]>
…on-cache-for-rest-api
…ased on original max-age. Clean up. Signed-off-by: Jeff Schmidt <[email protected]>
Signed-off-by: Jeff Schmidt <[email protected]>
…on-cache-for-rest-api
Signed-off-by: Jeff Schmidt <[email protected]>
Signed-off-by: Jeff Schmidt <[email protected]>
…on-cache-for-rest-api
…eware will compress it. Always call next(); Signed-off-by: Jeff Schmidt <[email protected]>
Signed-off-by: Jeff Schmidt <[email protected]>
Signed-off-by: Jeff Schmidt <[email protected]>
Signed-off-by: Jeff Schmidt <[email protected]>
Signed-off-by: Jeff Schmidt <[email protected]>
Signed-off-by: Jeff Schmidt <[email protected]>
…on-cache-for-rest-api
Signed-off-by: Jeff Schmidt <[email protected]>
…on-cache-for-rest-api
Signed-off-by: Jeff Schmidt <[email protected]>
…on-cache-for-rest-api
In order to set config needed for test, broken up some tests into separate files (Node processes). Signed-off-by: Jeff Schmidt <[email protected]>
…on-cache-for-rest-api
Signed-off-by: Jeff Schmidt <[email protected]>
Signed-off-by: Jeff Schmidt <[email protected]>
…on-cache-for-rest-api. Merge conflicts. Signed-off-by: Jeff Schmidt <[email protected]>
…on-cache-for-rest-api
Signed-off-by: Jeff Schmidt <[email protected]>
Signed-off-by: Jeff Schmidt <[email protected]>
…on-cache-for-rest-api
…on-cache-for-rest-api
Quality Gate passedIssues Measures |
Description:
Very preliminary draft to get feedback on general approach to the solution. There is still more implementation and testing to be done.
There are many times that the same request from different sessions all hit our REST server even though cloud CDN is enabled and the responses have proper cache control header set.
There are also periodic high rate of response code 304 from our REST server because some clients will issue a HEAD request with cache id to probe if the cache is still valid. Due to lack of head handler in our js REST module, it ends up to go though the get handler and query data, then expressjs learns the cache is still valid, zeros out the response body and sends a 304 response.
We should add a application layer cache to handle such scenarios so the rest server doesn't unnecessarily go to the database for the data.
Related issue(s):
Fixes #9111
Notes for reviewer:
maxMemory
.Checklist