Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
stylenone

Providing autoscaling related parameters

A set of parameters are provided to calibrate the elasticity of the system. This is done in the following manner based on the type of service:

...

It is possible to set a limit to the number of service instances that are maintained in the system at any given time. It is done by setting the min_app_instances  parameter for any service cluster and the autoscaler will ensure that the system will not scale down below that even though there is no considerable service requests in-flight.


Control over Instances

The user can set the max_app_instances parameter for any service cluster   to control the number of instances that the autoscaler can start.  The autoscaler ensures that the system will not scale up above the limit specified even though there is a high load of requests in-flight. W hen you pay for the instances that you  start-up  it is very useful to set the  max_app_instances  parameter .


Autoscaling test

The following is a simple autoscaling test based on a PHP Cartridge:  

  1. Load the Stratos2 CLI tool and subscribe to the PHP Cartridge as follows.:

    Code Block
    stratos>subscribe php nirmal -min 1 -max 5

    Execution of the above command will result in starting up a PHP service instance with a GIT repo.


  2. Push a PHP application to the GIT repository, created just for you.
    You can add a PHP application for testing purposes that does nothing other than sleep for 30 seconds. Seconds after committing your app, you should be able to access it.
  3. Write a small JMeter test script to load your PHP application.
    After awhile you should notice that the nodes are scaling up (provided you loaded the PHP application heavily). You should also notice, when the load test is over the extra nodes scaling down.