Feedback Control
A control-theory concept that uses feedback to regulate systems, ensuring stability, setpoint achievement, and disturbance rejection.
Classification
- ComplexityMedium
- Impact areaTechnical
- Decision typeArchitectural
- Organizational maturityIntermediate
Technical context
Principles & goals
Use cases & scenarios
Compromises
- Stable systems can be destabilized by incorrect rules.
- Lack of transparency in automated interventions complicates root cause analysis.
- Dependence on measurement infrastructure introduces new failure points.
- Roll out incrementally and test first in non-critical areas.
- Introduce comprehensive observability and explainable logs for decisions.
- Configure conservative default parameters and safety limits.
I/O & resources
- Real-time metrics and telemetry
- Defined setpoints and SLOs
- Mechanisms to execute control commands (actuators)
- Control commands to actuators or configurations
- Metrics for evaluating control behavior
- Logs and audit trails of interventions
Description
Feedback control is a conceptual pattern from control theory that measures and adjusts system behavior via feedback to achieve setpoints or reject disturbances. It defines measurement, comparison and corrective-action loops and supports stability and robustness. It is applicable across software architecture, operations and product quality.
✔Benefits
- Increased stability through automatic disturbance compensation.
- Improved SLO adherence via continuous adjustment.
- Reduced manual intervention and faster response times.
✖Limitations
- Requires reliable, clean metrics; poor data causes miscontrol.
- Designing controllers can be complex and technically demanding.
- Overreaction and oscillation possible with unsuitable parameters.
Trade-offs
Metrics
- Control error
Difference between setpoint and actual value over time; core metric to evaluate control quality.
- Control-loop latency
Time between measurement and execution of corrective action; affects stability and responsiveness.
- Oscillation/overshoot
Amplitude and frequency of oscillations after a disturbance; indicator of over-control.
Examples & implementations
PID loop for latency control
A simple PID controller adjusts request rate to a service based on measured latency.
SLO-based autoscaler
An autoscaler uses SLO deviations as feedback to dynamically increase or decrease pods.
Queue length regulation
A controller reduces input to a queue when lengths reach a critical threshold.
Implementation steps
Instrumentation: Define and implement relevant metrics and measurement points.
Design: Choose setpoints, tolerances and control strategy (e.g. PID, throttling).
Integration: Connect actuators and implement safe interfaces.
Validation: Test behavior under load and disturbances and fine-tune parameters.
⚠️ Technical debt & bottlenecks
Technical debt
- Missing or insufficient telemetry hinders later adoption.
- Hardcoded control parameters in legacy components.
- No versioning of control strategies and missing tests.
Known bottlenecks
Misuse examples
- Auto-scaling solely based on user count without considering latency
- Controller with too high gain causing persistent oscillations
- Decisions made without audit logging, hiding root causes
Typical traps
- Ignoring delays in measurement and actuator paths.
- Non-robust parameters that only work in lab conditions.
- Neglecting safety and compliance aspects of interventions.
Required skills
Architectural drivers
Constraints
- • Reliable measurement infrastructure must be available.
- • Control algorithms must not jeopardize system stability.
- • Privacy and access rights for metric data must be respected.