In addition to scaling, a virtual service can also be migrated to a different SE. For instance, multiple underutilized SEs can be consolidated into a single SE. Or a single SE with two busy virtual services can have one virtual service migrated to its SE. If further capacity is required, the virtual service can still be scaled out to additional SEs. The migration process behaves similar to scaling. A new SE is added to an existing virtual service as a secondary. Shortly the NSX Advanced Load Balancer Controller will promote the secondary to become primary. The new SE will now handle all new connections, forwarding any older connections to the now secondary SE. After 30 seconds, the old SE will terminate the remaining connections and be removed from the virtual service configuration.

Manual Scaling

Manual scaling is the default mode. Scale-out is initiated from the Analytics page for the virtual service. Point to the Quick Info popup (the virtual service name in the top left corner) to show options for Scale-Out, Scale In, and Migrate. Select the desired option to scale or migrate. If NSX Advanced Load Balancer is configured in full access mode, then scale out will begin. This can take a couple of seconds if an existing SE has available resource capacity and can be added to the VS, or up to a couple of minutes if a new SE must be instantiated. For read or no access modes, the NSX Advanced Load Balancer Controller can not install new SEs or change the networking settings of existing SEs. Therefore, the administrator may be required to manually create new SEs and properly configure their network settings before initiating a scale-out command. If an eligible SE is not available when attempting to scale out, an error message will provide further info. Consider scaling out when the SE CPU exceeds 80% for any sustained amount of time, the SE memory exceeds 90% or the packets per second reach the limit of the hypervisor for a virtual machine.

Automated Scaling

The default for scaling is manual. This may be changed on a per-SE-group basis to automatic scaling (auto-rebalance), which allows the Avi Controller to determine when to scale or migrate a virtual service. By default, NSX Advanced Load Balancer Controller may scale-out or migrate a virtual service when the SE CPU exceeds an 80% average. It will migrate or scale in a virtual service if the SE CPU is under 30%. The Controller inspects SE groups at a five-minute interval. If the last 30 seconds of that 5-minute interval is above the maximum or below the minimum settings, the Controller may take an action to rebalance the virtual services across SEs. The Controller will only initiate or allow one pending change per five-minute period. This could be a scale in, scale-out, or virtual service migration.

Examples scenarios for automated scaling and migration:

  • If a single virtual service exists on an SE and that SE is above the 80% threshold, the virtual service will be scaled out.

  • The ratio of consumption of SEs by virtual services is determined by comparing the PPS (packets per second) during the 5-minute interval. If the SE is above the 80% CPU threshold, and one virtual service is generating more than 70% of the PPS for the SE, this virtual service will be scaled out. However, if the SE CPU is above the 80% mark, and no single virtual service is consuming more than 70% of the SE’s PPS, the Controller will elect to migrate a virtual service to another SE. The virtual service that is consuming the most resources has a higher probability of being chosen to migrate.

  • If two virtual services exist on an SE, and each are consuming 45% of the SE’s CPU, in other words neither is violating the 70% PPS rule, one virtual service will be migrated to a new SE.

For more information, see How to Configure Auto-rebalance Using NSX Advanced Load Balancer CLI.