The admin console's live feed works across instances through a ValKey SignalR backplane #72

Open
opened 2026-10-31 12:42:01 -04:00 by claude · 0 comments
Owner
  • Draft: INT-4
  • Priority: medium (the event broker already covers the live feed; this serves installs without a broker)
  • Agent: coder
  • Depends on: #70
  • Decisions: none

Why

DnsEventsHubBroadcaster is an IDnsServerRemoteEventSubscriber, so with a broker it already forwards other instances' events (src/dotnet/src/Ninlil.Web/Hubs/DnsEventsHubBroadcaster.cs:12-18). A backplane fans every local broadcast out to all instances. Turned on next to a broker as the code stands, every remote event would reach a client twice.

What changes

  • In src/dotnet/src/Ninlil.Web/Program.cs:689-695, when EnableSignalRBackplane is set, call .AddStackExchangeRedis(...) with ChannelPrefix set to the key prefix.
  • With the backplane on, the broadcaster forwards only this instance's own events. Do this by not registering it as a remote subscriber, or by filtering on origin. Reason: the instance that made an event already reaches every client through the backplane.
  • Permission groups keep working unchanged, because groups are backplane-aware (src/dotnet/src/Ninlil.Web/Hubs/DnsEventsHub.cs:63-99).
  • Update the comments in the broadcaster summary.
  • #227 measures the same broadcaster afterwards.

Acceptance

  • Test (fails first, RequiresDocker): two hosts with the backplane. A SignalR client connected to host B receives a DnsZoneChanged raised on host A exactly once.
  • Test: with backplane and broker both configured (use a fake broker transport), the event still arrives exactly once.
  • Test: a client without zones:read receives nothing.
  • src/dotnet/tests/Ninlil.Web.Tests passes.
  • README states that the backplane is an alternative to the broker for the live feed.

Source

Owner scope (2026-10-09).

- **Draft:** INT-4 - **Priority:** medium (the event broker already covers the live feed; this serves installs without a broker) - **Agent:** coder - **Depends on:** #70 - **Decisions:** none ### Why `DnsEventsHubBroadcaster` is an `IDnsServerRemoteEventSubscriber`, so with a broker it already forwards other instances' events (`src/dotnet/src/Ninlil.Web/Hubs/DnsEventsHubBroadcaster.cs:12-18`). A backplane fans every local broadcast out to all instances. Turned on next to a broker as the code stands, every remote event would reach a client twice. ### What changes - In `src/dotnet/src/Ninlil.Web/Program.cs:689-695`, when `EnableSignalRBackplane` is set, call `.AddStackExchangeRedis(...)` with `ChannelPrefix` set to the key prefix. - With the backplane on, the broadcaster forwards only this instance's own events. Do this by not registering it as a remote subscriber, or by filtering on origin. Reason: the instance that made an event already reaches every client through the backplane. - Permission groups keep working unchanged, because groups are backplane-aware (`src/dotnet/src/Ninlil.Web/Hubs/DnsEventsHub.cs:63-99`). - Update the comments in the broadcaster summary. - #227 measures the same broadcaster afterwards. ### Acceptance - [ ] Test (fails first, RequiresDocker): two hosts with the backplane. A SignalR client connected to host B receives a `DnsZoneChanged` raised on host A exactly once. - [ ] Test: with backplane and broker both configured (use a fake broker transport), the event still arrives exactly once. - [ ] Test: a client without `zones:read` receives nothing. - [ ] `src/dotnet/tests/Ninlil.Web.Tests` passes. - [ ] README states that the backplane is an alternative to the broker for the live feed. ### Source Owner scope (2026-10-09).
claude added this to the Release: ValKey milestone 2026-10-31 12:42:01 -04: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.

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