Real-time gateway
edgerealtime-gateway
Holds long-lived client connections and pushes events.
- Category
- Edge
- Properties
- 11
- Components
- 20
- Rules
- 3
A node of this kind resolves each property from its own props, then the component's defaults, then the default below.
| property | type | values | required | default |
|---|---|---|---|---|
| ackIntervalSeconds | integer | — | no | — |
| autoscaling | boolean | — | no | false |
| channelAssignment | enum | random | hash | sticky | no | random |
| drainOnScaleIn | boolean | — | no | false |
| managed | boolean | — | no | false |
| protocol | enum | websocket | sse | long-poll | grpc-stream | udp-multicast | no | websocket |
| pushFallback | boolean | — | no | false |
| sequenceNumbers | boolean | — | no | false |
| stampedeGuard | boolean | — | no | false |
| stateful | boolean | — | no | true |
| subscriptionsPerUser | integer | — | no | — |
reconnect-stampede-without-guard
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
shared-host-per-channel-without-isolation
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"
stateful-websocket-scale-in-without-drain
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
vendor-neutral
aws
azure
# yaml-language-server: $schema=../schema/kind.schema.json # Holds long-lived client connections and pushes events (WebSocket gateways, chat servers, long-poll and multicast feeds). # stampedeGuard and drainOnScaleIn default false so reconnect and scale-in rules can fire. schemaVersion: "1" type: "kind" id: "realtime-gateway" category: "edge" properties: protocol: type: "enum" values: ["websocket", "sse", "long-poll", "grpc-stream", "udp-multicast"] default: "websocket" stateful: type: "boolean" default: true autoscaling: type: "boolean" default: false channelAssignment: type: "enum" values: ["random", "hash", "sticky"] default: "random" advanced: true drainOnScaleIn: type: "boolean" default: false advanced: true stampedeGuard: type: "boolean" default: false advanced: true sequenceNumbers: type: "boolean" default: false advanced: true ackIntervalSeconds: type: "integer" advanced: true subscriptionsPerUser: type: "integer" advanced: true pushFallback: type: "boolean" default: false advanced: true managed: type: "boolean" default: false