feat(ordo-server): runtime config hot-reload#61
Open
Pama-Lee wants to merge 1 commit into
Open
Conversation
- Add RuntimeConfig struct (audit_sample_rate, tenant defaults, resource limits) - New endpoints: GET/PUT /api/v1/admin/config apply changes without restart - Changes propagate immediately to AuditLogger, TenantManager, RuleStore - NATS broadcast: RuntimeConfigChanged event syncs all cluster nodes atomically - TenantDefaults now hot-reloadable via parking_lot::RwLock - Backward-compatible: all startup config still works; runtime overrides independently
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RuntimeConfigstruct with hot-reloadable fields:audit_sample_rate,default_tenant_qps/burst/timeout_ms,max_rules_per_tenant,max_total_rulesGET /api/v1/admin/config(read current) andPUT /api/v1/admin/config(apply atomically)AuditLogger,TenantManager, andRuleStore— no restart neededRuntimeConfigChangedevent; all reader nodes apply atomicallyTenantDefaultswrapped inparking_lot::RwLockto support concurrent hot updatesAppStategainsruntime_config: SharedRuntimeConfigand a shared NATSsync_txWhat is hot-reloadable
audit_sample_ratedefault_tenant_qps/burst/timeout_msmax_rules_per_tenantmax_total_rulesTest plan
cargo test -p ordo-serverpasses (172 tests)cargo clippy -p ordo-server -- -D warningscleanPUT /api/v1/admin/configwith newaudit_sample_rate, verifyGETreflects changemax_rules_per_tenant, verify subsequent creates are rejected at new limit🤖 Generated with Claude Code