---
id: "datastore-single-region"
type: "rule"
severity: "error"
url: "https://localhost:3000/catalogue/rules/datastore-single-region"
---

# Single-region datastore behind a multi-region SLA

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

## Why

The design promises multi-region availability, but this datastore sits in one region and does not replicate. A region outage takes the system of record with it.

## What it checks

It looks at every node of kind sql-database, and fires when:

- all of these hold:
  - the design requirement `availability.multiRegion` is true
  - the node sits inside exactly 1 region group
  - the node's `replication` is "none"

Message template:

```
Datastore '{{node.id}}' is single-region with no replication, but the design requires multi-region availability.
```

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

- [linear-sync](https://localhost:3000/d/zeema/linear-sync)
- [multi-region-web](https://localhost:3000/d/zeema/multi-region-web)
- [netflix-streaming](https://localhost:3000/d/zeema/netflix-streaming)
- [paypal-payments](https://localhost:3000/d/zeema/paypal-payments)
- [wikipedia](https://localhost:3000/d/zeema/wikipedia)

## Source (`rule` YAML, verbatim)

```yaml
# yaml-language-server: $schema=../schema/rule.schema.json
# The design promises multi-region availability, but this datastore lives in one region
# with no replication. A region outage takes the system of record with it.
# Tripped by designs/multi-region-web.broken.yaml.
schemaVersion: "1"
type: "rule"
id: "datastore-single-region"
severity: "error"
select:
  node:
    kind: "sql-database"
when:
  all:
    - requirement: "availability.multiRegion"
      equals: true
    - inGroup:
        kind: "region"
        count:
          eq: 1
    - prop: "replication"
      equals: "none"
message: "Datastore '{{node.id}}' is single-region with no replication, but the design requires multi-region availability."
```

Human page: https://localhost:3000/catalogue/rules/datastore-single-region
