Ninlil connects to an optional ValKey server and reports its state on /status #70
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
#71 A change saved on one instance expires the matching caches on every instance that shares the ValKey server
lantea-one/ninlil
#72 The admin console's live feed works across instances through a ValKey SignalR backplane
lantea-one/ninlil
#73 DNS rate limits count queries across every instance that shares the ValKey server
lantea-one/ninlil
#74 Admin sign-in and password-reset attempts are counted across every instance that shares the ValKey server
lantea-one/ninlil
Reference
lantea-one/ninlil#70
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
The connection, options and test container are shared ground for #71 to #75 and #74, and for the benchmark harness (#95).
What changes
src/dotnet/src/Ninlil.Common.Valkey(NuGet-packable like its siblings):StackExchange.Redis, which speaks the Redis protocol that ValKey implements. It is the clientMicrosoft.AspNetCore.SignalR.StackExchangeRedisalready depends on, so the solution carries one client library.IValkeyConnectionwithbool IsConnected,ISubscriber Subscriber,IDatabase Database,string Key(string suffix)(adds the key prefix) and an event that fires on reconnect.ServiceCollectionValkeyExtension.AbortOnConnectFail = false: a missing server never blocks startup.ValkeyOptions,SectionName = "Valkey". Properties:ConnectionString: empty means off.KeyPrefix: defaultninlil.EnableCacheInvalidation: default true.EnableSignalRBackplane,EnableSharedRateLimit,EnableSharedForwardedCache: default false. Each adds a network round trip or changes behaviour, so each is opt-in.EnableSharedRateLimitcovers both the DNS query limiter (#73) and the admin sign-in limiter (#74).src/dotnet/src/Ninlil.Web/EnvironmentVariables/OptionsEnvironmentVariableRegistry.cs. Add the rows toENVIRONMENT.mdand recount the totals.valkeyhealth check inProgram.csnext toeventBroker(src/dotnet/src/Ninlil.Web/Program.cs:702-713): Healthy when not configured or connected, Degraded when configured and disconnected.ValkeyHostinsrc/dotnet/tests/Ninlil.Dns.Data.EngineHosts/, a Testcontainers generic container from a digest-pinnedvalkey/valkeyimage. The digest lives only there: the benchmarks and the benchmark compose file (#95) reuse it, so.forgejo/scripts/bump-pins.shupdates one place. Check thatbump-pins.shfinds the new pin and extend it if not.src/dotnet/tests/Ninlil.Common.Valkey.Tests. Its container tests carry[Trait("Category", "RequiresDocker")].Acceptance
Connect_WithNoConnectionString_RegistersNothingAndStatusIsHealthypasses.Connect_ToStoppedContainer_StatusIsDegradedAndHostStillStartspasses (RequiresDocker).Reconnect_AfterContainerRestart_RaisesReconnectedEventpasses (RequiresDocker).ENVIRONMENT.mdis updated with recounted totals.bump-pins.shreports theValkeyHostpin (dry run output in the PR).dotnet build Ninlil.slnx -p:NinlilSkipAngularBuild=truereports 0 warnings.dotnet test src/dotnet/tests/Ninlil.Common.Valkey.Testsandsrc/dotnet/tests/Ninlil.Web.Testspass.Source