Skip to content

Serve expired cache update fixes#1174

Merged
gthess merged 7 commits into
masterfrom
serve-expired-backoff-recursion
Dec 31, 2024
Merged

Serve expired cache update fixes#1174
gthess merged 7 commits into
masterfrom
serve-expired-backoff-recursion

Conversation

@gthess

@gthess gthess commented Nov 6, 2024

Copy link
Copy Markdown
Member

This tries to fix certain things related to serve-expired and cache updates:

  • If resolution fails, back off and use the expired entry for some time (default 5 seconds)
  • If serve-expired is set (but not serve-expired-client-timeout) still try to replace a SERVFAIL answer with an expired reponse
  • Exclude explicit RRSIG queries to require validation before being cached

@gthess gthess requested a review from wcawijngaards November 6, 2024 15:05
@gthess gthess self-assigned this Nov 6, 2024

@wcawijngaards wcawijngaards left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments elsewhere, but approved. Important to have a limit on work for expired contents that is served, otherwise every incoming query could turn into an upstream request, a request attempt for failing lookups.

@gthess gthess requested a review from wcawijngaards November 6, 2024 21:51

@wcawijngaards wcawijngaards left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good! With serve expired, the norec_ttl is adjusted to stop repeated attempts, for a short duration, and the additional fix is a catch for additional cases where this is needed.

@gthess gthess merged commit fff9f62 into master Dec 31, 2024
gthess added a commit that referenced this pull request Dec 31, 2024
- Merge #1174: Serve expired cache update fixes. Fixes a regression bug
  with serve-expired that appeared in 1.22.0 and would not allow the
  iterator to update the cache with not-yet-validated entries resulting
  in increased outgoing traffic.
jedisct1 added a commit to jedisct1/unbound that referenced this pull request Jan 8, 2025
* nlnet/master:
  Changelog entry for NLnetLabs#1174: - Merge NLnetLabs#1174: Serve expired cache update fixes. Fixes a regression bug   with serve-expired that appeared in 1.22.0 and would not allow the   iterator to update the cache with not-yet-validated entries resulting   in increased outgoing traffic.
  Serve expired cache update fixes (NLnetLabs#1174)
@gthess gthess deleted the serve-expired-backoff-recursion branch September 15, 2025 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants