LaunchDarkly Server-Side SDK for Node.js
LaunchDarkly's server-side Node.js SDK for evaluating feature flags and streaming config
Repository Health
Technical Analysis
@launchdarkly/node-server-sdk is LaunchDarkly’s official server-side feature-flag SDK for Node.js, published from the launchdarkly/js-core monorepo that houses all of LaunchDarkly’s JavaScript-family SDKs. It initializes an LDClient with an SDK key, streams flag-rule updates over a persistent connection (falling back to polling), and evaluates flags locally against a request-scoped context (user/org/device attributes) without a network round-trip per evaluation. It supports Big Segments for large user-segment targeting, pluggable persistent data stores for multi-instance deployments, event/analytics reporting back to LaunchDarkly, and an LDPlugin extension point. It is the most widely deployed package in the js-core monorepo by a wide margin, ahead of the client-side and OpenFeature-adapter packages published from the same repo.
What You Get
- An
LDClientthat streams (or polls) flag and segment rule updates in the background and evaluates flags in-process, sovariation()calls add no network latency - Context-based targeting — evaluate flags against arbitrary user/org/device attributes, with rule-based rollout percentages and individual targeting overrides
- Big Segments support for targeting very large user segments without loading them all into memory
- Pluggable persistent data stores (Redis, DynamoDB, Consul, and custom implementations) so flag state survives restarts and is shared across multiple server instances
- Built-in analytics event reporting back to LaunchDarkly for flag-evaluation and experimentation data
- SLSA build-provenance verification so teams can confirm published packages match the audited source
Common Use Cases
- Gradual feature rollouts — enabling a new feature for an increasing percentage of users while watching key metrics
- Kill-switch operations — disabling a misbehaving feature in production instantly without a redeploy
- Per-plan or per-tenant entitlements — gating features by attributes like subscription tier attached to the evaluation context
- A/B and multivariate experimentation — serving different variations and reporting evaluation events for analysis
- Coordinated multi-instance deployments — sharing flag state across a fleet of Node.js servers via a persistent data store
Under The Hood
Architecture - LDClientNode (in src/LDClientNode.ts) extends LDClientImpl from the shared @launchdarkly/js-server-sdk-common package with Node-specific platform bindings (platform/NodePlatform.ts, NodeRequests.ts, NodeCrypto.ts, NodeFilesystem.ts), so the flag-evaluation engine, streaming protocol, and event-batching logic live once in the common package and every LaunchDarkly server/edge SDK (Node, Cloudflare, Akamai, Fastly, Vercel) wraps it with a thin platform adapter — this package is the Node.js adapter. Tech Stack - TypeScript, built on @launchdarkly/js-server-sdk-common, launchdarkly-eventsource for the streaming connection, and https-proxy-agent for proxy support; the monorepo is Nx-managed with 1200+ commits and near-daily releases. Code Quality - 13+ Jest test files cover the Node-specific platform layer directly, while the shared evaluation logic is tested once in js-server-sdk-common; the repo also runs cross-SDK contract tests (contract-tests/) against a centralized test harness that verifies flag evaluation, streaming reconnection, and event delivery behave consistently across every LaunchDarkly SDK. API Design - A single init(sdkKey, options) call and client.variation(key, context, defaultValue) cover the common path, with waitForInitialization()/event listeners (ready, update, failed) for startup coordination, keeping the day-to-day API small despite the SDK’s polling/streaming/persistence machinery underneath.
Used by 2 apps in this directory
Kibana
Analytics · Monitoring
Your open source window into the Elastic Stack — query, visualize, and act on data stored in Elasticsearch with real-time dashboards, AI-assisted search, and automated alerting.
Novu
Developer Tools
Open-source communication infrastructure that connects your products and AI agents to every channel your users live on — Inbox, Email, SMS, Push, Chat, and more.