| Option | Pick this when | Check before choosing |
|---|---|---|
| Basic flags API | Toggles and percentage rollout cover the release. | Target identity, polling delay, and result monitoring. |
| LaunchDarkly | A managed flag platform fits the release process. | Demonstrate the required targeting and operational controls. |
| Unleash | An open-source flag platform fits the operating model. | Assign deployment ownership and test evaluation behavior. |
| Flagsmith | Flags and application configuration belong together. | Test account identities against the tenant model. |
| Healthchecks | Scheduled jobs need a check-in monitor. | Define the schedule and grace period separately from useful output. |
Gate rollout expansion on useful import results, and distinguish a missed run from an empty run. TL;DR: a simple feature flags API can handle server-side toggles and percentage rollout, while application-owned observations determine whether a B2B SaaS import produced what its tenant expected.
A successful process exit isn't enough.
This field guide uses synthetic import records. The numbers are teaching inputs, not measurements. The setting is a Node.js backend, potentially serving Express requests, that gradually introduces a new scheduled importer. The selection axis is signal quality versus noise: an alert for every zero-result run would interrupt people even when nothing was due.
Diagram in words: tenant identity enters flag evaluation, the chosen importer records its result, and a result policy determines whether to hold expansion. A schedule monitor watches for missing completion records. Notification delivery is another explicit component.
How should a feature flags API handle percentage rollout and user targeting?
Pick LaunchDarkly when evaluating a managed, dedicated flag platform. Its fit depends on the operational controls your team actually needs, so demonstrate those controls with the same tenant identity the importer will use. Buying a platform doesn't establish that your application supplied the right identity.
Pick Unleash when its open-source model suits the team. Deployment ownership becomes part of the selection: decide who maintains the chosen installation and tests application evaluation during control-plane interruptions. Pick Flagsmith when evaluating flags alongside configuration, and use its identity-oriented documentation to check whether a person, account, or tenant should receive the decision. These are different operating choices, not interchangeable product labels.
For simple toggles and percentage rollout, Infrai offers one API key and one bill across backend services, reducing credential sprawl and invoice reconciliation. Its single REST API also has a public, self-describing discovery surface for inspecting request and response contracts. Keep the fit to basic server-side control with polling-based clients; choose a dedicated platform with verified controls when change auditing, evaluation analytics, dependency rules, or deleted-flag recovery are selection requirements.
The flag decision is only half the job.
For the observation side, compare Datadog, Grafana, and Sentry against different questions. Consider Datadog for a broader monitoring workflow, Grafana for a dashboard-centered workflow around your chosen data sources, and Sentry for an error-centered investigation workflow. Require each candidate to demonstrate how your chosen deployment would distinguish a missed scheduled import from a completed import with no useful results. Their monitoring emphasis differs from a dedicated flag platform's release-control emphasis; none can infer your business definition of an expected record from a toggle alone.
Healthchecks is a separate candidate for the check-in question. Keep heartbeat monitoring beside the result policy rather than equating a successful check-in with successful reconciliation. Existing monitoring may be sufficient; adding another system has an operating cost even without discussing prices.
Step 1: Inspect the flag decision without guessing its schema
Use the documented read-only enabled-state route for the selected flag. The complete TypeScript script below reads its endpoint from configuration, checks the response, and prints the returned JSON without assuming undocumented fields. The endpoint must use the verified path shown in the validation. Configure the service's documented HTTPS API origin outside the source file; no credentials belong in the URL.
Save this as inspect-flag.ts and run it with a TypeScript-capable Node.js runtime after setting FLAG_CHECK_URL and INFRAI_API_KEY. This inspects a decision; it doesn't create a flag, configure targeting, or interpret a response field whose contract hasn't been established.
async function main(): Promise<void> { const endpoint = process.env.FLAG_CHECK_URL; const apiKey = process.env.INFRAI_API_KEY; if (!endpoint || !apiKey) { throw new Error("Set FLAG_CHECK_URL and INFRAI_API_KEY"); } const url = new URL(endpoint); if ( url.protocol !== "https:" || url.username || url.password || url.search || url.hash || !/^\/v1\/flags\/is_enabled\/[^/]+$/.test(url.pathname) ) { throw new Error("Use the documented HTTPS enabled-state endpoint"); } const wait = (ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms)); for (let attempt = 0; attempt < 4; attempt++) { const response = await fetch(url, { method: "GET", headers: { Authorization: `Bearer ${apiKey}` }, signal: AbortSignal.timeout(10_000), }); if (response.status === 429 && attempt < 3) { const retryAfter = response.headers.get("retry-after"); const seconds = retryAfter === null ? NaN : Number(retryAfter); const dateMs = retryAfter === null ? NaN : Date.parse(retryAfter); const serverMs = Number.isFinite(seconds) ? Math.max(0, seconds * 1000) : Number.isFinite(dateMs) ? Math.max(0, dateMs - Date.now()) : 0; await response.text(); await wait(Math.max(serverMs, 500 * 2 ** attempt)); continue; } const body = await response.text(); if (!response.ok) { throw new Error(`Flag check failed: ${response.status}: ${body}`); } console.log(JSON.stringify(JSON.parse(body), null, 2)); return; } } main().catch((error: unknown) => { console.error(error); process.exitCode = 1; }); Four attempts is this example's retry budget. The 10-second timeout is a local choice, not a service latency claim. The request is read-only, and rate-limit retries honor a supplied delay while adding exponential backoff. Keep the configured endpoint trusted: the script sends it your credential.
Inspect before integrating.
For an Express application, the server should own evaluation and retain its credential. Before adapting the result to application code, inspect the documented response schema and identity inputs. Percentage rollout support alone does not establish a user-targeting field, and a tenant-scoped scheduled job should not inherit a random browser session's identity.
Step 2: Classify output before sending a notification
The following standalone script uses an application-owned contract. It doesn't represent a vendor response. Save it as import-policy.ts and run it with the same TypeScript-capable runtime. Its assertions establish the decision rule before any notification integration.
import { strict as assert } from "node:assert"; type Result = { completed: boolean; expected: number | null; usable: number; }; function decide(result: Result): string { if (!result.completed) return "check-schedule"; if (result.expected === null) return "investigate-expectation"; if (result.expected > 0 && result.usable === 0) return "hold-rollout"; return "no-output-alert"; } const cases: Array<[Result, string]> = [ [{ completed: true, expected: 80, usable: 0 }, "hold-rollout"], [{ completed: true, expected: 0, usable: 0 }, "no-output-alert"], [{ completed: false, expected: null, usable: 0 }, "check-schedule"], [{ completed: true, expected: null, usable: 0 }, "investigate-expectation"], [{ completed: true, expected: 80, usable: 79 }, "no-output-alert"], ]; for (const [result, expectedDecision] of cases) { const actual = decide(result); assert.equal(actual, expectedDecision); console.log(JSON.stringify({ result, decision: actual })); } Zero needs context.
Here is the concrete trap. Tenant Acme has 80 eligible records in the upstream reconciliation but receives zero usable records after completion; expansion should pause. Tenant Birch has zero eligible records and also receives zero usable records; the same notification would be noise. Tenant Cedar has no completion observation at all, which belongs with schedule monitoring rather than a claim about processed rows. These distinctions depend on a trustworthy denominator. If the source cannot establish what should arrive, preserve an unknown expectation and investigate it instead of silently converting it to zero. Validate counters and tenant ownership at the ingestion boundary before applying this rule.
The 79-of-80 case intentionally passes this narrow check. Partial-loss reconciliation needs a different policy. Calling the decision no-output-alert avoids declaring the entire import healthy.
That's a trade-off: the rule is precise about stopped output, but it doesn't cover every form of bad output.
Before increasing the rollout percentage, replay the cases against candidate and control observations from comparable scheduled slots. Verify that the same tenant keeps its intended assignment across repeated evaluations. Set a polling interval that fits the release team's tolerated propagation delay, then test a flag change through that interval. Capture one evaluated decision at the beginning of a run; changing import behavior halfway through a batch makes its result hard to interpret.
Limits: decide what deserves an interruption
The scripts inspect a flag and classify local observations. They do not deliver notifications, persist completion records, or decide when a job is overdue. Add those components explicitly, including a schedule grace period drawn from the real import deadline. Deduplicate notification candidates by tenant and scheduled slot so polling one failed result doesn't repeatedly interrupt the operator.
A quiet cohort proves little.
If candidate tenants have no expected activity, their zeros cannot establish that the new importer works. Keep cohort membership beside expected activity, and require useful-result evidence before expanding. Alert thresholds should reflect the job the tenant needed done.