Urgent.News

What's breaking now, across thousands of outlets.

Tech

Property Import Rollbacks with a Node.js Feature Flag Kill Switch

TL;DR: Put the kill decision in a small server-side gate, cache the last valid flag snapshot, and make the fallback disable the new import path. For a property-management importer, rollback safety matters more than keeping an experimental parser alive during a control-plane outage. The flag may choose a path; a separate freshness check must detect when scheduled imports stop producing results.…

In the context of a Node.js backend property import system, the implementation of a kill switch using a feature flag requires careful consideration. The goal is to ensure a smooth transition to a stable parser while handling potential issues that may arise during scheduled imports.

The recommended approach is to implement a small server-side gate that determines which parser variant should be used. This gate should cache the last valid flag snapshot and have a fallback mechanism that disables the new import path. The decision should prioritize rollback safety over keeping an experimental parser alive during a control-plane outage.

To handle various failure modes, it is crucial to separate the failure signals. The Node.js backend is responsible for parser selection and fallback defaults, while the scheduler manages the cadence of the imports. Domain validation determines whether the import made progress, rather than relying solely on an HTTP success counter.

The key signal to monitor is the progress of the scheduled import. Record relevant information such as the scheduled run ID, source watermark, accepted count, rejected count, completion time, and parser variant. This data can then be used to trigger alerts when an expected result is not observed, rather than simply detecting exceptions.

Google's four golden signals (latency, traffic, errors, and saturation) can serve as a boundary for the surrounding service. However, the import adds an additional domain signal - the freshness of accepted property data - which those four signals cannot infer. The import frequency (e.g., every 15 minutes) should dictate a maximum silence threshold (maxSilenceMs) that can be set based on real schedule, normal completion variance, and alert response time. This value should be tested with delayed and missing runs to ensure proper functionality.

When a failure occurs, the kill switch must be able to rollback while dependencies are failing. The first decision criterion is control independence - the kill switch should not rely on the failing parser, its datastore, or a live flag network call. It should be implemented within the process itself. To achieve this, cache a validated snapshot and provide operators with a narrowly scoped local override that can only select a known implementation. If no valid snapshot exists, fall back to the established parser and emit a state-change event.

To ensure reversibility under concurrency, read the flag only once at the start of a run and pin that decision to the run ID. This allows the current run to remain internally consistent, even if the evaluation changes halfway through a large file. The next run can then use the new decision, while the current run remains unaffected.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Podcast, episode 1: The green check lies — backups, networking, self-hosting and a turtle

Three AI hosts, real homelab answers. The first episode of the Homelab the Right Way Podcast is out: Ep. 1: The green check lies — backups, networking, self-hosting and a turtle (46 minutes, published…

  • "Backups: The green check lies" debunks misconception of single green check guaranteeing reliability
  • RAID does not serve as backup alone; NFS share can consume entire root disk
  • QDevice fix presented as potential solution for Proxmox cluster freezing

'Human Vs. Robot' Cage Match Was Illegal, Says California

"A human defeated two of the three robots he faced in a cage fight recently held in San Francisco," reports the Los Angeles Times, noting that videos of the event drew more than 10 million views on…

  • Frankie LaPenna defeated three humanoid robots in San Francisco
  • Event garnered over 10 million YouTube views
  • California bans human vs. robot combat sports

Powered by beehiiv

  • beehiiv simplifies newsletter creation and monetization.
  • Users can launch newsletters with no cost or credit card.
  • Success stories show rapid subscriber growth and acquisitions.

The Provenance Layer — Or, You Can't Audit What You Can't Rebuild

Yesterday was the solvency layer (#63): the vendor holding your switch can run out of money. Today's front page answers the next question down — how do you know what the thing on your machine actually…

  • Provenance Layer addresses authenticity of software dependencies
  • Most dependencies cannot be rebuilt from public inputs
  • Implement provenance by pinning dependencies by digest and using lockfiles

How Browser Games Work: HTML5, Canvas and WebGL Explained

Browser games have changed dramatically over the years. Older web games often depended on plugins such as Flash, but modern browser games can now run directly inside Chrome, Firefox, Safari, Edge and…

  • Browser games run directly in web browsers using HTML5, Canvas, WebGL
  • HTML5 provides foundational structure, Canvas renders graphics, WebGL enables 2D/3D graphics
  • WebSockets and WebAssembly facilitate multiplayer and complex computations

More from Monday 19 October →