Scheduling scaling and managing Teams Connector capacity

When you install a Teams Connector application in Azure, you initially specify the number of Teams Connector instances (VMs) to deploy, which determines the initial call capacity you can support. You can subsequently modify the number of instances to reflect changing capacity requirements. How you do this, and the amount of flexibility you have, depends upon whether you enable the Azure Event Hub in your Teams Connector configuration within Pexip Infinity.

Each Teams Connector instance can handle a maximum of 16 calls, although the capacity of each instance can vary depending on various factors such as call resolution, the number of presentation streams, and the number of participants in the Teams meetings. For capacity planning purposes we recommend that you assume 15 calls per instance.

If the Azure Event Hub is enabled, you can:

  • Specify a minimum number of instances (capacity) that is always available.
  • Use scheduled scaling via the Pexip Infinity Administrator interface to automatically scale up and down the capacity of your Teams Connector in Azure at different times of the day.

See Using scheduled scaling for details.

If the Azure Event Hub is not enabled, you can only:

  • Manually configure the current number of instances via the Azure portal, when you want to adapt to changing capacity requirements.

See Manual scaling via the Azure portal for details.

Using scheduled scaling

Scheduled scaling allows you to automatically scale up and down the capacity of your Teams Connector at different times of the day. This allows you, for example, to cater for increased demand during core working hours but just run a minimal capacity (and thus reduce running costs) at other times of the day.

To use scheduled scaling you must enable the Azure Event Hub in your Teams Connector configuration within Pexip Infinity (Call control > Microsoft Teams Connectors).

How scheduled scaling works

To use scheduled scaling you need to define the minimum number of instances, the maximum number of instances, and one or more scheduled scaling policies within Pexip Infinity. These scaling policies define:

  • The time and day(s) when the scaling policy comes into effect.
  • How many additional Teams Connector instances to start up when the policy is in effect.

Pexip Infinity then monitors those policies:

  1. Every minute, Pexip Infinity checks whether any scheduled scaling policies are to be applied at that time/day, taking into account the policy's Minutes in advance offset for the start time.

    As it can take up to 20 minutes to start an instance, the offset is to allow enough time for all of the requested additional instances to be started up.

  2. If a policy is to be applied, Pexip Infinity sends a request to Azure to start up the specified number of additional instances for the nominated Teams Connector.

    • The Minimum number of instances (configured against the Teams Connector in Pexip Infinity) defines the number of instances that are always running when there are no scaling policies in effect. The Number of instances to add (configured against each policy) is the amount of extra instances to start up.
    • If multiple policies are in force at the same time then Pexip Infinity will add all of the requested instances. For example, if the Minimum number of instances is 3 and there is a policy to add 2 more, and while that policy is in operation another policy to add 4 more comes into effect, then you will have 9 instances.
    • The maximum number of instances that can be running is capped by the instance count (slider) configuration in the Azure portal for the Virtual machine scale set in your Teams Connector resource group (see Setting the maximum number of instances). This limit is initialized by the $PxTeamsConnInstanceCount variable when you deploy a Teams Connector.
  3. At the end of the scheduled time period, Pexip Infinity sends a request to Azure to turn off the additional instances, and Azure decides which excess instances to turn off.

    • The status of those instances is changed from Active to Waiting for termination and they will not accept any further calls.
    • Any existing calls will continue to be hosted on that instance, and the instance is only stopped when all calls have drained. However, if another instance becomes empty in the meantime then that other instance is terminated instead.
    • If a new policy comes into effect while some existing instances are waiting for termination then they may be restored to an active state, or brand new instances may be started up. This decision depends upon the current load of those instances and is to ensure that the expected capacity is available at the requested time.

Setting the minimum number of instances

To use scheduled scaling you need to define the minimum (baseline) number of instances. This is the number of instances that are always running when there are no scaling policies in effect. To do this:

  1. Within the Pexip Infinity Administrator interface, go to Call control > Microsoft Teams Connectors and select your Teams Connector.
  2. Configure the Minimum number of instances as required.
  3. Save your changes.

If you increase this setting it can temporarily raise the "Scheduled scaling: some or all of the requested Teams Connector instances are not operational" alarm. It will last for a few minutes until the new instances are up and running. This is expected behavior and can occur with or without any scheduled scaling policies.

Note that if the same Teams Connector is being used by multiple Teams tenants, then the minimum number of instances running in the scale set will be the highest of all of the individual Minimum number of instances settings for each tenant.

Setting the maximum number of instances

To change the maximum number of Teams Connector instances that can be running:

  1. In the Azure portal, for your subscription, go to the Virtual machine scale set in your Teams Connector resource group.
  2. In the Settings menu, select Scaling, and then select the Configure tab.
  3. Ensure that Manual scale is selected (do not use autoscale).
  4. Use the slider to increase/decrease the instance count as appropriate.

    Note that if you reduce the instance count, any calls that are being handled by an instance that Azure chooses to delete will be dropped.

Configuring scheduled scaling policies

You set up your scheduled scaling policies with Pexip Infinity. These are then monitored within Pexip Infinity and it sends instructions to Azure via the Azure Event Hub to start up or shut down the requested instances at the appropriate times as defined by the policy.

  1. Within the Pexip Infinity Administrator interface, go to Platform > Teams Connector Scheduled Scaling and select Add scheduled scaling policy.
  2. Configure the scheduled scaling policy:

    Policy name The name / description of this scheduled scaling policy.
    Policy type Select Teams Connector Scaling. (Currently this is the only policy type available.)
    Teams Connector Select the Teams Connector associated with this scheduling policy.
    Number of instances to add Enter the number of instances to add when this policy is in effect
    Minutes in advance

    The number of minutes in advance of the activation time to begin scaling up the instances.

    This field currently defaults to 20 minutes and cannot be modified.

    Enable this policy Determines whether or not this scheduled scaling policy is enabled.
    Timing
    Activation date

    The date from which this policy applies.

    Enter a string in the format YYYY-MM-DD or use the associated calendar picker.

    Time from

    Specify the time of day when the additional instances are required. Enter a string in the format HH:MM:SS or choose one of the preconfigured options.

    Note that scaling up starts at the specified Minutes in advance of this time.

    Time to Specify the time of day when the additional instances should be stopped. Enter a string in the format HH:MM:SS or choose one of the preconfigured options.
    Timezone Select the timezone used to specify the activation date and time above.
    Days
    Monday, Tuesday... etc. Select the days of the week when the policy should be applied.
  3. Select Save.

Manual scaling via the Azure portal

If you have not enabled the Azure Event Hub, you can modify the current number of Teams Connector instances at any time via the Azure portal, to reflect changing capacity requirements.

To change the current number of instances:

  1. In the Azure portal, for your subscription, go to the Virtual machine scale set in your Teams Connector resource group.
  2. In the Settings menu, select Scaling, and then select the Configure tab.
  3. Ensure that Manual scale is selected (do not use autoscale).
  4. Use the slider to increase/decrease the instance count as appropriate.

    Note that if you reduce the instance count, any calls that are being handled by an instance that Azure chooses to delete will be dropped.

Note that:

  • When the Azure Event Hub is enabled, this slider setting has a different purpose: it controls the maximum number of instances that can be running (instead of setting the current number).
  • The Minimum number of instances (configured against the Teams Connector in Pexip Infinity) has no effect when the Azure Event Hub is not enabled.