Each component controller (for queue and lambda) implements the MakesSnapshot interface, by returning a QueueSnapshot (number of messages in queue) or a LambdaSnapshot (number of concurrent workers running).
The PerformanceMonitor gathers the snapshots from all components into a SnapshotDict (snapshots by component name)
A Policy takes a SnapshotDict and returns a Schedule (which contains the desired number of concurrent workers for each lambda type). A simple implementation is the AlwaysOnePolicy which schedules one concurrent worker for each type.
The SimpleCloudController applies such a Schedule by setting the goal (desired number of workers) on each LambdaController
Branched off
daemon
.Each component controller (for queue and lambda) implements the
MakesSnapshot
interface, by returning aQueueSnapshot
(number of messages in queue) or aLambdaSnapshot
(number of concurrent workers running).The
PerformanceMonitor
gathers the snapshots from all components into aSnapshotDict
(snapshots by component name)A
Policy
takes aSnapshotDict
and returns aSchedule
(which contains the desired number of concurrent workers for each lambda type). A simple implementation is theAlwaysOnePolicy
which schedules one concurrent worker for each type.The
SimpleCloudController
applies such aSchedule
by setting the goal (desired number of workers) on eachLambdaController