Subsystem 01
Management console
Create flags, set rollout percentages and target user segments
Typical stack
Next.js + PostgreSQL
Reference architecture
Feature flags and A/B experiments evaluated in application memory, so a flag check never waits on the network and keeps working when the flag service is down.
Design constraints
Targets for the scenario this reference is sized for. A real engagement starts by replacing them with your own numbers.
Component topology
Subsystems with separate responsibilities, clear contracts between them and storage that scales on its own. The stack named for each is typical, not mandatory.
Stack topology
High-performance feature flagging and experimentation engine
Illustrative reference architecture
Management console
Create flags, set rollout percentages and target user segments
Next.js + PostgreSQL
Streaming distribution
Pushes rule updates to application servers over SSE
Server-Sent Events (SSE) / Redis Pub/Sub
In-memory client SDK
Evaluates targeting rules locally in application memory
Go / TypeScript / Python SDKs
Experimentation analytics
Bayesian significance on conversion metrics
ClickHouse + dbt
Subsystem 01
Create flags, set rollout percentages and target user segments
Typical stack
Next.js + PostgreSQL
Subsystem 02
Pushes rule updates to application servers over SSE
Typical stack
Server-Sent Events (SSE) / Redis Pub/Sub
Subsystem 03
Evaluates targeting rules locally in application memory
Typical stack
Go / TypeScript / Python SDKs
Subsystem 04
Bayesian significance on conversion metrics
Typical stack
ClickHouse + dbt
Data lifecycle
An engineer rolls a feature out to 20% of users in the management console.
The change is written to PostgreSQL and broadcast over Redis Pub/Sub to the SSE servers.
SDKs hold persistent SSE connections and update their in-memory rules as changes arrive.
On each request, the SDK computes MurmurHash3(user_id + flag_key) % 100 locally, in microseconds.
Evaluation events are buffered and flushed asynchronously to ClickHouse for significance tracking.
Reliability and resilience
Failure mode 01
Mitigation
SDKs cache rule sets on local disk and keep evaluating flags from the last-known rules.
Failure mode 02
Mitigation
Automatic reconnection with exponential backoff, falling back to the last-known-good rules.
Failure mode 03
Mitigation
An AST-based linter in CI reports flags that are fully rolled out or retired.
Questions
A network call per flag check adds a round trip, often tens of milliseconds, to every request that checks a flag, and makes the flag service a dependency of every page. Local evaluation takes microseconds and keeps working when that service is down.
MurmurHash3 is deterministic: the same user ID and flag key always produce the same hash, so a user lands in the same bucket on every request as long as the flag key and the variant split stay the same.
Send us your requirements, expected load and budget. We'll reply within one business day with an honest read on the design, and on whether we're the right team to build it.