Skip to content
checkgate-shPublic

Repository files navigation

Checkgate — Ship with confidence. Roll out with control. Open-source, self-hosted feature management with local evaluation and real-time synchronization.

CI Latest release @checkgate/node on npm License: Apache 2.0 Documentation

Documentation · Quickstart · SDKs · Self-hosting · Changelog

Checkgate is open-source, self-hosted feature management. Turn a feature on for a percentage of users, target it by any attribute, require approval before a production change, and turn it off again with one switch — from the dashboard, the REST API or Terraform.

Feature flags without the round-trip. Each SDK keeps your environment's flags in memory and evaluates them inside your process with the same Rust engine, so a flag check makes no network request. One Server-Sent Events connection per SDK delivers changes as they happen, with reconnects, a polling fallback and the last known flags if the server is unreachable. You run the server, PostgreSQL and Redis on your own infrastructure.

Important

Upgrading a 0.1.31 server to 0.2.0? Read Upgrading to 0.2.0 first: two database migrations, no rolling upgrade, back up the database before you start.

How it works

How Checkgate works. Sync path: a flag changes in the dashboard or API; the Checkgate server commits it to PostgreSQL, fans it out to every server instance through Redis, and pushes it over a Server-Sent Events stream to each SDK, which reconnects with backoff and polls the snapshot only if a stream cannot be established. Evaluation path: your code calls isEnabled(), and the SDK answers from its local flag store with its Rust engine, inside your process, with no network request.

The server distributes configuration; it never evaluates your application's flag checks. If the stream drops, the SDK keeps serving the last flags it received. See Architecture and Reliability.

Quickstart

You need Docker (running) and Node.js 22 or later. From a clone, one script starts a local, development-only Checkgate, completes setup, creates the flag new-checkout (on for the pro plan) and writes an SDK key to quickstart/.env:

git clone https://github.com/checkgate-sh/checkgate.git && cd checkgate
./quickstart/start.sh --seed
cd quickstart/node && npm install && node --env-file=../.env index.mjs

The example evaluates the flag in-process and prints new-checkout: user-pro=true user-free=false. Sign in at http://localhost:3000 with the printed credentials, switch new-checkout off, and the running example prints the new answer without a restart. ./quickstart/start.sh --down removes everything.

The script runs the latest published image and generates throwaway secrets; never reuse its settings outside your machine. Python, troubleshooting and what the script does: Five-minute quickstart. For a real deployment: Getting started and Self-hosting.

In your own code:

import { CheckgateClient } from '@checkgate/node'

const client = new CheckgateClient({
  serverUrl: 'http://localhost:3000',
  sdkKey: process.env.CHECKGATE_SDK_KEY!,
})
await client.connect()

client.isEnabled('new-checkout', 'user-123', { plan: 'pro' }) // local: no network request

Why Checkgate

  • Local evaluation. Flags are evaluated in memory by the SDK, so a flag check adds no network latency, and keeps answering from the last known flags while the server is unreachable.
  • Real-time synchronization. Changes reach connected SDKs over SSE, with heartbeats, silent-stream detection, reconnects with backoff, a polling fallback and per-flag revision ordering. How sync works.
  • Controlled rollouts and governance. Targeting rules, reusable segments, prerequisites, multivariate flags and sticky percentage rollouts; per-environment change requests with self-approval blocked, scheduled changes, an audit log, scoped tokens and webhooks.
  • Self-hosted. One Rust server binary with PostgreSQL and Redis, or an all-in-one image. Apache 2.0. Your flags and users stay on your infrastructure; browser and mobile SDKs download their environment's rules, as any local-evaluation SDK does.

SDKs and integrations

