- Pivotal Cloud Foundry (PCF) Autoscaler
Identify the cause why the Autoscaler is not scaling when expected.
The first thing we need to ascertain is whether the relevant metrics (HttpStartStop, originating from gorouter) are reaching the firehose, where the Autoscaler collects them. In order to do that, we'd like to nozzle the firehose of the test environment for `HttpStartStop` and then siege the tested application.
Metrics may not be passed to Autoscaler if loggregator system is undersized or metrics are being lost.
Follow these steps to validate Autoscaler functionality:
- ssh to the affected system
- Install the cf-nozzle plugin located at: `https://github.com/cloudfoundry-attic/firehose-plugin`
- Run cf app-nozzle <app_name> -f HttpStartStop
- In a separate window, run `watch cf apps`:
- Run the test: ab -n 3000 -c 10 <app URL>/entries
- Many messages scroll through your cf app-nozzle window (if metrics are being received)
- You should observe application scaling.
If metrics are not reaching Autoscaler, then it is recommended to review the loggregator system which passes metrics as log messages. Oftentimes missing metrics are indicative of the problem in the loggregator system. See the following articles:
Why Loggregator may lose logs: https://discuss.pivotal.io/hc/en-us/articles/223207207-Why-Loggregator-may-lose-logs
Scaling Loggregator: http://docs.pivotal.io/pivotalcf/1-12/loggregator/log-ops-guide.html#scaling
Loggregator Message Throughput and Reliability: https://docs.pivotal.io/pivotalcf/1-12/loggregator/log-ops-guide.html#throughput-reliability
Calculate Loggregator Throughput: https://discuss.pivotal.io/hc/en-us/articles/225564028-How-to-Calculate-the-Loggregators-Message-Throughput
Installing cf cli: https://docs.run.pivotal.io/cf-cli/install-go-cli.html.