Single-writer primary at peak QPS
errorsingle-writer-primary-at-peak-qps
A single-writer, unsharded relational primary has a throughput ceiling. Declaring more than five thousand requests per second against it means the peak finds that ceiling in production.
- Severity
- error
- 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 `multiWriter` is false
- — the node's `sharded` is false
- — the node's declared requests per second is more than 5000
Database '{{node.id}}' is a single unsharded writer declared at more than 5000 rps. Shard it or move to a multi-writer distributed store.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.
amazon-orderreferencedoordash-deliveryreferencedropbox-syncreferenceetsy-searchreferencefacebook-taoreferencegithub-mysqlreferencegojek-platformreferencehotstar-streamingreferencereddit-feedreferenceshopify-flash-salereferencestack-overflowreferenceuber-dispatchreferenceunique-id-generatorreferenceyoutube-upload-playbackreferencezerodha-kitereference
# yaml-language-server: $schema=../schema/rule.schema.json # A single-writer, unsharded relational primary has a ceiling. Declaring more than # 5000 requests per second against it means the peak will find that ceiling in # production, as the 1.6M QPS Aurora crash at DoorDash did. # Tripped by: designs/doordash-delivery.broken.yaml schemaVersion: "1" type: "rule" id: "single-writer-primary-at-peak-qps" severity: "error" select: node: kind: "sql-database" when: all: - prop: "multiWriter" equals: false - prop: "sharded" equals: false - nfr: rps: gt: 5000 message: "Database '{{node.id}}' is a single unsharded writer declared at more than 5000 rps. Shard it or move to a multi-writer distributed store."