Several Ninlil instances can share an optional ValKey server for cache expiry, the live feed, rate limits and forwarded answers #69
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
lantea-one/ninlil#69
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Every cache in Ninlil lives in one process.
IEntityChangeNotifierreports local writes only (src/dotnet/src/Ninlil.Dns.Data.Abstractions/Repository/IEntityChangeNotifier.cs:11-12). So when instances share one database, an instance sees another instance's write only when its cache times out. That is 60 s for the client directory, filter configuration, rewrites, schedules and forwarder zones, and 5 min for filter-list entries (README.md:5092-5098). The zone and access-rule caches have no timer at all today (README.md:5098); #50 gives them the same 60 s bound without ValKey. The DNS rate limiter keeps all its state in memory per node (src/dotnet/src/Ninlil.Dns.Server.RateLimiting/TokenBucketDnsRateLimiter.cs:29-31,src/dotnet/src/Ninlil.Dns.Server.Core/RateLimiting/IDnsRateLimiter.cs:9-11), and so does the admin sign-in limiter (src/dotnet/src/Ninlil.Dns.Identity/Extension/ServiceCollectionAdminLoginRateLimitingExtension.cs:79-127). The forwarded-answer cache is per process too (src/dotnet/src/Ninlil.Dns.Server.Forwarding/Caching/ForwardedResponseCache.cs:44). SignalR has no backplane (src/dotnet/src/Ninlil.Web/Program.cs:689-695).ValKey is optional. It is never a source of truth: if it is missing or down, every feature falls back to the node-local behaviour of today. A single node never benefits, because the in-process caches are faster.
What changes
Children, in order:
Acceptance
ENVIRONMENT.mdlists every newNINLIL_VALKEY_*variable, with recounted totals.Source
project_first_release_plan.md): ValKey and then AD/Samba DNS right after the release.b11-12-design.md§2.8 (B11-12i change notifier) and line 641 (ValKey named as the cross-node follow-up).