Skip to content
Vinh Tran
All projects

CForge

Runtime configuration without redeploying

Period
March 2026 — April 2026
Stack
  • JavaScript
  • Python
  • gRPC
  • Protobuf
  • Redis
  • PostgreSQL
  • React
Configuration injection latency reduced from 45 milliseconds to 8 milliseconds.
Sub-10-millisecond configuration delivery from server to application.
Published to two package registries: npm and PyPI.

The problem

Changing a feature flag or a rate limit should not require a deploy. Most teams either rebuild and ship for a one-line change, or they wire up something ad hoc with an environment variable and a restart.

CForge is a client library plus a server that lets an application read live key-value configuration at runtime. Clients exist for both JavaScript and Python, published to npm and PyPI respectively, so a polyglot stack can share one source of configuration truth.

Getting to 8 milliseconds

The first version read configuration straight from PostgreSQL on every request, which cost about 45 milliseconds. Postgres is the right place for the durable record — it also tracks which users own which projects — but it is the wrong place to serve a read that happens on a hot path.

Adding Redis as the serving layer brought that to 8 milliseconds. Postgres remains the system of record; Redis holds the resolved configuration that clients actually read.

Why gRPC and Protobuf

Client-server communication runs over gRPC with Protobuf-encoded messages. Protobuf keeps the payloads small and, more usefully, makes the configuration schema explicit and versioned — both the JavaScript and Python clients generate from the same definition, so the two implementations cannot drift apart.

Together with the Redis serving layer this delivers configuration from server to application in under 10 milliseconds.

Access control

Authentication goes through Google's Identity Platform rather than a hand-rolled implementation. PostgreSQL tracks the relationships between users and projects, which is what decides who can read or change a given key.

Configuration that can be changed without a deploy is configuration that can be broken without a deploy, so knowing precisely who is allowed to touch what is part of the feature, not an afterthought.