- Go
- Java
- JavaScript/TypeScript
- Python
- Rust
How It Works
The local resolve provider periodically fetches the resolver state for a given client from Confidence. This state contains all flags, segments, targeting rules, and bloom filters for that client. When your application evaluates a flag, the provider resolves it locally against the cached state. This approach provides fast, predictable response times and removes the dependency on network availability at evaluation time.SDK Configuration
Configure the local resolve provider in your SDK. For example, with the JavaScript server SDK:Materialized Segments
Local resolve providers support materialized segments via bloom filters. When a materialized segment contains up to ~100,000 entities, the resolver state includes its bloom filter and the provider checks membership locally. Larger segments fall back to key-value store lookup over the network. Bloom filters require no additional setup—Confidence builds and delivers them automatically as part of the resolver state.Sticky Assignments
If you want to use sticky assignments with a local resolver, you need access to a low latency key-value storage that can store mappings between entity IDs and variants. Reach out to Confidence support for more information!Self-Hosted Resolver
As an alternative to SDK providers, you can run a self-hosted resolver in your network. The resolver exposes the flag resolution API over HTTP. Configure your SDKs to use the resolve URL you host instead of the Confidence managed resolver. You can operate it as a standalone service or run the container as a sidecar alongside your application. Run it as a sidecar when each application instance needs a resolver onlocalhost.
The self-hosted resolver downloads encrypted flag state from a state URI created in Confidence. It decrypts and caches the state in memory. By default, it checks for updates every 30 seconds and keeps the last successfully loaded state if a refresh fails.
The self-hosted resolver does not support bloom filters for materialized segments. It requires a low latency key-value store for materialized segment lookups.
http://localhost:8090. Configure the SDK to use it:
Create API Client Credentials
The resolver uses API client credentials to authenticate with Confidence and report operational data.1
Go to API clients
In Confidence, select Admin, then select API clients under Identity and access management.
2
Create an API client
Select Create and enter a name, such as “self-hosted resolver.”
3
Assign the resolver role
Go to Admin > Policies and create a policy for the API client. Assign the Flags Resolver Sidecar role.
4
Store the credentials
Store the client ID and client secret in your secret manager.
Flags Resolver Sidecar is the current name of the predefined role. The role applies whether you deploy the resolver as a shared service or a sidecar.
Create a Resolver Configuration
The resolver configuration provides an encrypted state file. Confidence keeps the state file up to date as your flags and targeting rules change.1
Go to self-hosted resolver configurations
In Confidence, select Admin, then select Self-hosted resolver configurations under Identity and access management.
2
Create a configuration
Select Create configuration, enter a display name, and select Create.
3
Store the deployment values
Copy the state URI and reveal the encryption key. Store both values in your secret manager.
Run With Docker
Save the four deployment values inconfidence-resolver.env:
http://localhost:8090.
The example uses the Europe Artifact Registry mirror. You can instead use the Asia or United States mirror:
asia-docker.pkg.dev/spotify-confidence/public/flags-resolver-sidecar:latestus-docker.pkg.dev/spotify-confidence/public/flags-resolver-sidecar:latest
Deploy in Kubernetes
You can run the resolver as a shared Kubernetes service or as a sidecar. The following example adds it as a sidecar to an existing pod:ETag in conditional requests. An HTTP 304 Not Modified response skips the reload. If a later refresh fails, the resolver continues to use the last successfully loaded state.
Rotate State Credentials
Rotate the state URI and encryption key without interrupting flag resolution:1
Start credentials rotation
Open the menu for the active configuration and select Start credentials rotation. The existing configuration remains published.
2
Create the replacement
Create a replacement configuration and store its state URI and encryption key.
3
Deploy the replacement values
Update your resolver deployment. Confirm that every instance is ready and uses the replacement configuration.
4
Complete the sunset
Open the retiring configuration’s menu and select Complete sunset.
Stop Apply Log Propagation
By default, the resolver sends apply logs to Confidence for exposure and experiment analysis. SetCONFIDENCE_SEND_APPLY_LOGS to false to keep apply data within your network.
The resolver continues to accept and validate ApplyFlags requests. It doesn’t send assignment events or apply distinct counts to Confidence. It continues to send aggregate operational metadata, including the apply request rate.
This setting doesn’t disable resolve telemetry or resolver-state synchronization. For more information, see Data Transfer.
Related Resources
Manage API Clients
Manage API clients and credentials
Materialized Segments
Bloom filters and local segment resolution
Data Transfer
Understand data flow options
SDKs Reference
SDK configuration options

