Back to blog

FeatureGate

Engineering

Local evaluation depends on a boring snapshot contract

A runtime SDK should not need the network in the middle of a flag check.

FeatureGate treats a flag check as application logic, not as a remote procedure call.

That means the SDK needs a complete enough snapshot to answer locally. The runtime API serves active flags, environment defaults, and ordered targeting rules for the environment bound to the key. The SDK keeps that data in memory and asks the application for fallback values when something is missing or mismatched.

Why the contract matters

The snapshot contract keeps latency predictable. It also gives the runtime a smaller security boundary: the key is bound to a project environment, and the server never needs project or environment URL parameters to decide what the key can see.

The API still matters, but it sits on the sync path. The hot path stays inside the process that is already serving the user.