Confidence
  • Documentation
  • Blog
  • Bootcamp
  • Status
  • Confidence Bootcamp
    • My learning
    • Intro to experimentation
      • Introduction
      • Lesson 1: Why you should experiment
      • Lesson 2: Experiment hypothesis
      • Lesson 3: Success and guardrail metrics
      • Lesson 4: Success metrics
      • Lesson 5: Set up your experiment
      • Lesson 6: Calculation frequency
      • Lesson 7: Target audience
      • Lesson 8: Sample size
      • Lesson 9: Quality assurance
      • Lesson 10: Run your experiment
      • Lesson 11: Evaluate your experiment and make a decision
      • Lesson 12: A/B tests and rollouts
      • Course wrap up
    • Intro to metrics
      • Introduction
      • Lesson 1: What is a metric?
      • Lesson 2: Metric roles
      • Lesson 3: Time considerations
      • Lesson 4: Capturing behavior
      • Lesson 5: Strategic metrics
      • Lesson 6: Interpretability
      • Lesson 7: Feasibility and sensitivity
      • Lesson 8: Variance reduction
      • Lesson 9: Select metrics
      • Lesson 10: Segment-level analysis
      • Course wrap up
    • Scientific product development
      • Introduction
      • Lesson 1: Why you should experiment
      • Lesson 2: The scientific method
      • Lesson 3: Randomized controlled trials
      • Lesson 4: Experiment hypothesis
      • Lesson 5: Case study
        • Case study
        • Answers to case study
      • Lesson 6: Why do we need statistics?
      • Lesson 7: Success metrics
      • Lesson 8: Detectable effects and sample size
      • Lesson 9: Make a decision
      • Course wrap up
    • A primer on hypothesis testing
      • Introduction
      • Lesson 1: Introduction to hypothesis testing
      • Lesson 2: True vs estimated effects
      • Lesson 3: Sampling distribution of the difference-in-means estimator
      • Lesson 4: Z-tests and how to reject the null hypothesis
      • Lesson 5: False postive rate and alpha
      • Lesson 6: True positive rate, MDE, and power
      • Course wrap up
    • Intro to Feature Flags
      • Introduction
      • Lesson 1: What is a feature flag?
      • Lesson 2: Lifecycle of a feature flag
      • Lesson 3: Clients
      • Lesson 4: Evaluation context and targeting
    • Sample size calculation - I
      • Introduction
      • Lesson 1: What is the required sample size?
      • Lesson 2: Alpha and power
      • Lesson 3: Baseline mean and variance
      • Lesson 4: Sample size playground - I
    • Sample size calculation - II
      • Introduction
      • Lesson 1: Multi-metric decision making
      • Lesson 2: Number of success metrics
      • Lesson 3: Number of guardrail metrics
      • Lesson 4: Number of comparisons
      • Lesson 5: Sample size playground - II
    • Sample size calculation - III
      • Introduction
      • Lesson 1: Binary metrics
      • Lesson 2: Treatment group proportions
      • Lesson 3: Variance reduction
      • Lesson 4: Sequential testing and sample size
      • Lesson 5: Sample size playground - III
    • Advance your experimentation
      • Introduction
      • Lesson 1: Guardrail metrics with non-inferiority margins
      • Lesson 2: Choose evaluation frequency
      • Lesson 3: Metrics' roles in experiments
      • Lesson 4: Cumulative holdback evaluations
    • Experimentation culture
      • Introduction
      • Lesson 1: Onboarding into experimentation
      • Lesson 2: Empowering experimentation champions
      • Lesson 3: Sustaining the experimentation culture
    • Videos

Lesson 3: Work with Clients

Summary
Learn what clients are and how you can use them to structure your feature flag integrations.

What is a client?

A feature flag is not useful for anyone unless it's consumed. The consumer of this feature flag is not the end user of your product but rather a part of your application. We call this consumer a client. Most feature flagging systems support clients of both backend and frontend types, and most provide SDKs to easily integrate.

In Confidence

In Confidence, every SDK or API integration can be its own client, letting you control which flags are accessible from which part of your application. You add a Confidence client to your code to handle communication with the resolve API.

Best practices

There is no benefit to having multiple systems share a single client. Instead, treat every integration as its own client. This allows for a flexible and future proof approach where frontend clients (using the static paradigm) are not overwhelmed with all the flag data that is only relevant to backend clients.

In other words, by only letting one app access the flags that are relevant to it, you can reduce the overhead of having many flags in your systems.

Example: Manage latency with multiple clients

In Confidence

Consider this example: a single Confidence client is shared across 20 backend services and 3 frontend apps, covering 5 flags. Frontend clients evaluate all flags at startup — say 30 ms. Backend services evaluate one flag at a time. Now the backend team creates 100 new flags, all backend-only. Frontend clients still fetch data for all of them, inflating their startup latency for flags they'll never use. Separating clients per integration avoids this entirely — Confidence clients for frontend and backend stay scoped to their own flags.

Client granularity and security

It's good to have one client per app (backend service or frontend application). With this granularity, you can control the access of individual modules. For instance, you can revoke access to one backend service without stopping all of the others. A single client per app also helps you control what information is exposed to the user. Even if you don't expose all flags directly to the user, any information that reaches a frontend app can be considered exposed. For instance, if you have a flag intended for a backend service called 'enable super secret new feature X' and you use the same client for your frontend, that flag is still fetched and could be introspected by someone snooping around with a browser debugger.

In Confidence

In Confidence, each client authenticates separately with Confidence, giving you granular control to revoke access to individual modules without affecting others.

Note

It's bad to have more than one client per app. Each client acts as its own universe. Multiple clients lead to multiple network requests to fetch flags and keep multiple copies of internal state such as context describing the module.

Reader exercise

What is a client in the context of feature flags?

Reader exercise

Why is it generally recommended to have one client per module in Confidence?

Was this page helpful?

PreviousLesson 2: Lifecycle of a feature flag
NextLesson 4: Evaluation context and targeting

© Copyright 2026. All rights reserved.

Follow us on TwitterFollow us on GitHub

On this page

  1. What is a client?

  2. Best practices

  3. Client granularity and security