azureweb-pubsubrealtimecost-optimization

Azure Web PubSub cost: per unit per day, like SignalR

Azure Web PubSub bills per provisioned unit per day (each supporting concurrent connections and messages), with a Free tier and autoscaling Premium. Over-provisioning units for rare peaks drives the bill. Here is the model.

The C3X Team··4 min read

Quick answer

Azure Web PubSub bills per provisioned unit per day, where each unit supports a set number of concurrent connections and daily messages, with a Free tier for small use and autoscaling on Premium. Like SignalR, cost scales with the units you provision, so right-sizing units to real concurrent connections and using autoscaling rather than provisioning for peak are the levers.

Azure Web PubSub is a managed service for real-time messaging over WebSockets using a publish-subscribe pattern, so you do not run your own WebSocket servers. Its pricing mirrors SignalR: per provisioned unit, each supporting a capacity of concurrent connections and messages, so the cost is the units you run.

Units and tiers

TierBilling
FreeLimited connections and messages, no SLA
StandardPer unit per day (concurrent connections + daily messages each)
PremiumPer unit, with autoscaling and availability zones

The Free tier covers development and small use. Standard bills per unit per day, each unit handling a set number of concurrent connections and messages, so you provision units to cover peak concurrency. Premium adds autoscaling and zone redundancy at a higher per-unit cost.

Right-size and autoscale

As with SignalR, the overspend is provisioning units for a peak concurrency that occurs rarely, paying for that capacity all day every day. Right-size units to typical concurrency, use autoscaling on Premium to handle genuine peaks, and monitor concurrent connections and message rate to set units accurately.

Controlling Web PubSub cost

Right-size provisioned units to real concurrent-connection and message needs, use autoscaling on Premium to handle peaks without running peak capacity constantly, use the Free tier for development, and reduce unnecessary messages (do not broadcast to connections that do not need updates). The provisioned-unit discipline is identical to SignalR Service, since both price real-time messaging by capacity unit.

FAQ

How is Azure Web PubSub priced?

Per provisioned unit per day, where each unit supports a set number of concurrent connections and daily messages, with a Free tier for small use and autoscaling on Premium. Cost scales with the number of units you provision to cover peak concurrency, like Azure SignalR Service.

How do I reduce Azure Web PubSub cost?

Right-size provisioned units to real concurrent-connection and message needs, use autoscaling on Premium to handle peaks without running peak capacity constantly, use the Free tier for development, and reduce unnecessary messages by not broadcasting to connections that do not need updates. Sizing units to actual concurrency is the main lever.

What is the difference between Web PubSub and SignalR?

Both are managed real-time messaging services with nearly identical per-unit pricing. Web PubSub is a general WebSocket-based publish-subscribe service for any client, while SignalR is tied to the SignalR programming model and its client libraries. Choose based on your application's framework; the cost model is the same.

Does Web PubSub charge when idle?

The provisioned units bill per day whether or not they are fully used, so provisioning units for a rare peak means paying for that capacity constantly. Right-sizing to typical concurrency and using autoscaling for genuine peaks avoids paying for idle peak capacity. The Free tier has no charge for small use.

Should I run my own WebSocket servers or use Web PubSub?

The managed Web PubSub service removes the operational burden of running and scaling WebSocket connection servers, which is significant at scale. For real-time features at meaningful scale, the managed service is usually worth its per-unit cost versus building and operating connection infrastructure. Right-size units to keep it economical.

Does C3X estimate Web PubSub cost?

C3X prices the Web PubSub resource and its tier and unit count from your Terraform, so the provisioned cost appears before deploy. Actual unit needs depend on concurrent connections and message volume, which you size from usage.

What to do next

Size your real-time messaging before you deploy. C3X reads your Terraform and prices your resources against a live catalog. Start with the quickstart.

Try C3X on your own Terraform

Free and open source. No API key required. One command to install, one command to estimate.