Urgent.News

What's breaking now, across thousands of outlets.

Tech

Backend API Feature Flags: Stable Rollout Targeting for Checkout Reconstruction

A support engineer cannot reconstruct a failed checkout from a rollout percentage alone. In a Node.js feature flags design, the backend API must make a deterministic user-targeting decision, then record enough context to connect that decision to the request without turning every log line into a customer-data leak. TL;DR: evaluate each flag on the server from a stable, non-secret subject key;…

Reconstructing failed checkout transactions after a percentage rollout deployment requires deterministic decision-making at the backend. Simply knowing the rollout percentage isn't enough, as shoppers may move between cohorts on consecutive requests.

In a Node.js feature flag implementation, the backend API must evaluate each user request using a stable, non-secret key derived from the user. This key, combined with the selected flag variant, rule revision and evaluation reason, is recorded in a compact decision snapshot attached to the checkout trace.

A hash-based bucketing technique ensures consistent subject assignment across requests, while hash-based bucketing keeps the same subject in the same cohort. The decision snapshot contains the flag key, variant, rule revision and evaluation reason. This allows support engineers to reconstruct what actions occurred during a failed checkout by examining the request ID, snapshot and error details.

The evaluation process uses a deterministic algorithm to map the hash of the flag and subject key into a 10,000-bucket scale. If the subject key is in the targeted cohort, the decision returns either "retry_v2" or "control" variant depending on whether the hash enabled the flag. Otherwise, the default variant is returned.

Important considerations include validating percentages before evaluation, defining targeting precedence explicitly, and keeping the hashing input, byte selection, modulus and subject identifier consistent to avoid reshuffling cohorts. The approach minimizes the amount of sensitive user data included in the decision snapshot while still providing enough context for effective incident analysis.

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

Gas Optimization Audit: Polygon Bridge

Gas Optimization Audit: Polygon Bridge Target Protocol : Polygon Bridge (TVL: $2766.2M) Polygon Bridge – Gas‑Optimization Audit Protocol: Polygon Bridge (Ethereum ↔ Polygon PoS) TVL (approx.): $2.766…

  • Senior DeFi researcher audits Polygon Bridge gas efficiency on October 10, 2026
  • Recommendations to reduce transaction costs 15-30% and mitigate attacks

US building permits by county and city, as one tidy table (Census Building Permits Survey)

If you sell building products, build homes or lend on construction, monthly building permit counts are one of the earliest demand signals you can get.

  • US Census Bureau provides building permits data for every state, county, and place.
  • Data includes structure type, units, and valuation in thousands of dollars.
  • Apify Actor simplifies data access with named columns and export options.

Finding FEMA-funded rebuild and mitigation projects before they go to bid (OpenFEMA)

After a declared disaster, FEMA obligates money to cities, counties, utilities and other public applicants to repair roads, bridges, water systems and public buildings.

  • FEMA-funded rebuild and mitigation projects available before bidding
  • OpenFEMA API provides publicly accessible dataset of obligated projects
  • FEMA Disaster Recovery & Mitigation Projects actor simplifies data retrieval

More from Saturday 10 October →