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

enable proxy.config.http.negative_revalidating_enabled by default #1626

Closed
mlibbey opened this issue Mar 31, 2017 · 8 comments
Closed

enable proxy.config.http.negative_revalidating_enabled by default #1626

mlibbey opened this issue Mar 31, 2017 · 8 comments
Milestone

Comments

@mlibbey
Copy link
Contributor

mlibbey commented Mar 31, 2017

I think we should enable proxy.config.http.negative_revalidating_enabled by default in ATS 8. This config allows ATS to serve stale when it cannot reach the origin. With the current settings the client receives 502s. The config is overridable.

@mlibbey mlibbey added this to the 8.0.0 milestone Mar 31, 2017
@SolidWallOfCode
Copy link
Member

The documentation is not completely clear. If this is enabled, then on subsequent requests to the failed object, ATS will revalidate the negatively cached item against the origin? And in that case, if the revalidation fails, it will serve stale content? Although that seems wrong because the cached object would be the negative reply.

@mlibbey
Copy link
Contributor Author

mlibbey commented Apr 2, 2017

How about if I add:
That is, when enabled, |TS| will serve stale when it can not reach the origin server (similar to the stale-if-error Cache-Control directive).

@SolidWallOfCode
Copy link
Member

What about this -

.. ts:cv:: CONFIG proxy.config.http.negative_revalidating_enabled INT 0
:reloadable:
:overridable:

Negative revalidating allows |TS| to return stale content if revalidation to the origin fails due
to network or HTTP errors. If it is enabled, than caching the negative response, the current
(possibly stale) content is preserved and served. Note this is considered only on a revalidation
of already cached content and failure means unable to communicate via HTTP to the origin. If the
origin provides a valid response that is not considered a failure in this context.

A value of 0 disables serving stale content and a value of 1 enables keeping and serving stale content if revalidation fails.

.. ts:cv:: CONFIG proxy.config.http.negative_revalidating_lifetime INT 1800

How long, in seconds, to consider a stale cached document valid if If
:ts:cv:proxy.config.http.negative_revalidating_enabled is enabled and |TS| receives a negative
(5xx only) response from the origin server during revalidation.

@mlibbey
Copy link
Contributor Author

mlibbey commented Apr 3, 2017

Don't get this sentence:

If it is enabled, than caching the negative response, the current (possibly stale) content is preserved and served.

I think this should only be in play for stale content -- wouldn't be revalidating fresh content, right? Perhaps
If it is enabled, rather than caching the negative response, the current stale content is preserved and served.

If the origin provides a valid response that is not considered a failure in this context.

Perhaps missing a comma after response?
Would a 5xx error be considered a valid response? We use cache hierarchies extensively, and this setting kicks in when our parents return a 5xx error to the children. Perhaps 'a valid response specific to the object'?

proxy.config.http.negative_revalidating_lifetime
appears to be both reloadable and overridable.

@SolidWallOfCode
Copy link
Member

  1. "If enabled, rather than caching the negative response on a revalidate, the ..."

  2. Hmmm. I need to look at the code.

@SolidWallOfCode
Copy link
Member

Docs updated, ship this in ATS 8.

@mlibbey
Copy link
Contributor Author

mlibbey commented Dec 4, 2017

Still think proxy.config.http.negative_revalidating_enabled needs to be enabled by default in 8.

randall added a commit to randall/trafficserver that referenced this issue Aug 16, 2018
bryancall pushed a commit that referenced this issue Aug 31, 2018
bryancall pushed a commit that referenced this issue Aug 31, 2018
@bryancall bryancall modified the milestones: 8.0.0, 8.0.1 Sep 26, 2018
@mlibbey
Copy link
Contributor Author

mlibbey commented Nov 1, 2018

Looks like this is done.

@mlibbey mlibbey closed this as completed Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants