---
id: "single-writer-primary-at-peak-qps"
type: "rule"
severity: "error"
url: "https://localhost:3000/catalogue/rules/single-writer-primary-at-peak-qps"
---

# Single-writer primary at peak QPS

An unsharded single-writer SQL database is declared at more than 5000 requests per second.

| | |
|---|---|
| Severity | error |
| Selects | every node of kind sql-database |
| Components in scope | 76 |

## Why

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.

## 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 template:

```
Database '{{node.id}}' is a single unsharded writer declared at more than 5000 rps. Shard it or move to a multi-writer distributed store.
```

## Applies to

- [SQL database](https://localhost:3000/catalogue/kinds/sql-database.md) `sql-database`

76 catalogue components fall under it.

## Tripped by

Reference designs whose broken twin names this rule in its header:

- [amazon-order](https://localhost:3000/d/zeema/amazon-order)
- [doordash-delivery](https://localhost:3000/d/zeema/doordash-delivery)
- [dropbox-sync](https://localhost:3000/d/zeema/dropbox-sync)
- [etsy-search](https://localhost:3000/d/zeema/etsy-search)
- [facebook-tao](https://localhost:3000/d/zeema/facebook-tao)
- [github-mysql](https://localhost:3000/d/zeema/github-mysql)
- [gojek-platform](https://localhost:3000/d/zeema/gojek-platform)
- [hotstar-streaming](https://localhost:3000/d/zeema/hotstar-streaming)
- [reddit-feed](https://localhost:3000/d/zeema/reddit-feed)
- [shopify-flash-sale](https://localhost:3000/d/zeema/shopify-flash-sale)
- [stack-overflow](https://localhost:3000/d/zeema/stack-overflow)
- [uber-dispatch](https://localhost:3000/d/zeema/uber-dispatch)
- [unique-id-generator](https://localhost:3000/d/zeema/unique-id-generator)
- [youtube-upload-playback](https://localhost:3000/d/zeema/youtube-upload-playback)
- [zerodha-kite](https://localhost:3000/d/zeema/zerodha-kite)

## Source (`rule` YAML, verbatim)

```yaml
# 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."
```

Human page: https://localhost:3000/catalogue/rules/single-writer-primary-at-peak-qps
