Scaling

Scaling is about how many identical run-time instances the Orchestrator creates based on a design-time resource template within a model. In the SDC data model, the scaling concept is modelled using a specially defined family of TOSCA policies.

See Scaling Policy Types.

All ONAP scaling policies inherit from the tosca.policies.Scaling policy. A scaling policy may target any resource template or group in the model. When a scaling policy targets a group, this group scales out and in as a whole. Absence of a scaling policy for a resource implies that this resource should be instantiated once.





Example 1: Simple Scaling

node_templates: vf1: # omitted for brevity policies: scale_vf1: type: onap.policies.scaling.Fixed properties: quantity: 3 targets: [vf1]

The model instructs the orchestrator to create 3 instances of the vf1 resource.



Example 2: Nested Scaling

node_templates: vf1: # omitted for brevity vf2: # omitted for brevity vf3: # omitted for brevity groups: vfs_grp: type: tosca.groups.Root members: [vf1, vf2] policies: scale_vf1: type: onap.policies.scaling.Fixed properties: quantity: 3 targets: [vf2] scale_vfs_grp: type: onap.policies.scaling.Fixed properties: quantity: 2 targets: [vfs_grp]

The vfs_grp group will be instantiated 2 times. Within each group instance, the vf2 node will be instantiated 3 times. No scaling policies target vf3, so it will be instantiated only once.  In total, there will be 2 instances of vf1, 3x2=6 instances of vf2, and 1 instance of vf3.