Data saving mode is available for Early AccessData saving mode is supported in the SDKs listed below. It is also supported in the Relay Proxy.Data saving mode is only available to members of LaunchDarkly’s Early Access Program (EAP). If you want access to this feature, join the EAP.
Server-side SDKs
This feature is available in the following SDKs:File initializers provide startup data but do not initialize the SDKWhen you configure a custom data source, a file initializer provides an initial set of flag data so your application can begin evaluating flags at startup. However, the SDK itself does not reach an initialized state from using the file initializer alone. The SDK is fully initialized only after it uses a streaming or polling synchronizer to connect to LaunchDarkly and obtain a complete set of flag data.The examples in this topic all pair a file initializer with a synchronizer. If you configure a file initializer without a synchronizer, your flags still load and evaluate correctly, but the SDK does not report itself as initialized. In this case, evaluate flags directly without gating your application’s startup on the SDK initialization status. As a best practice, we recommend not blocking application startup on SDK initialization in any configuration, so your application can start in a degraded but functional state and rely on fallback values until the SDK is ready.A file initializer reads the same file format as the file-based data source, including the
flags and flagValues formats. To learn about the file format, read Reading flags from a file..NET (server-side)
Expand .NET (server-side) SDK code sample
Expand .NET (server-side) SDK code sample
To enable data saving mode:We recommend the standard data system configuration for most customers. It uses a combination of streaming and polling to initialize the SDK, provide real time updates, and switch between streaming and polling automatically to provide redundancy.To learn more, read
- If you are using the Relay Proxy, upgrade your Relay Proxy to version 9.0.0-rc.1 or later.
- Upgrade your .NET (server-side) SDK to version 8.11 or later.
- Update your SDK configuration to enable the
DataSystemconfiguration option.
DataSystem configuration option:Standard setup
Relay proxy with LaunchDarkly API fallback
File-based bootstrap with live updates
File-based bootstrap works in regulated or connectivity-restricted environmentsFile-based bootstrap works in production for organizations with compliance-driven restrictions on outbound connections to LaunchDarkly servers.If you use a file initializer in production, you must keep the file in sync with flag changes you make in the LaunchDarkly UI. LaunchDarkly does not update it for you.
DataSystemModes for information about pre-configured data system modes, and DataSystemBuilder for information on additional configuration options.C++ (server-side)
Expand C++ (server-side) SDK code sample
Expand C++ (server-side) SDK code sample
To enable data saving mode:We recommend the standard data system configuration for most customers. It uses a combination of streaming and polling to initialize the SDK, provide real time updates, and switch between streaming and polling automatically to provide redundancy.To learn more, read
- If you are using the Relay Proxy, upgrade your Relay Proxy to version 9.0.0-rc.1 or later.
- Upgrade your C++ (server-side) SDK to version 3.12 or later.
- Update your SDK configuration to enable the
DataSystemconfiguration option.
DataSystem configuration option:Standard setup
Relay Proxy with LaunchDarkly API fallback
DataSystemBuilder for information on additional configuration options.Go
Expand Go SDK code sample
Expand Go SDK code sample
To enable data saving mode:We recommend the standard data system configuration for most customers. It uses a combination of streaming and polling to initialize the SDK, provide real time updates, and switch between streaming and polling automatically to provide redundancy.To learn more, read
- If you are using the Relay Proxy, upgrade your Relay Proxy to version 9.0.0-rc.1 or later.
- Upgrade your Go SDK to version 7.11 or later.
- Update your SDK configuration to enable the
DataSystemconfiguration option.
DataSystem configuration option:Standard setup
Relay proxy with LaunchDarkly API fallback
File-based bootstrap with live updates
File-based bootstrap works in regulated or connectivity-restricted environmentsFile-based bootstrap works in production for organizations with compliance-driven restrictions on outbound connections to LaunchDarkly servers.If you use a file initializer in production, you must keep the file in sync with flag changes you make in the LaunchDarkly UI. LaunchDarkly does not update it for you.
DataSystem. For information on additional configuration options, read DataSystemConfiguration.Java
Expand Java SDK code sample
Expand Java SDK code sample
To enable data saving mode:We recommend the default data system configuration for most customers. It uses a combination of streaming and polling to initialize the SDK, provide real time updates, and switch between streaming and polling automatically to provide redundancy.To learn more, read
- If you are using the Relay Proxy, upgrade your Relay Proxy to version 9.0.0-rc.1 or later.
- Upgrade your Java (server-side) SDK to version 7.11 or later.
- Update your SDK configuration to enable the
dataSystemconfiguration option.
dataSystem configuration option:Standard setup
Relay proxy with LaunchDarkly API fallback
File-based bootstrap with live updates
File-based bootstrap works in regulated or connectivity-restricted environmentsFile-based bootstrap works in production for organizations with compliance-driven restrictions on outbound connections to LaunchDarkly servers.If you use a file initializer in production, you must keep the file in sync with flag changes you make in the LaunchDarkly UI. LaunchDarkly does not update it for you.
DataSystemModesfor information about pre-configured data system modes, and DataSystemBuilder for information on additional configuration options.Node.js (server-side)
Expand Node.js (server-side) code sample
Expand Node.js (server-side) code sample
To enable data saving mode:We recommend the To learn more, read
- If you are using the Relay Proxy, upgrade your Relay Proxy to version 9.0.0-rc.1 or later.
- Upgrade your Node.js (server-side) SDK to version 9.10 or later.
- Update your SDK configuration:
- Enable the
dataSystemconfiguration option. - Migrate existing
LDOptionsfields. The following existing options were previously top-levelLDOptionsfields and are part of thedataSystemconfiguration as of version 9.10:persistentStore,stream,streamInitialReconnectDelay,pollInterval,useLDD.
- Enable the
dataSystem configuration option:Standard setup
standard data source option for most customers. It uses a combination of streaming and polling to initialize the SDK, provide real time updates, and switch between streaming and polling automatically to provide redundancy.File-based bootstrap with live updates
File-based bootstrap works in regulated or connectivity-restricted environmentsFile-based bootstrap works in production for organizations with compliance-driven restrictions on outbound connections to LaunchDarkly servers.If you use a file initializer in production, you must keep the file in sync with flag changes you make in the LaunchDarkly UI. LaunchDarkly does not update it for you.
dataSystem. For information on additional configuration options, read LDDataSystemOptions.Python
Expand Python SDK code sample
Expand Python SDK code sample
To enable data saving mode:We recommend the standard data system configuration for most customers. It uses a combination of streaming and polling to initialize the SDK, provide real time updates, and switch between streaming and polling automatically to provide redundancy.To learn more, read
- If you are using the Relay Proxy, upgrade your Relay Proxy to version 9.0.0-rc.1 or later.
- Upgrade your Python SDK to version 9.13 or later.
- Update your SDK configuration to enable the
DataSystemconfiguration option.
DataSystem configuration option:Standard setup
Relay proxy with LaunchDarkly API fallback
File-based bootstrap with live updates
File-based bootstrap works in regulated or connectivity-restricted environmentsFile-based bootstrap works in production for organizations with compliance-driven restrictions on outbound connections to LaunchDarkly servers.If you use a file initializer in production, you must keep the file in sync with flag changes you make in the LaunchDarkly UI. LaunchDarkly does not update it for you.
ldclient.datasystem. For information on additional configuration options, read DataSystemConfig.Ruby
Expand Ruby SDK code sample
Expand Ruby SDK code sample
To enable data saving mode:We recommend the standard data system configuration for most customers. It uses a combination of streaming and polling to initialize the SDK, provide real time updates, and switch between streaming and polling automatically to provide redundancy.To learn more, read
- If you are using the Relay Proxy, upgrade your Relay Proxy to version 9.0.0-rc.1 or later.
- Upgrade your Ruby SDK to version 8.12.0 or later.
- Update your SDK configuration to enable the
data_system_configconfiguration option.
data_system_config configuration option:Standard setup
Relay proxy with LaunchDarkly API fallback
File-based bootstrap with live updates
File-based bootstrap works in regulated or connectivity-restricted environmentsFile-based bootstrap works in production for organizations with compliance-driven restrictions on outbound connections to LaunchDarkly servers.If you use a file initializer in production, you must keep the file in sync with flag changes you make in the LaunchDarkly UI. LaunchDarkly does not update it for you.
LaunchDarkly::DataSystem. To learn more about additional configuration options, read DataSystem::ConfigBuilder.Rust
Expand Rust SDK code sample
Expand Rust SDK code sample
To enable data saving mode:We recommend the standard data system configuration for most customers. It uses a combination of streaming and polling to initialize the SDK, provide real time updates, and switch between streaming and polling automatically to provide redundancy.To learn more, read
- If you are using the Relay Proxy, upgrade your Relay Proxy to version 9.0.0-rc.1 or later.
- Upgrade your Rust SDK to version 3.3 or later.
- Update your SDK configuration to enable the
data_systemconfiguration option.
data_system configuration option:Standard setup
Relay Proxy with LaunchDarkly API fallback
DataSystemBuilder for information on additional configuration options.Client-side SDKs
Client-side SDKs in data saving mode use the same data system pipeline as server-side SDKs, adapted to the lifecycle and connectivity characteristics of the client environment. SDKs may switch between connection modes automatically in response to application lifecycle events and network state changes. Some client-side SDKs use streaming when the application is active or in the foreground for real-time flag updates, and switch to polling or reduce activity when the application is backgrounded or hidden. This feature is available in the following SDKs:- Android
- Flutter
- JavaScript
- React Native
- React Web
- Vue: The Vue SDK relies on the JavaScript SDK for this functionality.
Android
Expand Android SDK code sample
Expand Android SDK code sample
To enable data saving mode:We recommend the standard data system configuration for most customers. It uses a combination of streaming and polling to initialize the SDK, provide real time updates, and switch between streaming and polling automatically to provide redundancy.To disable lifecycle-driven switching but continue switching modes when network connectivity changes:To learn more, read
- Upgrade your Android Client SDK to version 5.13 or later.
- Request to join the Early Access Program. Wait to receive confirmation from LaunchDarkly that data saving mode is enabled for your account.
- Update your SDK configuration to enable the
dataSystemconfiguration option.
dataSystem configuration option:Standard setup
Automatic mode switching
The Android Client SDK switches between connection modes automatically based on app lifecycle and network connectivity. You can disable automatic switching entirely, or selectively disable lifecycle-driven or network-driven switching.To disable automatic switching entirely and keep the SDK in a single connection mode regardless of lifecycle or network changes:Components.dataSystem(). To learn more about additional configuration options, read DataSystemBuilder.Flutter
Expand Flutter SDK code sample
Expand Flutter SDK code sample
To enable data saving mode:We recommend the standard data system configuration for most customers. The Flutter SDK uses streaming in the foreground for real-time flag updates and reduces activity in the background, and switches between connection modes automatically as the app moves between the foreground and background.To learn more, read the
- Upgrade your Flutter SDK to version 4.20 or later.
- Request to join the Early Access Program. Wait to receive confirmation from LaunchDarkly that data saving mode is enabled for your account.
- Update your SDK configuration to enable the
dataSystemconfiguration option.
dataSystem configuration option:Standard setup
Set a fixed connection mode
To keep the SDK in a single connection mode instead of letting it manage the connection, set the initial connection mode. This applies as a sticky override that suppresses automatic mode switching until you clear it withsetConnectionMode:launchdarkly_flutter_client_sdk API documentation.JavaScript
Expand JavaScript SDK code sample
Expand JavaScript SDK code sample
To enable data saving mode:We recommend the standard data system configuration for most customers. The JavaScript SDK opens a streaming connection for real-time flag updates, and falls back to polling when streaming is unavailable.To learn more, read
- Upgrade your JavaScript SDK to version 4.9 or later.
- Request to join the Early Access Program. Wait to receive confirmation from LaunchDarkly that data saving mode is enabled for your account.
- Update your SDK configuration to enable the
dataSystemconfiguration option.
dataSystem configuration option:Standard setup
Set a fixed connection mode
To keep the SDK in a single connection mode instead of letting it manage the connection, use manual mode switching and set the initial connection mode:LDOptions.dataSystem.React Native
Expand React Native SDK code sample
Expand React Native SDK code sample
To enable data saving mode:We recommend the standard data system configuration for most customers. The React Native SDK uses streaming in the foreground for real-time flag updates and polling in the background, and switches between connection modes automatically as the app moves between the foreground and background.To learn more, read
- Upgrade your React Native SDK to version 10.19 or later.
- Request to join the Early Access Program. Wait to receive confirmation from LaunchDarkly that data saving mode is enabled for your account.
- Update your SDK configuration to enable the
dataSystemconfiguration option.
dataSystem configuration option:Standard setup
Automatic mode switching
By default, the React Native SDK switches between connection modes automatically based on app lifecycle. To disable automatic switching entirely and keep the SDK in a single connection mode regardless of lifecycle changes:LDOptions.dataSystem.React Web
Expand React Web SDK code sample
Expand React Web SDK code sample
The React Web SDK is built on the JavaScript SDK, so it supports the same We recommend the standard data system configuration for most customers. The React Web SDK opens a streaming connection for real-time flag updates, and falls back to polling when streaming is unavailable.To learn more, read
dataSystem configuration. Pass the option through the provider’s ldOptions.To enable data saving mode:- Upgrade your React Web SDK to version 4.2 or later.
- Request to join the Early Access Program. Wait to receive confirmation from LaunchDarkly that data saving mode is enabled for your account.
- Update your SDK configuration to enable the
dataSystemconfiguration option.
dataSystem configuration option:Standard setup
Set a fixed connection mode
To keep the SDK in a single connection mode instead of letting it manage the connection, use manual mode switching and set the initial connection mode:LDReactClientOptions.Vue
Expand Vue code sample
Expand Vue code sample
The Vue SDK relies on the JavaScript SDK for data saving mode, so it supports the same
dataSystem configuration. Set the option in ldOptions when you install the plugin or create a provider.