azurerm_web_pubsub cost estimation
Managed real-time messaging over WebSockets with a pub/sub model. Priced per unit per day by tier, with included connections and messages per unit.
An azurerm_web_pubsub provides managed real-time messaging over WebSockets using a publish/subscribe model, for live dashboards, chat, collaborative apps, and notifications. It's the sibling of Azure SignalR, with a more protocol-agnostic WebSocket focus, and is priced the same way: per capacity unit per day.
The Standard tier is roughly $1.61/unit-day, with each unit including 1,000 concurrent connections and 1 million messages/day. Premium runs about $2.00/unit-day and adds availability-zone redundancy and autoscaling. The Free tier costs nothing with caps suitable for development (20 connections). Scaling is by adding units, so cost is linear in capacity.
c3x reads the sku and capacity and prices unit-days at roughly 30.4 days/month; the Free tier estimates to zero. Messages beyond the per-unit included quota are usage-based and supplied in c3x-usage.yml. As with SignalR, size units to peak concurrent connections, that's the dimension that usually forces the unit count.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "azurerm_web_pubsub" "live" {
name = "app-live"
resource_group_name = azurerm_resource_group.app.name
location = "eastus"
sku = "Standard_S1"
capacity = 2
}Pricing dimensions
What you actually pay for when you provision azurerm_web_pubsub.
| Dimension | Unit | What's being charged |
|---|---|---|
| Service units | per unit-day | Per-unit daily rate by tier. Each Standard unit includes 1,000 concurrent connections and 1M messages/day. c3x prices capacity x ~30.4 days/month. $1.61/unit-day (Standard), $2.00 (Premium) |
| Additional messages | per million messages | Messages beyond the included per-unit quota. Usage-based; define in c3x-usage.yml. |
Sample C3X output
Example output from c3x estimate (Standard, 2 units):
azurerm_web_pubsub.live
└─ Service units (Standard x 2) 60.8 unit-days $97.88
OVERALL TOTAL $97.88Optimization tips
Common ways to reduce azurerm_web_pubsub cost without changing the workload.
Size units to peak concurrent connections
Per excess unitEach Standard unit covers 1,000 concurrent connections. Provision units for real peak concurrency, not a round number; over-provisioning units is the main waste.
Use the Free tier for development
100% in non-prodThe Free tier (20 connections) costs nothing and suits development and small demos. Reserve paid units for production traffic.
Choose Standard unless you need AZ redundancy
~20%Premium adds zone redundancy and autoscaling at ~25% more per unit. For most apps Standard delivers the same messaging at the lower rate.
FAQ
How does c3x estimate Azure Web PubSub cost?
It reads the sku tier and capacity and prices unit-days at ~30.4 days/month. Messages beyond the per-unit included quota are usage-based. The Free tier estimates to zero.
How is this different from Azure SignalR?
Both are managed real-time messaging priced per unit-day. SignalR is optimized for the SignalR protocol and .NET; Web PubSub is protocol-agnostic over raw WebSockets for any client. The pricing model is the same.
What does one Standard unit include?
1,000 concurrent connections and 1 million messages per day. Adding units scales both linearly, so two units double the quota and the cost.
Is the Free tier usable?
For development, yes, capped at 20 concurrent connections. c3x estimates it at zero. Production traffic needs Standard or Premium units.
When is Premium worth it?
When you need availability-zone redundancy or autoscaling. Premium is ~$2.00/unit-day vs Standard's ~$1.61. Most applications are fine on Standard.
Related resources
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including azurerm_web_pubsub.