The idea is that the monitoring (WHAT to monitor and HOW to monitor) is separate from the autoscaling decision.
The autoscaling decision should be a pure mathematical decision.
The various services can interact via Java API(s). In this case the deployment is simple (within the CS management server).
However, the monitoring service likely needs more scale than regular CloudStack orchestration. Ideally there should be the option of running the monitoring service outside of the CS MS.
Responsibilities:
Monitoring service:
- monitor counters in VMs/hypervisors/network appliances
- provide aggregates and threshold crossing outputs
- communicates threshold crossing info to autoscale service
Auto Scale Service
- decides to scale based on policy and threshold crossing info from monitoring service
- communicates with CS MS to perform scale-up/scale-down