Sabin Kharel.
← Back

Feb 2026

Designing Configurable Systems That Don’t Collapse in Production

How to design config-driven systems with schema discipline, layering, and production safety.

Most configurable systems fail because they allow too much freedom without structure.

You need constraints.

Core Principles

1. Define a strict schema

Avoid arbitrary key-value structures.

Use TypeScript or JSON schema:

type FeatureConfig = {
  enabled: boolean;
  retryCount: number;
  timeoutMs: number;
};

2. Layer your config

Do not rely on a single config.

Use layers:

Merge order: default → env → customer

3. Version your config

Add versioning:

{
  "version": 2,
  "features": {}
}

Handle old versions explicitly.

4. Validate at boundaries

Validate:

Fail fast.

5. Build controlled admin UI

Avoid raw JSON editing.

Use:

6. Audit changes

Track:

7. Cache with invalidation

When NOT to use config

If config becomes hard to read, you have overdone it.

Designing Configurable Systems That Don’t Collapse in Production | Sabin Kharel