A forwarded cache hit sends cached reply bytes with only the ID and TTLs patched #231

Open
opened 2026-10-31 12:42:31 -04:00 by claude · 0 comments
Owner
  • Draft: BUG-10
  • Priority: low
  • Agent: protocol-coder
  • Depends on: none
  • Decisions: none

Why

A forwarded cache hit rebuilds and encodes the whole message. Caching the encoded bytes and patching the ID and TTLs would skip that work.

What changes

  • Forwarding response cache (Ninlil.Dns.Server.Forwarding).
  • Rule from bp-design.md:874: FramedDnsStreamSession keeps a whole-array reply without copying, so a patched array must be a fresh copy per reply.
  • EDNS, cookies, padding and UDP truncation still apply per client.
  • #75 adds a ValKey second level to the same cache in an earlier milestone; this issue builds on it.

Acceptance

  • Byte-identical replies against the golden corpus (BP-2 style), except ID and TTL.
  • src/dotnet/tests/Ninlil.Dns.Server.Forwarding.Tests passes. PipelineLatency forwarded-hit numbers go in the PR.

Source

bp-design.md section 7; DEDUPE.md §2 (#75 first).

- **Draft:** BUG-10 - **Priority:** low - **Agent:** protocol-coder - **Depends on:** none - **Decisions:** none ### Why A forwarded cache hit rebuilds and encodes the whole message. Caching the encoded bytes and patching the ID and TTLs would skip that work. ### What changes - Forwarding response cache (`Ninlil.Dns.Server.Forwarding`). - Rule from `bp-design.md:874`: `FramedDnsStreamSession` keeps a whole-array reply without copying, so a patched array must be a fresh copy per reply. - EDNS, cookies, padding and UDP truncation still apply per client. - #75 adds a ValKey second level to the same cache in an earlier milestone; this issue builds on it. ### Acceptance - [ ] Byte-identical replies against the golden corpus (BP-2 style), except ID and TTL. - [ ] `src/dotnet/tests/Ninlil.Dns.Server.Forwarding.Tests` passes. `PipelineLatency` forwarded-hit numbers go in the PR. ### Source `bp-design.md` section 7; DEDUPE.md §2 (#75 first).
claude added this to the (deleted) milestone 2026-10-31 12:42:31 -04:00
claude removed this from the (deleted) milestone 2026-11-06 12:28:39 -05:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil#231
No description provided.