Control Theory Applies to Software Systems
The same mathematical framework that governs thermostats, cruise control, and industrial processes can be applied to software: measure the output, compare it to a target, and apply a corrective action. Simple controllers, used iteratively, can manage systems you do not fully understand.
"Instead of relying on detailed understanding of the controlled system, feedback systems rely on the ability to apply corrective actions repeatedly and quickly." Philipp Janert, Feedback Control for Computer Systems
Feedback control requires remarkably little knowledge of the system being controlled. You need only two things: the direction of the relationship between input and output (does increasing the input drive the output up or down?) and the approximate magnitude of the quantities involved. This is what makes feedback control so powerful and so different from the "feedforward" approach of building a detailed model and computing the perfect action in advance.
The PID controller (proportional-integral-derivative) is the workhorse of control theory. The proportional term corrects based on the current error. The integral term accumulates past errors to eliminate persistent drift. The derivative term anticipates future errors by tracking the rate of change. In practice, most software systems do well with just PI control, because derivative control amplifies noise. Software systems also have a unique advantage: unlike physical plants, they offer a choice of time you can synchronize control actions with events rather than wall-clock intervals, eliminating a source of delay.
But there are important caveats. Feedback control is not optimization it has no notion of finding the "best" settings. It tracks a reference signal, nothing more. Choosing the right setpoint is a separate problem entirely. And multidimensional control adjusting multiple inputs to control multiple outputs simultaneously is dramatically harder than scalar control, because changing one input typically affects several outputs at once. When possible, decouple the problem into independent scalar loops.
Takeaway: You do not need to fully understand a system to control it you need fast feedback, the right signal, and the discipline to make small corrections often rather than large corrections rarely.
See also: Leading Indicators Beat Lagging Ones | Delays in Feedback Loops Cause Oscillation and Overshoot | Latency Sneaks Up On You