Imagine there is a web service (let's say Twitter) that handles tons of requests from around the world. I want to figure out how to let the web service pick a certain amount of (let's say 1 billion) requests within a full month, smoothly. By "smoothly" it means I prefer not to have a solution that picks the very first 1 billion requests of the month then becomes idle. The distribution of the picked requests should roughly match the distribution of real traffic. However, the traffic to Twitter is always fluctuating and hard to predict beforehand (e.g., in the case of Superbowl) so I would like to apply a PID controller as below:
Setpoint: number of requests I gonna pick for the next time interval
Input: number of requests I actually pick for the next time interval
Setpoint can be set as (1 billion monthly goal - how many have I picked so far in the month) / number of time intervals left. Input is obviously simply an observation value.
Here come the parts I am confused: what should be the choice of actuator and process, and how to interpret the PID formula output? According to these videos on PID controller (1, 2):
- In the case where you want to control a quadcopter s.t. it hovers on a certain height, propellers are the actuators and the drone is the process that is lifted by propellers. If the output is x, you set the RPM to x.
- In the case where you want to control a bot s.t. it stops in a spot 50m away, robot feet are the actuators and the robot is the process that is driven by its feet. If the output is x, you set its speed (m/s) to x.
With a similar thought, in the system I describe, I want to consider a simple filter that picks any incoming request by a rate
r as the actuator, and the process is the web service itself. But there can be of course many other options to pick the actuator and the process function.
Am I correct that: PID itself does not care about the actuator and the process. It is nothing more than a formula that takes in a set of parameters and observation values, then give you the "output". It is your call to pick an (actuator, process) combination and interpret the output accordingly, either RPM / speed(m/s) / filter rate r.