Local evaluation runs evaluation logic in the SDK, saving you the overhead incurred by making a network request per user evaluation. The sub-millisecond evaluation is perfect for latency-minded systems which need to be performant at scale.
Local evaluation happens outside of Amplitude, which means advanced targeting and identity resolution powered by Amplitude Analytics isn't supported. That said, local evaluation allows you to perform consistent bucketing with target segments, which is often enough.
Feature |
Remote Evaluation | Local Evaluation |
---|---|---|
Consistent bucketing | ✅ | ✅ |
Individual inclusions | ✅ | ✅ |
Targeting segments | ✅ | ✅ |
Amplitude ID resolution | ✅ | ❌ |
User enrichment | ✅ | ❌ |
Sticky bucketing | ✅ | ❌ |
Server-side SDKs can target cohorts if configured to do so. Only User IDs can be targeted by local evaluation cohorts.
SDK | Cohort Targeting | Version |
---|---|---|
Node.js | ✅ | 1.10.0+ |
Ruby | ✅ | 1.5.0+ |
JVM | ✅ | 1.4.0+ |
Go | ✅ | 1.6.0+ |
Python | ✅ | 1.4.0+ |
PHP | ❌ | N/A |
Local evaluation is just evaluation. It's a function which takes a user and a flag as input and outputs a variant.
The SDK loads flag configuration updates from the server on startup and stores them in memory for access before each evaluation. After startup, the SDK begins polling for flag configuration updates from the server.
Local evaluation SDKs track evaluations differently on the client-side vs on the server-side.
Server-side local evaluation experiments often set the Assignment event as a heuristic for Exposure.
The following results are for a single flag evaluation, and were collected over 10 executions of 10,000 iterations of evaluation with randomized user inputs evaluated for 1 flag configuration, selected at random out of 3 possible flag configurations.
SDK | Average | Median | Cold Start |
---|---|---|---|
Node.js | 0.025ms | 0.018ms | 3ms |
Go | 0.098ms | 0.071ms | 0.7ms |
JVM | 0.007ms | 0.005ms | 6ms |
May 21st, 2024
Need help? Contact Support
Visit Amplitude.com
Have a look at the Amplitude Blog
Learn more at Amplitude Academy
© 2025 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.