Azure Web PubSub
Managed WebSocket connection broker for real-time publish-subscribe to browsers, apps and devices.
- Provider
- azure
- Category
- Edge
| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| ackIntervalSeconds | integer | — | no | — | inherited |
| autoscaling | boolean | — | no | false | ▸ false |
| capability | enum | base | socket-io | mqtt | chat | no | base | inherited |
| channelAssignment | enum | random | hash | sticky | no | random | inherited |
| drainOnScaleIn | boolean | — | no | false | inherited |
| geoReplication | boolean | — | no | false | inherited |
| managed | boolean | — | no | false | ▸ true |
| privateEndpoint | boolean | — | no | false | inherited |
| protocol | enum | websocket | sse | long-poll | grpc-stream | udp-multicast | no | websocket | ▸ websocket |
| pushFallback | boolean | — | no | false | inherited |
| reliableSubprotocol | boolean | — | no | false | inherited |
| sequenceNumbers | boolean | — | no | false | ▸ false |
| stampedeGuard | boolean | — | no | false | inherited |
| stateful | boolean | — | no | true | ▸ true |
| subscriptionsPerUser | integer | — | no | — | inherited |
| tier | enum | free | standard | premium | no | — | inherited |
Every rule whose selector covers this component's kind or its category. Whether a rule fires depends on the design: its properties, its edges and its groups.
When a gateway holding millions of sockets restarts, every client reconnects at once and the gateway asks the coordination service about each of them. Without a stampede guard that lookup storm takes the coordination service down too.
- — all of these hold:
- — the node has at least one synchronous outgoing edge to a coordination-service
- — the node's `stampedeGuard` is false
With heavy-tail traffic a few channels carry most of the load. Assigning channels at random lands those hot channels on arbitrary hosts, and every tenant sharing a host suffers for it.
- — all of these hold:
- — the node's `channelAssignment` is "random"
- — the design requirement `traffic.skew` is "heavy-tail"
Scaling a gateway down kills every live WebSocket on the removed instance at once. Without a drain step those clients all reconnect together.
- — all of these hold:
- — the node's `autoscaling` is true
- — the node's `drainOnScaleIn` is false
nodes:
- { id: "web-pubsub", component: "azure-web-pubsub" }# yaml-language-server: $schema=../../schema/component.schema.json # Azure Web PubSub: managed WebSocket connection broker with groups, users and upstream event handlers. # Autoscale, zone redundancy and geo-replication are Premium-tier only, and message sequence numbers # with acks arrive only if the client selects the reliable subprotocol. Facts from "What is Azure Web # PubSub service?" and the "json.reliable.webpubsub.azure.v1" subprotocol reference. schemaVersion: "1" type: "component" id: "azure-web-pubsub" kind: "realtime-gateway" provider: "azure" docs: "https://learn.microsoft.com/en-us/azure/azure-web-pubsub/overview" defaults: managed: true protocol: "websocket" stateful: true autoscaling: false sequenceNumbers: false properties: tier: type: "enum" values: ["free", "standard", "premium"] capability: type: "enum" values: ["base", "socket-io", "mqtt", "chat"] default: "base" reliableSubprotocol: type: "boolean" default: false geoReplication: type: "boolean" default: false privateEndpoint: type: "boolean" default: false