v1.6.0 - Optional dual-send mirror so a standby server stays a live replica. #12
Reference in New Issue
Block a user
Delete Branch "dev"
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?
[6-25-26] — v1.6.0
Optional dual-send mirror so a standby server stays a live replica.
Added — Mirror (dual-send)
MIRROR_API_URLand/orMIRROR_SFM_URLare set, each heartbeat POST and each forwarded Blastware event is also sent to the mirror destination — letting a standby box (e.g. the office NAS) stay a continuous replica of prod during a migration so the eventual cutover is a non-event. Default off — blank URLs mean existing 1.5.x installs don't change behaviour after an auto-update.send_api_payload, the same payload is fired atMIRROR_API_URLwhen set. It is fully wrapped and bounded by the existing API timeout — the mirror can never delay or fail the primary heartbeat; its outcome is ignored except for a debug log line.MIRROR_SFM_URLthrough a separate sha256 state file (MIRROR_SFM_STATE_FILE, blank →<log dir>/sfm_forwarded_mirror.json) so the mirror tracks its own delivery independently of the primary forwarder. Before each mirror pass a quick reachability probe (~3 s) checks the mirror server; if it's down the pass is skipped and retried next tick rather than blocking the loop on per-event timeouts. Skipped events stay pending in the mirror state and deliver once the mirror returns — no data loss.MIRROR_API_URLis set; event-mirror active iff primary forwarding is on andMIRROR_SFM_URLis set).Mirror API URL+Mirror SFM URL(blank = off).test_event_forwarder.pycovering mirror reachability, the down-mirror skip, separate-state idempotency, and the isolation invariant (a mirror failure leaves the primary's result + state untouched).Configuration
New
[agent]keys (all default-off — existing 1.5.x deployments don't change behaviour on auto-update):MIRROR_API_URLhttp://10.0.0.x:8001(blank = off)MIRROR_SFM_URLhttp://10.0.0.x:8200(blank = off)MIRROR_SFM_STATE_FILE<log dir>/sfm_forwarded_mirror.jsonOperational (migration seeding)
To make the mirror re-deliver only the gap since a one-time replica snapshot, copy the primary state file to the mirror state file and drop entries whose
forwarded_atis after the snapshot. SFM-side dedup covers any overlap. Seedocs/mirror-dual-send-design.md.