3 ms·
How exactly does the api work? Is every call to check a flag making a HTTP request to LD or does the ld client sync periodically?
by yclept 10y ago
How exactly does the api work? Is every call to check a flag making a HTTP request to LD or does the ld client sync periodically?
- pkaeding 10y agoNo, every call to check a flag is not making any sort of network connection. The flag ruleset (includes details like specific users that should get each variation, or particular user attributes that should indicate a specific variation, or a percentage rollout) is streamed to the SDK in a long-lived background connection. The SDK maintains these rulesets in memory, and when you need to evaluate a flag for a given user, the ruleset is evaluated. This way, there is no I/O at the time that a rule is evaluated, so there is no real performance impact. At the same time, because of the way we stream the rulesets to the SDK, any rule changes take effect immediately. https://launchdarkly.com/performance.html https://launchdarkly.com/performance.html has some diagrams, etc, detailing this (sorry for the marketing fluff :)
- yclept 10y agoGreat, we will be looking at applying this in a new project of ours, and replace our existing feature flag implementations in other systems if things work out.