Description
The config module validates environment variables at startup using envalid, but there is no validation of runtime configuration changes (e.g. feature flags, dynamic limits). Config values are read once and cached.
Current behavior
Config is loaded once at startup. Any runtime changes require a full server restart.
Expected behavior
- Support hot-reload for non-critical config (feature flags, rate limits, thresholds)
- Add config change notification to subscribers (e.g. rate limiter updates)
- Validate config changes before applying (same schema as startup)
- Log config changes with old/new values for audit trail
Suggested approach
Add a config watcher that periodically checks a Redis key or config file for changes. Use an event emitter pattern to notify subscribers when config changes. Keep startup-critical config (DB, Redis) as cold-reload only.
Labels
infrastructure, api, good first issue
Description
The config module validates environment variables at startup using envalid, but there is no validation of runtime configuration changes (e.g. feature flags, dynamic limits). Config values are read once and cached.
Current behavior
Config is loaded once at startup. Any runtime changes require a full server restart.
Expected behavior
Suggested approach
Add a config watcher that periodically checks a Redis key or config file for changes. Use an event emitter pattern to notify subscribers when config changes. Keep startup-critical config (DB, Redis) as cold-reload only.
Labels
infrastructure, api, good first issue