---
id: "shared-host-per-channel-without-isolation"
type: "rule"
severity: "error"
url: "https://localhost:3000/catalogue/rules/shared-host-per-channel-without-isolation"
---

# Random channel placement under heavy-tail traffic

A realtime gateway assigns channels to hosts at random while the design declares heavy-tail traffic, so hot channels degrade unrelated tenants.

| | |
|---|---|
| Severity | error |
| Selects | every node of kind realtime-gateway |
| Components in scope | 20 |

## Why

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.

## What it checks

It looks at every node of kind realtime-gateway, and fires when:

- all of these hold:
  - the node's `channelAssignment` is "random"
  - the design requirement `traffic.skew` is "heavy-tail"

Message template:

```
Realtime gateway '{{node.id}}' assigns channels randomly while the design declares heavy-tail traffic. Hot channels will degrade unrelated tenants on the same host.
```

## Applies to

- [Real-time gateway](https://localhost:3000/catalogue/kinds/realtime-gateway.md) `realtime-gateway`

20 catalogue components fall under it.

## Tripped by

Reference designs whose broken twin names this rule in its header:

- [discord-messages](https://localhost:3000/d/zeema/discord-messages)
- [facebook-messenger](https://localhost:3000/d/zeema/facebook-messenger)
- [slack-messaging](https://localhost:3000/d/zeema/slack-messaging)
- [twitch-live](https://localhost:3000/d/zeema/twitch-live)

## Source (`rule` YAML, verbatim)

```yaml
# yaml-language-server: $schema=../schema/rule.schema.json
# With heavy-tail traffic a few channels carry most of the load. Random channel
# assignment lands those hot channels on arbitrary hosts and every tenant sharing that
# host suffers. Assign channels by hash or sticky placement so hot spots are predictable
# and movable.
# Tripped by: designs/slack-messaging.broken.yaml
schemaVersion: "1"
type: "rule"
id: "shared-host-per-channel-without-isolation"
severity: "error"
select:
  node:
    kind: "realtime-gateway"
when:
  all:
    - prop: "channelAssignment"
      equals: "random"
    - requirement: "traffic.skew"
      equals: "heavy-tail"
message: "Realtime gateway '{{node.id}}' assigns channels randomly while the design declares heavy-tail traffic. Hot channels will degrade unrelated tenants on the same host."
```

Human page: https://localhost:3000/catalogue/rules/shared-host-per-channel-without-isolation
