Read replicas as the only scaling
warningread-replica-as-sole-scaling
Asynchronous read replicas scale reads only. When the store is neither sharded nor distributed the writes still land on one primary, so the replicas add nothing at the declared peak.
- Severity
- warning
- Selects
- every node of kind sql-database
- Components in scope
- 76
It looks at every node of kind sql-database, and fires when:
- — all of these hold:
- — the node's `replication` is "async"
- — the node's `sharded` is false
- — the node's `distributed` is false
- — the node's declared requests per second is more than 5000
Database '{{node.id}}' relies on async read replicas as its only scaling above 5000 rps. Replicas do not scale writes.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 # Async read replicas scale reads only. If the store is neither sharded nor distributed, # the writes still land on one primary and the replicas add nothing at write peak. # Tripped by: designs/doordash-delivery.broken.yaml schemaVersion: "1" type: "rule" id: "read-replica-as-sole-scaling" severity: "warning" select: node: kind: "sql-database" when: all: - prop: "replication" equals: "async" - prop: "sharded" equals: false - prop: "distributed" equals: false - nfr: rps: gt: 5000 message: "Database '{{node.id}}' relies on async read replicas as its only scaling above 5000 rps. Replicas do not scale writes."