/

Scale Policy


A Scale Policy defines simple rules for scaling a NodeGroup. Generally we have two types of scaling activities: scale-in (contracting a group) and scale-out (expanding a group). A scale policy helps with how to scale-in / scale-out a group. Policies are stored on Stream Manager data store.

Scale policy defines an important set of parameters such as minimum number of nodes, maximum number of nodes etc.Each of these parameters is configurable per instance role (origin/edge/relay/transcoder).

A scale policy template looks like this:

 {
    "policy": {
        "name": "<policy-name>",
        "description": "<policy-description>>",
        "type": "<policy-type>",
        "version": "<policy-version>",
        "targets": {
            "region": [{
            "name": "default",
                "target": [{
                    "role": "<role>",
                    "minLimit": "<min-node-count>",
                     "maxLimit": "<max-node-count>",
                    "scaleAdjustment": "<node-scale-adjustment>"
                 }]
            }]
        }
    }
 }

For more information on working with scale policies checkout Stream Manager API Documentation