BlogRight arrowDeveloper Productivity
Right arrowCyberArk: How integrating LaunchDarkly made feature management effortless
Backspace icon
Search iconClose icon

MAY 09 2025

CyberArk: How integrating LaunchDarkly made feature management effortless

How we integrated LaunchDarkly into our service— backend and frontend.

CyberArk: How integrating LaunchDarkly made feature management effortless featured image

Sign up for our newsletter

Get tips and best practices on feature management, developing great AI apps, running smart experiments, and more.

Subscribe
Subscribe

This is a guest post originally published on the CyberArk Engineering blog.

You’ve just rolled out a new feature for internal testing, confident that it’s safely hidden from your customers. But to your surprise, you start receiving feedback from users who have somehow discovered the feature before its official launch.

Anxiety rises as you rush to figure out how this happened and how to stop your “unreleased” feature from reaching more users.

If only you had a feature flag to control who could access the feature, ensuring it remained visible only to your internal stakeholders. This is where feature management comes in, providing the tools to manage feature visibility and avoid unexpected surprises.

In this article, we’ll define what feature management is and explore why we need it. Then we’ll look at how LaunchDarkly helps with feature management, different ways to integrate LaunchDarkly into an application, the particular approach I used, and why I chose it. By the end, you’ll have a clear understanding of how to integrate LaunchDarkly into your tech stack, and why it can be a breakthrough for controlled feature releases.

What is feature management?

Feature management is a technique that allows teams to enable, disable, or modify features dynamically without changing code or redeploying applications, enabling gradual releases, A/B testing, and instant rollbacks.

This is typically done using feature flags (also called feature toggles)—configuration-based switches that control whether a feature is active for a specific user, group, or environment.

At its core, feature management is about configuration — deciding whether to show or hide features remotely without requiring a new deployment. It returns boolean values or other conditions to determine feature availability. Feature flags can be managed using a simple database, AWS Config, or specialized tools, like LaunchDarkly, Unleash, or Flagr.

Why is feature management important?

Releasing new features quickly while minimizing risk is a challenge for any development team. Rolling out new functionality to all users at once can introduce bugs, cause unexpected production issues or downtime, and sometimes even require rollbacks.

Feature management offers several advantages, including:

  • Gradual rollouts. Release new features to a small group before making them available to everyone.
  • A/B testing & experimentation. Test different versions of a feature and measure user engagement.
  • Instant rollbacks. Quickly disable problematic features without redeploying.
  • Targeted releases. Activate features only for specific users, regions, or premium customers.

Instead of relying on outdated feature branches or risky deployments, feature management allows teams to ship code faster while controlling feature availability.

LaunchDarkly UI for specific flag

In modern software development, feature management is critical for delivering new functionality safely and efficiently. LaunchDarkly is a feature flag management platform that allows teams to control feature releases dynamically without redeploying code.

With LaunchDarkly, developers can:

  • Gradually roll out new features to specific users or groups.
  • Perform A/B testing and gather insights before full deployment.
  • Enable/disable features instantly without modifying the codebase.
  • Mitigate risks by rolling back features instantly in case of issues.

Options for targeting rules for the current feature flag

Traditional feature deployment often requires code changes, deployments, and downtime. LaunchDarkly removes these constraints by decoupling feature releases from deployments, allowing teams to ship code faster while keeping control over feature exposure.

Options for Integrating LaunchDarkly

There are several approaches for integrating LaunchDarkly into an application, depending on your architecture and security requirements:

1. SDK Integration (client-side & server-side)

LaunchDarkly provides SDKs for various languages (JavaScript, React, Python, Go, etc.) to evaluate feature flags in real time.

  • Client-Side SDK: Runs in the browser or mobile app; great for UI-driven feature flags.
  • Server-Side SDK: Runs in backend services; best for secure and controlled evaluations.

2. API-based integration

