Identify the cause why the autoscaler 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
 Firehose-to-syslog: https://github.com/cloudfoundry-community/firehose-to-syslog
 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.