OpenVidu High Availability administration: Azure#
The deployment of OpenVidu High Availability on Azure is automated using Azure Resource Manager Templates, with 4 Virtual Machine Instances as Master Nodes and any number of Media Nodes managed within a Virtual Machine Scale Set. The Virtual Machine Scale Set of Media Nodes is configured to scale based on the target average CPU usage.
Internally, the Azure High Availability deployment mirrors the On Premises High Availability deployment, allowing you to follow the same administration and configuration guidelines provided in the On Premises High Availability documentation. However, there are specific considerations unique to the Azure environment that are worth taking into account:
Cluster Shutdown and Startup#
You can start and stop the OpenVidu High Availability cluster at any time. The following sections detail the procedures:
To shut down the cluster, you need to stop the Media Nodes and then stop the Master Nodes.
Gracefully stopping Media Nodes
There is currently a limitation with Media Nodes that prevents them from stopping gracefully. Please exercise caution when stopping Media Nodes, as they will terminate immediately without waiting for active Rooms to complete. You may want to wait for your active Rooms to finish before stopping the cluster.
We are working to implement the same graceful shutdown behavior offered by AWS and On Premises deployments. In the meantime, Media Nodes include a script that allows for a graceful shutdown. To use it, SSH to the Media Node you want to stop and execute script ./usr/local/bin/stop_media_node.sh
- Navigate to the Azure Portal Dashboard and go to the Resource Group where you deployed OpenVidu HA.
- Click into the Virtual Machine Scale Set resource called "stackName-mediaNodeScaleSet" and click "Availability + scale" on the left panel, then click on "Scaling" option.
- On this tab, modify the "Instance Limits" to 0.
- Click on save and wait until it is completed. You can check the progress in the "Instances" tab.
- After confirming that all Media Node instances are terminated, go back to the Resource Group and locate the resource called "stackName-VM-MasterNode1". Click on it to go to the Master Node 1 instance. There, click on "Stop" to stop the instance.
- Repeat step 5 for all the Master Nodes.
To start the cluster, start the Master Nodes first and then the Media Nodes.
- Navigate to the Azure Portal Dashboard and go to the Resource Group where you deployed OpenVidu HA.
- In the resource group click on the resource called "stackName-VM-MasterNode1" and click on start to start the Master Node 1.
- Wait until the instance is running.
- Repeat step 2 and 3 for all the Master Nodes until they are all up and running.
- Go back to the Resource Group, and there click into the Virtual Machine Scale Set resource called "stackName-mediaNodeScaleSet" and click "Availability + scale" on the left panel, here click on "Scaling" option.
- On this tab, modify the "Instance Limits" to your desired ones.
- Click on save and wait until is completed. You can check the progress in the "Instances" tab.
Change the instance type#
It is possible to change the instance type of both the Master Node and the Media Nodes. The following section details the procedures.
Warning
This procedure requires downtime, as it involves stopping the Master Node.
- Shutdown the cluster.
- Go to the Azure Resource Group where you deployed and locate the resource with the name "stackName-VM-MasterNode1" and click on it.
- On the left panel click on "Availability + scale" tab and inside click on "Size" tab. Then select the size you desire and click on "Resize"
- Repeat steps 2 and 3 for all the Master Nodes just in case you want to resize all of them, if not just do it for the ones you want.
- Start the cluster.
Info
This will restart the media nodes without the graceful delete option, if you want to stop them gracefully check the Shutdown the Cluster tab
- Go to the Azure Portal Dashboard on Azure.
- Select the Resource Group where you deployed OpenVidu High Availability.
- Locate the resource with the name "stackName-mediaNodeScaleSet". Click on it to go to the Virtual Machine Scale Set.
- On the left panel click on "Availability + scale" tab and inside click on "Size".
- Select the new instance type and click on "Resize".
Media Nodes Autoscaling Configuration#
You can modify the autoscaling configuration of the Media Nodes by adjusting the scaling rules of the Virtual Machine Scale Set:
- Go to the Azure Portal Dashboard on Azure.
- Select the Resource Group where you deployed OpenVidu High Availavility.
- Locate the resource with the name "stackName-mediaNodeScaleSet" and click on it.
- On the left panel click on "Availability + scale" tab and inside click on "Scaling" option.
-
In the "Default" box you will find a section called "Rules". Here you can add new rules or modify existing ones.
Warning
Currently there is only one rule to scale out. We are actively working in providing a graceful scale in process for Media Nodes to avoid active Rooms disruption.
Info
OpenVidu High Availability is by default configured with a "Target tracking scaling" policy that scales based on the target average CPU usage. However, you can configure different autoscaling policies according to your needs. For more information on the various types of autoscaling policies and how to implement them, refer to the Azure Scaling Set documentation.
Fixed Number of Media Nodes#
If you prefer to maintain a fixed number of Media Nodes instead of allowing the Virtual Machine Scale Set to perform dynamic scaling:
- Go to the Azure Portal Dashboard on Azure.
- Select the Resource Group where you deployed OpenVidu High Availability, locate the resource with the name "stackName-mediaNodeScaleSet" and click on it
- On the left panel click on "Availability + scale" and then in "Scaling" tab.
- On this tab, go at the very bottom and modify the "Instance Limits" to the value of fixed number of media nodes you want. In this case is set to 2.
- Click on save and wait until is completed, you can check how is going in the "Instances" tab.
Administration and configuration#
Regarding the administration of your deployment, you can follow the instructions in section On Premises High Availability Administration section.
Regarding the configuration of your deployment, you can follow the instructions in section Changing Configuration. Additionally, the How to Guides offer multiple resources to assist with specific configuration changes.
In addition to these, an Azure deployment provides the capability to manage global configurations via the Azure portal using Key Vault Secrets created during the deployment:
- Navigate to the Azure Portal Dashboard on Azure.
- Select the Resource Group where you deployed your OpenVidu HA Stack.
- In the "stackname-keyvault" resource, click on "Objects" 🡒 "Secrets" on the left panel. This will show you all the secrets that are stored in the Key Vault of the OpenVidu HA deployment.
- Click on the desired secret you want to change and click on "New Version".
- Enter the new secret value on "Secret Value" filed and click on "Create".
- Go to the Master Node resource you've want to change the secrets on and click on "Restart" to apply the changes to the OpenVidu HA deployment.
Changes will be applied automatically.