For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • Guides
    • Cheatsheets
    • Feature flags
      • Best practices for upgrading users to contexts
      • Creating flags
      • Deciding between flag targeting strategies
      • Defining and targeting mobile applications
      • Feature flag hierarchy
      • Flag conventions
      • Improving flag usage in code
      • LaunchDarkly CLI dev-server reference guide
      • Performing multi-stage migrations with migration flags
      • Reducing technical debt from feature flags
      • Testing code that uses feature flags
      • Using entitlements to manage customer experience
      • Using flags on static sites with JavaScript
      • Using the LaunchDarkly CLI for local testing
      • Using segments and targeting to manage early access programs
    • AgentControl
    • Experimentation
    • Statistical methodology
    • Metrics
    • Infrastructure
    • Account management
    • Teams and custom roles
    • SDKs
    • Integrations
    • REST API
    • Additional resources
Sign inTry it free
LogoLogo
On this page
  • Use bulk targeting when possible
  • Acceptable uses for individual targeting
GuidesFeature flags

Deciding between flag targeting strategies

Was this page helpful?
Previous

Defining and targeting mobile applications

Next
Built with

This guide describes when individual targeting is appropriate and why LaunchDarkly recommends bulk targeting. It also explains how the SDK uses big segments to support scalable and efficient targeting.

Use bulk targeting when possible

Do not target individual contexts unless absolutely necessary. This approach can create outdated rules and add to flag debt.

Targeting more than 10,000 individual contexts in an environment can also affect performance. Large targeting payloads increase SDK initialization time.

Instead, we recommend using big segments or attribute-based targeting. Those options are simpler and more efficient than maintaining and scaling other types of targeting.

To learn more, read SDK and integration configuration for segments, How big segment caching works, and Targeting rules.

Acceptable uses for individual targeting

There are three scenarios where individual targeting may be preferable to other types of targeting:

  1. Edge cases: Occasionally, a customer might fall into an edge case that requires a feature flag to be toggled just for them. This is acceptable. However, if you’re a large organization with hundreds or thousands of such users, you’ll likely have dozens or hundreds of flags, too. In these cases, it’s better to use big segments or target by attribute to ensure scalability.
  2. Short-lived troubleshooting: It’s common to enable a flag for a specific customer to troubleshoot an issue or provide temporary access to a gated aspect of your app. Scheduled flag removal helps ensure that the targeting settings don’t exist longer than necessary. This use case typically doesn’t require large-scale targeting, and can be addressed with targeting by attribute instead. Even if you exceed the 10,000 individual targets limit, this type of targeting is usually so short-lived it rarely justifies switching to big segments.
  3. Facilitating early adoption: Individual targeting can address the needs of teams that are still setting up their infrastructure. Teams that are still setting up their infrastructure may use individual targeting as an interim measure until they can implement a scalable solution.