Push fan-out without a celebrity threshold
warningpush-fanout-without-celebrity-path
Pure push fan-out over a social graph is brutal at the tail: one post from an account with millions of followers becomes millions of cache writes. A follower threshold above which readers merge at read time bounds that write amplification.
- Severity
- warning
- Selects
- every node of kind worker
- Components in scope
- 83
It looks at every node of kind worker, and fires when:
- — all of these hold:
- — the node's `fanoutStrategy` is "push"
- — the node's `fanoutThreshold` has no value
- — the design contains a node of kind graph-database
Worker '{{node.id}}' pushes fan-out over a social graph with no fanoutThreshold. Declare a follower threshold above which timelines are merged at read time.Reference designs whose broken twin names this rule in its header. The gate reads the same header, and fails when a rule no design trips.
# yaml-language-server: $schema=../schema/rule.schema.json # Pure push fan-out over a social graph is brutal at the tail: one post by an account with # millions of followers becomes millions of cache writes. A threshold above which the worker # stops pushing and readers merge at read time bounds that write amplification. # Tripped by: designs/twitter-timeline.broken.yaml schemaVersion: "1" type: "rule" id: "push-fanout-without-celebrity-path" severity: "warning" select: node: kind: "worker" when: all: - prop: "fanoutStrategy" equals: "push" - prop: "fanoutThreshold" exists: false - hasNode: kind: "graph-database" message: "Worker '{{node.id}}' pushes fan-out over a social graph with no fanoutThreshold. Declare a follower threshold above which timelines are merged at read time."