|
| 1 | +--- |
| 2 | +title: Scale an instance of Azure Web PubSub Service |
| 3 | +description: Learn how to scale an Azure Web PubSub Service instance to add or reduce capacity, through Azure portal or Azure CLI. |
| 4 | +author: biqian |
| 5 | +ms.service: azure-web-pubsub |
| 6 | +ms.topic: how-to |
| 7 | +ms.date: 12/19/2023 |
| 8 | +ms.author: biqian |
| 9 | +ms.custom: devx-track-azurecli |
| 10 | +--- |
| 11 | +# How to scale an Azure Web PubSub Service instance? |
| 12 | +This article shows you how to scale your instance of Azure Web PubSub Service. There are two scenarios for scaling, scale up and scale out. |
| 13 | + |
| 14 | +* [Scale up](https://en.wikipedia.org/wiki/Scalability#Horizontal_and_vertical_scaling): Get more units, connections, messages, and more. You scale up by changing the pricing tier from Free to Standard. |
| 15 | +* [Scale out](https://en.wikipedia.org/wiki/Scalability#Horizontal_and_vertical_scaling): Increase the number of Web PubSub units. You can scale out to as many as 100 units. There are limited unit options to select for the scaling: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90 and 100 units for a single Web PubSub Service instance. If you want to scale beyond 100 units, the [Premium_P2](#enhanced-large-instance-support-with-premium_p2-sku) SKU offers expanded capabilities. |
| 16 | + |
| 17 | +The scale settings take a few minutes to apply. In rare cases, it may take around 30 minutes to apply. Scaling doesn't require you to change your code or redeploy your server application. |
| 18 | + |
| 19 | +For information about the pricing and capacities of individual Web PubSub Service, see [Azure Web PubSub Service Pricing Details](https://azure.microsoft.com/pricing/details/web-pubsub/). |
| 20 | + |
| 21 | +> [!NOTE] |
| 22 | +> Changing Web PubSub Service from **Free** tier to **Standard** or **Premium** tier or vice versa, the public service IP will be changed and it usually takes 30-60 minutes to propagate the change to DNS servers across the entire internet. Chaning tiers between **Standard** and **Premium** will not change the public IP. |
| 23 | +> Your service might be unreachable before DNS gets updated. Generally it’s not recommended to change your pricing tier too often. |
| 24 | +
|
| 25 | + |
| 26 | +## Scale up on Azure portal |
| 27 | + |
| 28 | +1. In your browser, open the [Azure portal](https://portal.azure.com). |
| 29 | + |
| 30 | +2. In your Web PubSub Service page, from the left menu, select **Scale Up**. |
| 31 | + |
| 32 | +3. Click **Change** and select **Premium_P1** Tier in the pop out blade. |
| 33 | + |
| 34 | +  |
| 35 | + |
| 36 | +4. Select **Save**. |
| 37 | + |
| 38 | + |
| 39 | +## Scale out on Azure portal |
| 40 | + |
| 41 | +1. In your browser, open the [Azure portal](https://portal.azure.com). |
| 42 | + |
| 43 | +2. In your Web PubSub Service page, from the left menu, select **Scale Out**. |
| 44 | + |
| 45 | +3. Choose the unit in the **Manual scale** sector. |
| 46 | + |
| 47 | +  |
| 48 | + |
| 49 | +4. Select **Save**. |
| 50 | + |
| 51 | + |
| 52 | +## Scale using Azure CLI |
| 53 | + |
| 54 | +```bash |
| 55 | +# Scale up to Premium_P1 Tier, and scale out to 100 units |
| 56 | +az webpubsub update \ |
| 57 | + --name $myWebPubSubName \ |
| 58 | + --resource-group $myResourceGroupName \ |
| 59 | + --sku Premium_P1 \ |
| 60 | + --unit-count 100 |
| 61 | +``` |
| 62 | + |
| 63 | + |
| 64 | +## Compare pricing tiers |
| 65 | + |
| 66 | +For detailed information, such as included messages and connections for each pricing tier, see [Web PubSub Service Pricing Details](https://azure.microsoft.com/pricing/details/web-pubsub/). |
| 67 | + |
| 68 | +For a table of service limits, quotas, and constraints in each tier, see [Web PubSub Service limits](../azure-resource-manager/management/azure-subscription-service-limits.md#azure-web-pubsub-limits). |
| 69 | + |
| 70 | + |
| 71 | +## Enhanced large instance support with Premium_P2 SKU |
| 72 | +The new Premium_P2 SKU (currently in Preview) is designed to facilitate extensive scalability for high-demand scenarios. This SKU allows scaling among 100, 200, 300, 400, 500, 600. 700, 800, 900, 1000 units for a single Web PubSub Service instance. This enhancement enables the handling of up to **one million** concurrent connections, catering to large-scale, real-time communication needs. |
| 73 | + |
| 74 | +You can scale up the SKU to Premium_P2 using Azure portal or Azure CLI. |
| 75 | + |
| 76 | +The Premium_P2 tier uses a different architecture internally to manage a large amount of underlying resources. Thus, it's expected that scaling operations of this tier might take longer compared to those in smaller SKUs. |
| 77 | + |
| 78 | +> [!NOTE] |
| 79 | +> Be aware that there is a default quota limit capping the number of Web PubSub units at **150** per subscription per region. This is a soft limit and can be increased upon request. To do so, simply submit a support ticket to request an adjustment to this quota. |
| 80 | +
|
| 81 | +## Next steps |
| 82 | + |
| 83 | +In this guide, you learned about how to scale single Web PubSub Service instance. |
| 84 | + |
| 85 | +Autoscale is supported in Azure Web PubSub Service Premium Tier. |
| 86 | + |
| 87 | +> [!div class="nextstepaction"] |
| 88 | +> [Automatically scale units of an Azure Web PubSub Service](./howto-scale-autoscale.md) |
0 commit comments