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
This guide explains your options for working with LaunchDarkly without a supported SDK for your tech stack. LaunchDarkly supports a variety of SDKs for client-side and server-side development. To review the complete list, read Available SDKs. If the tech stack your organization uses is not in this list, you have several options. Your options include:- Using the Relay Proxy and polling against it
- Writing your own SDK wrapper
- Writing your own SDK
- Requesting support for your tech stackThis guide describes each option, why you might use it, how to employ it, and some of its advantages and disadvantages.
Prerequisites
To complete this guide, you must have the following prerequisites:- A tech stack that is not compatible with our available SDKs. If we have an SDK for your language or platform, you should use that instead of any of the strategies described in this guide.
In some cases, a supported SDK exists for your technology, but isn’t specifically built for your technology. For example, we have a JavaScript SDK and SDKs for a few common JavaScript frameworks. But we don’t have specific SDKs for every JavaScript framework.If you are using a framework for which we don’t yet have a specific SDK, then using the existing supported SDK for your underlying technology should be the first option you consider.
- An understanding of the differences between server-side, client-side, and edge SDKs. The SDK types have different security considerations as well as some behavioral and architectural differences. To learn more, read Choosing an SDK type.
- Familiarity with making REST requests. Several of the options expose SDK functionality through REST endpoints. If you choose one of these options, you should be comfortable making REST requests from within your application.
- A basic understanding of the Relay Proxy, and why it might or might not be a good fit for your organization. One of the options involves polling against the Relay Proxy. If you are interested in this option, you should evaluate whether using the Relay Proxy makes sense for you. To learn more, read The Relay Proxy.
Using the Relay Proxy and polling against it
If your tech stack is not compatible with our available SDKs, one option is to use the Relay Proxy and poll against it.Understanding the Relay Proxy option
The Relay Proxy is a small Go application that connects to the LaunchDarkly streaming API and proxies that connection to clients within an organization’s network. It lets multiple servers connect to a local stream instead of making a large number of outbound connections to LaunchDarkly’s streaming service. Adding the Relay Proxy to your LaunchDarkly configuration introduces architectural complexity, so it’s not for every organization. If you want to evaluate feature flags without an SDK, the Relay Proxy provides endpoints for evaluating all feature flags for a given context, and you can use these instead. The Relay Proxy endpoints for evaluating feature flags for a given context are equivalent to the polling endpoints for client-side or mobile SDKs, but can be used whether you are looking for a server-side or client-side SDK.The endpoints require a base64-encoded context in the request endpoint in order to return feature flag names and the resulting variants for that context. The endpoints use the SDK key as a credential. Remember that the SDK key should be kept secret. To learn more, read Keys.Implementing the Relay Proxy option
If you choose this option, the first step is to set up the Relay Proxy. To learn how, read Using the Relay Proxy. To evaluate all flag values for a given context, you have two options:- You can make a GET request to your Relay Proxy at the
/sdk/evalx/contexts/{contextBase64}endpoint, where{contextBase64}is the base64-encoded JSON object for the evaluation context. - You can make a REPORT request to your Relay Proxy at the
/sdk/evalx/contextendpoint, and include the evaluation context JSON object in the request body. In both cases, you must pass anAuthorizationheader with your SDK key as part of the request. For the REPORT request, you also need aContent-Typeheader. You might choose to use a REPORT request over a GET request so that the evaluation context is in the request body, where it is less likely that it will be accessible to monitoring and logging tools. Here’s how:
https://your-relay-proxy.com:8030 is the local URI and port for your Relay Proxy. Depending on your configuration, your address may be different.
base64Encodingshould be replaced with the base64-encoded JSON object for the evaluation context, for example, the encoding for{"kind": "user", "key": "example-context-key", "name": "Sandy"}.To learn more, read Special flag evaluation endpoints in the Relay Proxy GitHub documentation.
Evaluating the Relay Proxy option
Using the Relay Proxy and polling against its endpoints is our recommended choice for production use if there is not an officially supported SDK for your technology. Using the provided endpoints means you don’t have to write your own SDK or SDK wrapper, which can save significant time and resources both for startup and for maintenance. However, using the Relay Proxy comes with its own benefits and drawbacks. If you are not already using the Relay Proxy, then setting up and configuring the Relay Proxy just so you can poll against it means additional infrastructure to maintain as part of your application. To learn more, read Relay Proxy use cases. Additionally, polling against the Relay Proxy will result in much more traffic to your Relay Proxy than there would be with typical usage through one of our supported SDKs. To learn more, read Scaling guidelines.Writing your own SDK wrapper
LaunchDarkly does not provide support for this option. We do provide some resources and guidance, described below.You should consider carefully whether using an unsupported option is appropriate for your organization.
Writing your own SDK
LaunchDarkly does not provide support for this option. We do provide some resources and guidance, described below.You should consider carefully whether using an unsupported option is appropriate for your organization.