Instead of using SDKs, you can query the LaunchDarkly REST API to fetch flag values. This is useful for microservices, CI/CD pipelines, and event-driven architectures.

3. Relay proxy

For improved performance, LaunchDarkly offers a Relay Proxy that acts as a middle layer between your services and the LaunchDarkly servers, reducing API calls and improving response times.

4. Infrastructure & CI/CD Integration

LaunchDarkly can also be integrated into Kubernetes, Terraform, and CI/CD pipelines, allowing teams to manage infrastructure as code using feature flags

In the next section, I’ll explain my chosen approach, why I used it, and how it fits into my application’s architecture.

How we integrated LaunchDarkly in our service— backend and frontend

When designing our feature management solution, we aimed to support both backend and frontend feature flag evaluations while keeping the integration centralized, efficient, and secure. To achieve this, we implemented a feature management handler unit class in a shared repository that handles the core responsibilities of working with LaunchDarkly.

Architecture—both backend and frontend uses

This approach provides several advantages:

  1.  Centralized SDK key management. Instead of handling multiple SDK keys across different services, we store and retrieve the LD SDK key for the relevant environment from the AWS Parameter Store. This ensures that each environment uses a single key, improving security and maintainability.
  2. Optimized LaunchDarkly client initialization. The handler class initializes the LaunchDarkly client in a consistent and reusable manner, preventing redundant client creations across different services.
  3. Flexible feature flag evaluation. The handler supports:
  4. Fetching all feature flags for a given service and user (or without user context).
  5. Evaluating a specific feature flag dynamically, either for a user-specific scenario or a system-wide check.
  6. Backend feature flag usage. When used in backend services, the handler is simply imported, and the relevant feature flag evaluation function is called. This keeps backend services lightweight, as they don’t need to handle SDK initialization directly.
  7. Frontend feature flag access via API. Since frontend environments should not expose LD SDK keys directly, we introduced a dedicated Lambda function that retrieves all feature flags based on the relevant user or group of users, as defined by the configuration. The frontend accesses these flags through an API, and the flags are stored in a React Context, allowing easy access across the application.

This code might appear as follows:

# Using context for calling the get feature flag API
<FeatureFlagsContextProvider>
  <AppComponent />
</FeatureFlagsContextProvider>


# Some component
const { featureFlags } = useContext(FeatureFlagsContext);
if (featureFlags['myFeatureFlag']) {
  return (
    <MyFeatureFlagComponent />
)
}
  1. Minimizing cold starts with provisioned concurrency. To ensure the Lambda function remains responsive, we have enabled Provisioned Concurrency. This keeps a set number of Lambda instances warm and ready to serve requests, reducing latency and eliminating cold starts, especially for user-facing frontend requests.

Why should you use this approach?

LaunchDarkly is user-friendly and intuitive, making it easy to see and understand the status of each feature flag and which feature flags we have in the system overall. Working with the SDK is particularly convenient, as the calls are easy to understand. They also support a proxy server that ensures that we have a backup for our flags and reduces our call times, resulting in the fastest possible response time. The overall advantages:

  • Unified feature flag handling. Both the backend and frontend rely on the same logic for retrieving and evaluating feature flags.
  • Security & key management. By managing the LD SDK key in the Parameter Store, we avoid exposing it in frontend environments.
  • Scalability & maintainability. Centralizing the logic in a shared repo means any updates to how feature flags are handled only need to be made in one place.
  • Frontend compatibility. Since the frontend cannot directly use the LD SDK (due to security constraints), the API Gateway + Lambda approach ensures all flags are accessible remotely without compromising security.
  • Low latency & high availability. Provisioned concurrency ensures that feature flag evaluations remain fast and reliable by keeping Lambda instances warm and ready to handle requests at all times.

This architecture allows us to efficiently manage feature flags across both backend and frontend, ensuring a consistent, scalable, and secure integration with LaunchDarkly—while also maintaining low-latency performance for end users.

Like what you read?
Get a demo
Previous
Next