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

Clean up nginx rules for content caching #4343

Merged
merged 1 commit into from
Nov 14, 2022

Conversation

dmanjunath
Copy link
Contributor

Description

This PR contains 2 changes

  • Do not cache /file_lookup route anymore (route is deprecated, will be deleted after next release)
  • Do not serve stale content. This was causing bugs where initially content was unavailable and the server responded with 500 and openresty would return x-cache-status: STALE but if the content was subsequently made available it wouldn't serve until it invalidated the stale content and it took a while to do that. I'm sure there's a better fix for this but seems better to disable since this is an simple optimistic cache.

Tests

Tested locally by disabling this option and verifying that we don't see status STALE anymore. Also content that was made available is returned immediately.

Monitoring - How will this change be monitored? Are there sufficient logs / alerts?

No easy way to monitor this unfortunately. But can test very thoroughly because content should be served without issue through gateways.

@dmanjunath dmanjunath marked this pull request as ready for review November 14, 2022 21:56
@dmanjunath dmanjunath merged commit 86a303d into main Nov 14, 2022
@dmanjunath dmanjunath deleted the dm-disable-stale-content-caching branch November 14, 2022 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants