Note: This guide uses the Cloud Foundry CLI version 5. The instructions below are not compatible with any cf version > 5. Click here to get a description of the differences between CLI v5 and CLI v6.
Scaling is one of the top features within the anynines Platform as a Service. You can scale your application instances up and down as needed in a matter of seconds. The following list contains the most important commands for scaling your applications including example invocation outputs.
The cf scale command is used for increasing or decreasing the number of running instances of your application or changing the memory provided to these instances:
$>cf scale <application name>
Memory Limit> 256M
Scaling <application name>... OK
The cf health command shows information on how many instances of your application are actually running
$>cf health <application name>
Getting health status... OK
<application name>: running
Using cf instances you can view the status of your application's instances (start date, ip address, port).
$>cf instances <application name>
Getting instances for <application name>... OK
instance #0: running
started: 2013-06-27 07:51:34 PM
console: port 62932 at 18.104.22.168
instance #1: running
started: 2013-06-27 07:51:52 PM
console: port 62620 at 22.214.171.124
The cf stats command provides information about the instances' cpu, memory and disk consumption.
$>cf stats <application name>
Getting stats for <application name>... OK
instance cpu memory disk
#0 0.0% 75.9M of 128M 148.6M of 1G
#1 0.0% 75.9M of 128M 148.6M of 1G
The cf crashes command prints a list of crashed application instances. If your app is running as expected it should print out the following message:
$>cf crashes <application name>
Getting crashed instances for <application name>... OK
!Note! Remember that you can access help information for each cf sub-command by specifying the --help option.
Please sign in to leave a comment.