Red5 Documentation

Scale Policy Example

Scale Policy with Origin, Edge and Relay nodes

POST

https://streammanager.com/streammanager/api/4.0/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
                          }
                      ]
                  }
                      ]
                  }
      }
  }

Nodegroup Creation

To create a nodegroup which includes Relay nodes, use the launch configuration and scale policy which you created.

POST:

https://streammanager.com/streammanager/api/4.0/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.