Skip to main content
This topic explains how to configure LaunchDarkly s to run in daemon mode, reading flag data from the persistent store that your Relay Proxy keeps up to date. Each SDK connects to several LaunchDarkly web services. These include services for getting data via streaming or polling, and a service for storing analytics . By default, the SDK connects directly to LaunchDarkly for these services. Daemon mode is a setting on the SDK. In daemon mode, the SDK does not connect to LaunchDarkly or to the Relay Proxy for flag data. Instead, it reads flag data directly from a persistent data store. The Relay Proxy connects to LaunchDarkly and keeps that store up to date. You do not need to change the Relay Proxy’s configuration to support daemon-mode SDKs, other than configuring it to use the persistent store. Before you begin, configure the Relay Proxy to use a persistent data store. To learn how, read Using a persistent store. Then, configure your SDK to use the same data store and to run in daemon mode, as shown in the following examples. To learn more about each SDK’s persistent store options, read Storing data.
Different SDKs have different names for daemon modeWhen you configure the SDK to read flag data from a persistent store, rather than from LaunchDarkly or the Relay Proxy, 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 SDK configuration.
This feature is not available for client-side SDKs because in daemon mode, the SDK connects directly to the Relay Proxy’s data store. This is not a supported behavior for client-side SDKs.

Server-side SDKs

This feature is available for the following server-side SDKs:

.NET (server-side)

Use the DataStore builder method to set a persistent feature store. Then, use the DataSource builder method and Components.ExternalUpdatesOnly to configure daemon mode:
If you are using the newer DataSystem configuration added in .NET SDK 8.11+, use the DataSystem builder with Components.DataSystem().Daemon() to configure daemon mode:

C++ (server-side)

Use LazyLoadBuilder to set a persistent feature store:

Erlang

Set the feature_store property to use a persistent data store. Then set the use_ldd property to configure daemon mode:

Go

Use PersistentDataStore() to set the persistent data store. Then, use ExternalUpdatesOnly() to configure daemon mode:

Haskell

Use configSetStoreBackend to set the persistent data store. Then, use configSetUseLdd to configure daemon mode:

Java

Set the dataStore property to persistentDataStore() to use the persistent data store. Then, set the dataSource property to externalUpdatesOnly() to configure daemon mode:
If you are using the newer DataSystem configuration added in Java SDK 7.11+, use the dataSystem builder with Components.dataSystem().daemon() to configure daemon mode:

Lua

Specify a lazyLoad data source to set a persistent feature store:
To learn more about the configuration options, read clientInit.

Node.js (server-side)

Set the featureStore property to use a persistent feature store. Then, set the useLdd property to configure daemon mode:

PHP

Set the feature_requester property to use a persistent data store and daemon mode:

Python

Set the feature_store property to use a persistent data store. Then, set the use_ldd property to configure daemon mode:

Ruby

Set the feature_store property to use a persistent feature store. Then, set the use_ldd property to configure daemon mode:
If you are using the newer DataSystem configuration added in Ruby SDK 8.12.0+, use the data_system_config option with LaunchDarkly::DataSystem.daemon() to configure daemon mode:

Rust

Using the PersistentDataStoreBuilder, provide a persistent store factory.Enable daemon mode by calling daemon_mode(true) on the ConfigBuilder: