Documentation Index
Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Each SDK connects to several LaunchDarkly web services. These include services for getting feature flag data via streaming or polling, and a service for storing analytics events. By default, the SDK connects directly to LaunchDarkly for these services. If you are using the Relay Proxy, you must configure the SDK so that it connects to the Relay Proxy for these services instead. To use the Relay Proxy in daemon mode, you must first configure your server-side SDK to use a persistent data store. The SDK and the Relay Proxy must use the same data store. To configure your SDK to use a persistent data store, read Storing Data. Then, you must configure your SDK to use daemon mode, as shown in the following examples. When you use the Relay Proxy in daemon mode, the SDK must not connect to any service for flag data.When you configure the SDK so that it connects to the Relay Proxy, rather than to LaunchDarkly, for getting feature feature flag data, this mode has different names in different SDKs and SDK versions.Some versions of the SDKs refer to this as using “external updates only.” Other versions of the SDKs refer to this as “LDD mode,” because the Relay Proxy was previously known as the LaunchDarkly Daemon. Some SDKs, such as the C++ (server-side) SDK, refer to this mode as “lazy load,” because flag data is loaded from the persistent store lazily, on demand as the SDK requests it. In most SDKs, you then need to pass the configuration in as a parameter when you initialize the client. To learn more, read Configuration.
Server-side SDKs
This feature is available for the following server-side SDKs:- .NET (server-side)
- C++ (server-side)
- Erlang
- Go
- Haskell
- Java
- Lua
- Node.js (server-side)
- PHP
- Python
- Ruby
- Rust
.NET (server-side)
Expand .NET (server-side) code sample
Expand .NET (server-side) code sample
Use the If you are using the newer DataSystem configuration added in .NET SDK 8.11+, use the
DataStore builder method to set a persistent feature store. Then, use the DataSource builder method and Components.ExternalUpdatesOnly to configure daemon mode:DataSystem builder with Components.DataSystem().Daemon() to configure daemon mode:C++ (server-side)
Expand C++ (server-side) code sample
Expand C++ (server-side) code sample
Use
LazyLoadBuilder to set a persistent feature store:Erlang
Expand Erlang code sample
Expand Erlang code sample
Set the
feature_store property to use a persistent data store. Then set the use_ldd property to configure daemon mode:Go
Expand Go code sample
Expand Go code sample
Use
PersistentDataStore() to set the persistent data store. Then, use ExternalUpdatesOnly() to configure daemon mode:Haskell
Expand Haskell code sample
Expand Haskell code sample
Use
configSetStoreBackend to set the persistent data store. Then, use configSetUseLdd to configure daemon mode:Java
Expand Java code sample
Expand Java code sample
Set the If you are using the newer DataSystem configuration added in Java SDK 7.11+, use the
dataStore property to persistentDataStore() to use the persistent data store. Then, set the dataSource property to externalUpdatesOnly() to configure daemon mode:dataSystem builder with Components.dataSystem().daemon() to configure daemon mode:Lua
Expand Lua code sample
Expand Lua code sample
Specify a To learn more about the configuration options, read
lazyLoad data source to set a persistent feature store:clientInit.Node.js (server-side)
Expand Node.js (server-side) code sample
Expand Node.js (server-side) code sample
Set the
featureStore property to use a persistent feature store. Then, set the useLdd property to configure daemon mode:PHP
Expand PHP code sample
Expand PHP code sample
Set the
feature_requester property to use a persistent data store and daemon mode:Python
Expand Python code sample
Expand Python code sample
Set the
feature_store property to use a persistent data store. Then, set the use_ldd property to configure daemon mode:Ruby
Expand Ruby code sample
Expand Ruby code sample
Set the If you are using the newer DataSystem configuration added in Ruby SDK 8.12.0+, use the
feature_store property to use a persistent feature store. Then, set the use_ldd property to configure daemon mode:data_system_config option with LaunchDarkly::DataSystem.daemon() to configure daemon mode:Rust
Expand Rust code sample
Expand Rust code sample
Using the
PersistentDataStoreBuilder, provide a persistent store factory.Enable daemon mode by calling daemon_mode(true) on the ConfigBuilder: