An application checks a flag
Illustrative exampleNumbers here are illustrative: round figures to reason with, not measurements.
The SDK downloads its environment’s rules at start-up and holds them in memory. isEnabled("new-checkout", runs the ordered rules inside the application in a few microseconds, with no network call. The service doesn’t see checks; its job is keeping that copy current.
The trap is the obvious design: an evaluation service the SDK calls per check. At 10 million checks a second it adds a network hop to every request, and when it is slow or down, every customer’s application is too. A per-user cache in front of it still sends every new user’s first check to the network.
- The application calls
isEnabled("new-checkout",.user) - The SDK runs the rules it holds and returns a variation in microseconds.
- Changes arrive in the background and replace the rules between checks.
Diagram as text
Components: Application code (Service); SDK (Service); Rules in memory (Cache); Stream tier (Service). Connections: Application code → SDK (isEnabled); SDK → Rules in memory (microseconds); Stream tier → Rules in memory (changes), asynchronous.
Read:Learn: Latency budgetingLearn: High-level architecture
- Try it: From a rule change to a flag checkGuided practice · Feature flags, SaaS platform · Mid-level
Check yourself
A page checks 200 flags. How many network calls does that make?
Show answerHide answer
None. Every check runs against the rules the SDK already holds.