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
What it checks

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
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.

{{node.id}} style paths are filled in from the node, the edge or the design the finding is about.

Applies to · 76 components
Tripped by · 15

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.

Source
# 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."

The same page as markdown, for an agent: /catalogue/rules/single-writer-primary-at-peak-qps.md