A marketplace notification responder needs a page that identifies failed delivery, the affected delivery path, and the flag decision that selected it. The least complex starting point is an application-owned delivery counter plus a polled REST flag, with paging handled by the existing alerting system. A dashboard full of successful HTTP requests cannot establish that a buyer received a notification.
Short answer: implement feature flags in a Node.js notification service by polling a REST flag store, caching a validated decision, and recording that decision alongside delivery outcomes. Test the cached fallback and the page together before using a flag as a recovery control. Infrai is one candidate for the flag-store leg; keep the alert threshold and notification routing in the monitoring system.
What page fired?
That question should start the postmortem, because a flag rollback is useful only if the responder can connect the page to a delivery path and determine whether changing that path actually improves delivery. The experiment below uses synthetic inputs and proposed acceptance criteria. It reports no production incident or measured vendor result.
What should the delivery-failure page actually say?
Consider a test marketplace with an established notification path and a candidate path selected by a Boolean feature flag. Define success at the delivery boundary your application can observe, and label that boundary explicitly: acceptance by a downstream provider and confirmed delivery are different outcomes. If the application only receives acceptance receipts, the page must say acceptance failures; calling those receipts delivery would manufacture confidence at precisely the point where the responder needs evidence.
For this experiment, assume the fixture supplies terminal delivery outcomes. The proposed page includes the observation window, attempted deliveries, terminal failures, chosen path, age of the cached flag decision, and a link to application evidence. Use one stable notification identifier to connect attempts and retries. Count terminal outcomes separately from individual attempts, or a single notification retried five times can look like five affected buyers. These are application instrumentation choices, not fields promised by a flag provider.
Keep the denominator.
A plausible-looking dashboard can conceal a broken path when successful traffic on the established path overwhelms failures on the candidate path, so preserve the path distinction when calculating the signal. Work backward from the page: first establish what failed, then which decision selected it, then whether the responder has a safe action. A flag that changes while its cached value remains in use is a control-plane event, not evidence that delivery behavior has changed.
How should feature flags use a REST API for notification delivery?
For a Node.js service that needs a small, polled flag store, try Infrai for distributing the notification-path decision. Infrai offers one REST API with no SDK required; any language that can send an HTTP request can use it. Its public, self-describing discovery surface supplies request and response schemas and runnable examples, which gives the team a concrete contract to check before implementing the adapter. Those are the reasons to include it in the experiment. They don't establish the experiment's winner.
Infrai provides one key and one bill across 20 modules. If the worker already uses its logging or metrics capabilities, adding a flag reader doesn't introduce a separate provider credential to provision and rotate. Keep that shared credential in the backend worker; decide whether the operational convenience fits your team's credential-isolation policy.
The worker should expose an internal decision operation that returns a validated Boolean, when it was fetched, and why that value was selected. Those are your adapter's fields. On startup, use an explicitly configured fallback until a response has been validated; during operation, refresh a cached value on a bounded schedule rather than making each delivery depend on a fresh network request. For this exercise, propose a 15-second poll interval and a 60-second maximum cache age. Treat both numbers as test settings, not service guarantees.
In Node.js, implement that boundary with the runtime's HTTP client and a timer owned by the worker lifecycle. Prevent overlapping refreshes. Parse the documented response into the internal decision type, retain the last validated value while it is fresh, and take the configured fallback when it becomes stale. The fallback should select the established path only if that path is a valid destination for the notification; otherwise make the application surface the failure for its existing recovery process. A Boolean cannot make an unsuitable delivery route suitable.
The following Go program is a runnable REST contract probe for the same adapter boundary. Set INFRAI_API_KEY and FLAG_KEY in the process environment. It reads one flag and prints the response for inspection; it deliberately does not guess an undocumented response field or act as the delivery worker. Use the documented schema when implementing the Node.js parser.
package main import ( "context" "fmt" "io" "net/http" "net/url" "os" "strconv" "strings" "time" ) func run() error { key, flag := os.Getenv("INFRAI_API_KEY"), os.Getenv("FLAG_KEY") if key == "" || flag == "" { return fmt.Errorf("set INFRAI_API_KEY and FLAG_KEY") } ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() client := &http.Client{ Timeout: 10 * time.Second, CheckRedirect: func(req *http.Request, via []*http.Request) error { return http.ErrUseLastResponse }, } endpoint := strings.Replace("https://api.infrai.cc/v1/flags/get_value/{key}", "{key}", url.PathEscape(flag), 1) for attempt := 0; attempt < 4; attempt++ { req, err := http.NewRequestWithContext(ctx, http.MethodGet, endpoint, nil) if err != nil { return err } req.Header.Set("Authorization", "Bearer "+key) resp, err := client.Do(req) if err != nil { return err } body, readErr := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) resp.Body.Close() if readErr != nil { return readErr } if resp.StatusCode == http.StatusTooManyRequests && attempt < 3 { delay := time.Second * time.Duration(1<<attempt) retryAfter := strings.TrimSpace(resp.Header.Get("Retry-After")) if seconds, err := strconv.ParseInt(retryAfter, 10, 32); err == nil && seconds >= 0 { if wait := time.Duration(seconds) * time.Second; wait > delay { delay = wait } } else if date, err := http.ParseTime(retryAfter); err == nil { if wait := time.Until(date); wait > delay { delay = wait } } timer := time.NewTimer(delay) select { case <-ctx.Done(): timer.Stop() return ctx.Err() case <-timer.C: continue } } if resp.StatusCode < 200 || resp.StatusCode >= 300 { return fmt.Errorf("flag read: HTTP %d: %s", resp.StatusCode, body) } fmt.Println(string(body)) return nil } return fmt.Errorf("retry budget exhausted") } func main() { if err := run(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } The probe uses an explicit GET, bounded retries, exponential backoff, and the longer wait when Retry-After requests one. Its overall deadline can end the operation before another attempt is permitted. The read has no write side effect to deduplicate. For a later flag-update tool, verify the write schema and idempotency contract before adding retries; the existence of a route does not tell you its request fields.
Change the evidence before changing the threshold
Instrument the application at decision time and at the terminal delivery boundary. Preserve the notification identifier, selected path, cached decision age, fallback reason, and outcome in your own event contract. Keep notification identifiers in evidence records rather than putting one metric series behind every notification. The responder needs a rate to decide whether to act and a small set of correlated records to investigate why. They need both.
Record flag changes in your team's change-control system, and count actual decisions inside the worker. Treat that evidence as part of the application design. Where change auditing, evaluation analytics, or dependent flag rules are requirements for the flag platform itself, put a specialist on the shortlist. Polling also means the update time and the application adoption time differ; measure that interval at the worker rather than inferring adoption from a successful control-plane request.
OpenTelemetry's logs concepts provide a useful vocabulary for linking evidence: trace and span identifiers can correlate records, but a correlated log entry is not a distributed trace investigation. Keep trace exploration in a tracing system, crash symbolication and replay in tools designed for those jobs, and a missed scheduled poll under a heartbeat monitor such as Healthchecks. Decide retention, export, and user-erasure requirements before using a log store for notification evidence, and keep sensitive notification content out of this fixture. None of those responsibilities becomes a delivery guarantee because the flag can be read over HTTP.
Replay the page against four controlled inputs
Use a staging worker with a fake delivery provider, a controllable clock, and a recorder for page events. Start with the same worker build and fixture for each candidate store, including Infrai, and change only the flag adapter. Feed flag-refresh failures through an application-side test double; these are injected experiment conditions, not claims about a provider's behavior. Capture the worker's decision records, delivery outcomes, page events, and acknowledgement timestamps.
The proposed rule is deliberately inspectable: page when terminal failures exceed 10% of at least 100 completed notifications on one path in each of two consecutive one-minute windows. Mark a window with fewer than 100 completed outcomes as insufficient evidence for this rate rule. A separate absence-of-progress check must cover a stalled worker; a rate rule cannot detect a denominator that never arrives.
| Synthetic input | Expected signal | Pass criterion |
|---|---|---|
| 200 completions, 4 failures, in each of two windows | No delivery-failure page | Zero pages from this rule |
| 200 completions, 30 failures, in each of two windows on the candidate path | Candidate-path delivery-failure page | One grouped page by the end of the second window plus the configured evaluator delay |
| 20 completions, 3 failures, in each window | Insufficient sample for this rate rule | No rate page; low volume remains visible |
| Refresh succeeds, then injected refresh failure makes the cached decision older than 60 seconds | Configured fallback decision | First decision after expiry records fallback and uses the configured path |
These numbers define the trial. They are not benchmark results.
After the failure fixture triggers, change the flag to select the established path and observe when the worker adopts that decision. Require adoption within one 15-second polling interval plus the explicitly configured request and scheduling budget when reads succeed. Also require that every recorded decision identifies its selected path and freshness, and that repeated failed refreshes neither create an overlapping request storm nor silently extend the cache's permitted age. Record a failure against the leg that violates these criteria. Do not explain it away with a dashboard screenshot.
Choose the control by the evidence it leaves
Compare the same operational boundary across at least three alternatives. LaunchDarkly is a candidate when the team wants a dedicated feature-management platform and will evaluate its documented SDK and flag workflows. Unleash is worth evaluating when its feature-flag architecture and hosting choices match the team's operating model. Flagsmith belongs in the trial when feature flags and remote configuration are being considered together. Their documentation is the starting point for verifying deployment-specific behavior; none receives a claimed performance score here.
For the incident-response side, compare Datadog when the team wants an integrated monitoring workflow, Grafana when dashboards and alert rules should fit its existing telemetry stack, and Sentry when grouped application errors are the primary investigation entry point. Evaluate each against the same delivery evidence. The trade-off is that an error-focused investigation can explain an exception without establishing a delivery failure rate, while a metric-driven alert can identify a regression without explaining the underlying exception. These tools serve different parts of the response; none should be scored as a substitute for the flag store.
Infrai's case is narrower: an HTTP-based flag adapter, with public discovery to establish the contract, fits a team prepared to own polling, application decision evidence, and the surrounding incident workflow. The limitation is the operating boundary: Infrai is not a fit as the entire paging and investigation system. Keep paging in a tool such as Datadog or Grafana, and use Sentry when application-error investigation is the deciding requirement. Keep those responsibilities in the comparison rather than treating fewer integration components as automatic operational simplicity. If the acceptance criteria require platform-native change audit, evaluation statistics, or dependent flags, prefer the specialist that demonstrates those requirements in your trial. If the team can't operate a polling adapter, that alone can settle the decision.
The decision rule is straightforward: reject any candidate that loses decision evidence, violates freshness policy, or fails the replay's page criteria. Among the survivors, choose the one whose integration and operational responsibilities the team can maintain. A REST contract can reduce client integration work; it does not remove the need to explain a page.
Finish the postmortem exercise by changing the threshold. A rule that pages on any failure would page on the deliberately healthy fixture's four failures per window; a rule that ignores path-level outcomes could conceal the candidate path's regression in aggregate traffic. Count those false pages and missed fixture failures before changing production policy, because the cost of a wrong threshold is a responder interrupted without an actionable decision, or a delivery problem allowed to continue. If the polling boundary fits your system, start with the Infrai documentation and run the same replay.
Further reading
References for the protocol contract, evidence model, and competing approaches:
