Move between update modes and protocols, and migrate from other feature flag platforms
Last updated November 21, 2026
Migration Guide
Guides for common migration scenarios when working with Flaggr.
Polling to Streaming
@flaggr/sdk polls by default: each evaluation whose cached value has expired asks the data plane. In stream mode the client receives the service's flag configurations over Server-Sent Events, evaluates locally, and applies changes as they're pushed.
Switch the update mode
import { createFlaggr } from '@flaggr/sdk'
// Before: polling (the default)
const client = createFlaggr({
serviceId: 'web-app',
apiKey: 'fgr_your_token',
environment: 'production',
})
// After: streaming, with local evaluation
const client = createFlaggr({
serviceId: 'web-app',
apiKey: 'fgr_your_token',
environment: 'production',
updateMode: 'stream',
})You can also switch a running client with client.setUpdateMode('stream'). With React, pass config={{ serviceId: 'web-app', updateMode: 'stream' }} to FlaggrProvider.
Remove custom polling logic
If you re-evaluated flags on a setInterval, remove it. Subscribe to changes instead with client.onFlagChange(key, listener); the React hooks re-render on their own.
Add connection state monitoring
import { ConnectionState } from '@flaggr/sdk'
client.onConnectionStateChange((state) => {
if (state === ConnectionState.ERROR) {
// Optional: show a notice. The client reconnects with backoff.
}
})In stream mode the client holds every flag configuration of the service, targeting rules included, so in a browser anyone who can read the page can see them. Flags whose rules use operators the data plane doesn't implement (exists, not_exists, in_cohort, not_in_cohort) are still evaluated remotely. See Provider Architecture for the trade-offs between the modes.
REST, Connect-RPC and gRPC
The data plane at https://api.flaggr.dev serves the same evaluations over REST, OFREP, Connect-RPC and gRPC. @flaggr/sdk, Flaggr's Go and Python SDKs and the OpenFeature OFREP providers use REST or OFREP; no Connect-RPC or gRPC client is published. To call those protocols yourself, see Protocols.
From Other Platforms
From LaunchDarkly
See Migrate from LaunchDarkly for the full walkthrough, including targeting rules and operator mapping.
Map concepts
| LaunchDarkly | Flaggr |
|---|---|
| Project | Project |
| Environment | Environment |
| Feature Flag | Feature Flag |
| Targeting Rule | Targeting Rule |
| Segment | Cohort |
| Variation | Variant |
| SDK Key | API Token |
Replace SDK
// Before: LaunchDarkly
import { init } from 'launchdarkly-js-client-sdk'
const client = init('sdk-key', { key: 'user-123' })
const value = client.variation('my-flag', false)
// After: Flaggr
import { createFlaggr } from '@flaggr/sdk'
const client = createFlaggr({
serviceId: 'web-app',
apiKey: 'fgr_your_token',
environment: 'production',
context: { targetingKey: 'user-123' },
})
const value = await client.getBooleanValue('my-flag', false)Import flags
Create the flags in Flaggr with the import endpoint (see Import & Export):
POST /api/flags/importFrom Split.io
Map concepts
| Split.io | Flaggr |
|---|---|
| Workspace | Project |
| Environment | Environment |
| Split | Feature Flag |
| Treatment | Variant |
| Targeting Rule | Targeting Rule |
| Traffic Type | Service |
Replace SDK
// Before: Split
import { SplitFactory } from '@splitsoftware/splitio'
const factory = SplitFactory({ core: { authorizationKey: 'key' } })
const client = factory.client()
const treatment = client.getTreatment('user-123', 'my-split')
// After: Flaggr
import { createFlaggr } from '@flaggr/sdk'
const client = createFlaggr({
serviceId: 'web-app',
apiKey: 'fgr_your_token',
environment: 'production',
})
const value = await client.getStringValue('my-split', 'off', { targetingKey: 'user-123' })Using OpenFeature for Migration
Use the OpenFeature SDK as an abstraction layer. Switch providers without changing your evaluation code.
import { OpenFeature } from '@openfeature/server-sdk'
import { OFREPProvider } from '@openfeature/ofrep-provider'
// Step 1: Start with your current provider
OpenFeature.setProvider(currentProvider)
// Step 2: Switch to Flaggr through its OFREP endpoint
await OpenFeature.setProviderAndWait(new OFREPProvider({
baseUrl: 'https://api.flaggr.dev/api',
headers: [
['Authorization', `Bearer ${process.env.FLAGGR_TOKEN}`],
['X-Service-Id', 'my-service'],
['X-Environment', 'production'],
],
}))
// Your evaluation code stays the same
const client = OpenFeature.getClient()
const value = await client.getBooleanValue('my-flag', false)Without X-Environment, OFREP evaluates in development. See OFREP for the Python and Go providers.
Related
- Quick Start — Initial Flaggr setup
- Provider Architecture — All the ways to evaluate flags
- OFREP Protocol — Standard protocol for interoperability