/

Scale Policy Example


POST

https://streammanager.com/streammanager/api/3.1/admin/configurations/scalepolicy?accessToken=xyz123
{
      "policy": {
          "name": "largeevent01",
          "description": "3rd generation scale policy file with one each origin edge relay",
          "type": "com.red5pro.services.autoscaling.model.ScalePolicyMaster",
          "version": "0.0.3",
          "targets": {
              "region": [
                  {
                      "name": "default",
                      "target": [
                          {
                              "role": "edge",
                              "estimatedWarmUpTime": 150000,
                              "maxLimit": 2500,
                              "scaleAdjustment": 1,
                              "coolDownPeriod": 180000,
                              "minLimit": 100
                          },
                          {
                              "role": "origin",
                              "estimatedWarmUpTime": 150000,
                              "maxLimit": 100,
                              "scaleAdjustment": 1,
                              "coolDownPeriod": 180000,
                              "minLimit": 2
                          },
                                                    {
                              "role": "relay",
                              "estimatedWarmUpTime": 150000,
                              "maxLimit": 7,
                              "scaleAdjustment": 1,
                              "coolDownPeriod": 180000,
                              "minLimit": 7
                          }
                      ]
                  }
                      ]
                  }
      }
  }

Then create a nodegroup based on those policies

POST:

https://streammanager.com/streammanager/api/3.1/admin/nodegroup?accessToken=xyz123
{
"regions": [
 "us-east-1"
 ],
 "launchConfig": "oer-release560",
 "scalePolicy": "largeevent01"
}

Initiate the nodegroup by adding an origin and wait for all of the nodes to be inservice before broadcasting.