How it works
Authorize the sender against the group’s current membership, assign a sequence in that group, and persist one canonical message, the single authoritative record. Fanout on write then does the delivery work at send time: a job puts references in recipients’ inboxes, which are per-person lists of what to read, or pushes live events to their devices. For groups capped near 250 members, this write-side work may make each person’s inbox simple to read.
Do not confuse copies in delivery queues with copies of the canonical record. Decide what someone joining later may see, what happens when a member leaves, and whether a retry may repeat a fanout task. Idempotent fanout and membership checks keep those cases predictable: a unique key on message and member means a repeated job cannot add a second inbox entry.
For a very large channel, copying a message to every follower is costly. Take a 100,000-member channel posting 10 messages a minute: fanout on write needs about 16,700 inbox writes per second, nearly all for people who are not looking. If 2% are active, pushing only to them needs about 330 per second, and the rest pull from the channel when they open it. Discord, for example, stores messages per channel rather than per user.
The threshold depends on active readership, group size, and latency goals; “always fan out on write” is not a universal rule. Pull has its own cost: every open becomes a read that must also work out unread counts for that member.
A product lifts the group cap from 250 to 100,000. What part of the design deserves immediate review?
Review per-member fanout and presence broadcasts. A single post or status change could create 100,000 events. Consider canonical channel storage with pull for inactive readers and selective push for active ones.
Use this as a guide for self review; written answers are not graded.Keep in mind
- Small-group fanout buys simple inbox reads at a bounded write cost.
- Large audiences may need pull or hybrid delivery, with explicit membership semantics.