One persistent connection
The Node SDK keeps one long-lived connection per server process instead of doing HTTP eval on every page load.
Next.js + FeatBit
Anonymous browser IDs let you keep the same visitor in the same FeatBit bucket across refreshes, which is what controlled rollout and experimentation actually need.
The Node SDK keeps one long-lived connection per server process instead of doing HTTP eval on every page load.
After initialization, the actual variation lookup is local on the server, which removes the front-end wait you were concerned about.
The page ships the chosen variation in the first HTML response, which avoids the common client-side flicker pattern.
This demo now evaluates flags against a stable anonymous browser user instead of a hard-coded demo identity. As long as the visitor stays on the same browser profile, FeatBit will keep seeing the same user key.
How these values are captured:
1. IP, country, region, and root URL are read from the incoming request on the server, not from browser-side SDK code.
2. Middleware normalizes them into request headers, then the Node SDK evaluation attaches them to the FeatBit user.
3. The anonymous browser key still stays stable, so percentage rollout and experiments remain sticky per browser.
This block is driven by the string flag homepage-hero-variant. Once you create it in FeatBit, the same anonymous browser should stay in the same variant bucket across refreshes.
control
Use FeatBit Node SDK on the server to evaluate once per request and send the chosen UI in the first HTML response.
cost
This variant emphasizes the operational benefit: fewer browser-side waits, fewer moving pieces, and cleaner SSR behavior.
experiment
Anonymous browser IDs let you keep the same visitor in the same FeatBit bucket across refreshes, which is what controlled rollout and experimentation actually need.
FEATBIT_SDK_KEY=your-server-side-environment-secret
FEATBIT_STREAMING_URI=wss://app-eval.featbit.co
FEATBIT_EVENTS_URI=https://app-eval.featbit.co
import { getFeatBitFlags } from "@/lib/featbit/server";
export default async function Page() {
const { flags } = await getFeatBitFlags();
return <pre>{JSON.stringify(flags, null, 2)}</pre>;
}This panel is driven by the boolean flag homepage-show-chat-cta. With your current FeatBit setup, the value returned on the server is false.