Runtime Package Status
Node.js @checkgate/node (NAPI) npm 0.2.0
Browser @checkgate/web (WebAssembly) npm 0.2.0
React Native @checkgate/react-native (JSI) npm 0.2.0 · Android build verified in CI; iOS not certified
Flutter checkgate_flutter (FFI) pub.dev 0.2.0 · bundles no engine: you build and link it
Python checkgate (PyO3) PyPI 0.2.0 · new in 0.2.0; CPython 3.11+
OpenFeature @checkgate/openfeature-provider (Node.js server) npm 0.2.0 · new in 0.2.0
Express · Fastify · NestJS @checkgate/node-integrations npm 0.2.0 · new in 0.2.0
SSR / edge @checkgate/ssr, @checkgate/edge npm 0.2.0
Typed flags @checkgate/cli npm 0.2.0
AI agents @checkgate/mcp-server npm 0.2.0 · new in 0.2.0 · read-only by default; can propose, never apply or approve
Infrastructure as code Terraform / OpenTofu provider, Kubernetes operator build from source

Every SDK runs the same evaluation engine and checks the same shared test vectors. Also new in 0.2.0: the evaluation playground (what an SDK would answer for a user, and why) and SDK diagnostics. Which packages your stack needs: Which SDK do I need?

Performance

Checkgate v0.1.31 performance, measured on a 4-core laptop with the server limited to 1 vCPU and 512 MiB, each figure next to v0.1.30 measured in the same session: Node SDK isEnabled() median 1.0 µs (v0.1.30: 7.2 µs); 591 req/s snapshot throughput at 1,000 concurrent clients, median of runs (v0.1.30: 489); 1.51 ms server CPU time per request (v0.1.30: 1.92 ms), peak RSS 59 MiB; update propagation p99 198 ms at 1,000 SDK clients pooled over 6 runs, p50 39 ms, median run p99 84 ms (v0.1.30: 75 ms), none of 1.2 million deliveries missed.

Measured on a v0.1.31 release candidate (commit 66cbfec) on a 4-core Intel laptop in desktop use, with the server in Docker limited to 1 vCPU / 512 MiB; v0.1.30 was measured in the same session with runs alternated. 3 runs per measurement, 6 for propagation. The pooled p99 of 198 ms includes two runs made while the host was still loaded; the methodology explains why. These figures describe that machine and workload, not a guarantee for yours. v0.2.0 was compared with v0.1.31 in a controlled A/B on a 6-CPU Linux workstation: no measured regression above 10 %; Rust-core rule matching and weighted variants are 2.7–4.6 % slower (2–10 ns per evaluation), everything else unchanged (CHANGELOG). Methodology, every run and the raw data: Public benchmarks.

Infrastructure cost

Checkgate v0.1.31 infrastructure cost, measured on one server limited to 1 vCPU and 512 MiB with PostgreSQL and Redis: 10,000 streaming clients held at 14.7 % of one core and 448 MiB idle, with 6.5 KB of heartbeats per client per hour. For 1,000 clients, streaming needs 8.7 GB of traffic a month (calculated) and delivers a change in 33 ms (p50); polling every 60, 30 or 10 seconds needs 669, 1,340 or 4,020 GB and leaves flags 30, 15 or 5 seconds stale (p50). Projected at AWS us-east-1 list prices accessed 2026-11-19: $38.56 a month for 100 to 10,000 streaming clients, and $89.80, $150.08 or $390.94 for 1,000 clients polling. A projection, not a quote; polling here returns the whole flag set every time.

Measured, calculated and projected figures are kept apart, and PostgreSQL and Redis are included. Prices are dated list prices, not a quote. Method, assumptions and sources: Infrastructure cost and efficiency.

Dashboard

Checkgate dashboard overview: flag counts, rollout status and recent activity Flag editor with targeting rules, tags, owner and a prerequisite flag
Overview — flag counts, rollout status and recent activity. Flag editor — targeting rules, rollout percentage, ownership and prerequisites.
Pending change requests awaiting a second reviewer Change requests — a second reviewer approves changes in protected environments; self-approval is blocked.

Screenshots of the v0.1.31 dashboard with example data. More in the dashboard guide.

Documentation

Contributing

Issues and pull requests are welcome; see CONTRIBUTING.md.

License

Apache License 2.0.

Releases

Used by

Contributors

Languages