Server-side local evaluation runs evaluation logic on your server, 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 does not automatically set experiment user properties. If you use local evaluation and you want to run experiments where success metrics are analyzed, you will need to implement exposure tracking (generally done on the client-side).
To more easily track exposures on the client-side, bootstrap the client-side SDK with the variants evaluated server-side and utilize automatic exposure tracking using one of the analytics SDK integrations.
Because local evaluation happens outside of Amplitude, advanced targeting and identity resolution powered by Amplitude Analytics is not supported. That said, local evaluation allows you to perform consistent bucketing with target segments, which is sufficient in many cases.
|Remote Evaluation||Local Evaluation|
|Amplitude ID resolution|
The only non-local part of local evaluation is getting flag configurations from Amplitude Experiment, but this can happen at an interval, and flags can be cached in-memory on the server-side for zero latency access.
Local evaluation is only supported by server-side SDKs which have local evaluation implemented.
|SDK||Remote Evaluation||Local Evaluation||Version|
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.