Overview
Dynamic config provides:- Runtime Updates: Change settings without restarting services
- Scoped Configuration: Apply settings globally, per-domain, or per-task-list
- Gradual Rollout: Test changes on specific domains before global deployment
- Operational Safety: Tune throttling, timeouts, and limits during incidents
- Multi-Tenancy: Customize behavior per tenant (domain)
Configuration Sources
Cadence supports multiple dynamic config backends:File-Based Configuration
Default backend: YAML file loaded at startup and refreshed periodically. Configuration (config.yaml):
development.yaml):
Database-Based Configuration
Enterprise feature: Store config in Cassandra/SQL for centralized management. Configuration:Environment-Based Overrides
Quick overrides: Use environment variables for specific settings.Configuration Format
Value Structure
Each setting is a list of values with optional constraints:Constraint Types
- domainName: String - Apply to specific domain
- taskListName: String - Apply to specific task list
- taskType: Integer - Apply to task type (0=Decision, 1=Activity)
Constraint Matching
Value is selected if all constraints match exactly:domain=foo, taskList=bar returns 100 (most specific match).
Common Configuration Keys
Throttling and Rate Limits
Frontend Rate Limits
History Service Limits
Matching Service Limits
Timeouts and Retention
Visibility and Search
Archival Configuration
Feature Flags
Key Categories
Configuration keys are organized by component:System-Wide
system.*- Global system settingslimit.*- Global rate limits
Service-Specific
frontend.*- Frontend service settingshistory.*- History service settingsmatching.*- Matching service settingsworker.*- Worker service settings
Feature-Specific
archival.*- Archival configurationvisibility.*- Visibility configurationauthorization.*- Authorization settings
Best Practices
Configuration Management
- Version Control: Track dynamic config files in Git
- Testing: Test changes in development before production
- Documentation: Document non-standard settings and reasoning
- Monitoring: Watch for config-related errors in logs
Performance Tuning
- Start Conservative: Begin with default values
- Measure Impact: Monitor metrics before and after changes
- Gradual Rollout: Test on single domain before global deployment
- Domain Isolation: Use domain-specific limits for noisy neighbors
Operational Safety
- Emergency Response: Keep emergency config changes documented
- Rollback Plan: Test reverting to previous config
- Throttling: Prefer throttling over rejection during incidents
- Validation: Validate config syntax before deployment
Multi-Tenancy
Configuration Discovery
List All Keys
See available dynamic config keys in source code:Key Naming Convention
Keys follow pattern:<component>.<feature><PropertyType>
Examples:
frontend.rps- Frontend RPS limithistory.taskProcessRPS- History task processing ratematching.maxTaskListSize- Matching task list size
Monitoring Dynamic Config
Log Entries
Config changes and errors are logged:Metrics
Monitor config-related metrics:Validation
Verify config is applied:Examples
Gradual Feature Rollout
Emergency Throttling
Custom Timeouts for Workflows
Task List Prioritization
Troubleshooting
Config Not Applied
Problem: Changes to dynamic config have no effect Solution:Constraint Not Matching
Problem: Domain-specific config not applying Solution:Default Values Used
Problem: Seeing “dynamic config not set” warnings Solution:- This is normal for optional configs
- Only add config entries for values you want to override
- Default values are defined in code
Next Steps
- Configure Isolation Groups for zone isolation
- Set up Async Workflow Queues for offloading
- Monitor with Web UI
- Test with Canary and Bench