Regions
What a region is, how to see which regions you can create a database in, and what choosing one decides.
A region is where a database's cluster runs. Choosing a region for a database decides where its data is stored and how far your users' requests travel.
What a region decides
- Where the data lives. A database runs on a cluster in the region it was created in, and that cluster stores its documents.
- Latency. Your application talks to the database's cluster directly, so the distance between your users and the region is the distance every request travels.
A region is chosen once
A database's region is set when it is created and cannot be changed. A backup is restored into the region of the database it was taken from.
To have data in another region, create a new database there.
Which regions are available
The list of regions is not fixed. A region is offered to your organization when it has a cluster that can take a new database right now.
- In the dashboard, the Create database dialog lists the regions you can choose. If none can take a database, it says so and the database cannot be created.
- From the management API,
GET /v1/regionsreturns the same list.
curl "$MIMIC_MANAGEMENT_API/v1/regions" \
-H "Authorization: Bearer $MIMIC_API_KEY"[{ "id": "<region-id>", "label": "<region name>" }]Use a region's id as the region when you create a database. Creating one in a region that is not in the list is refused with the list of regions that are.
Placement
Once a database is placed on a cluster, its Overview shows a Placement, and its Backups page describes how that placement keeps confirmed writes. A replicated placement acknowledges a write only once it is committed on its database's primary and held by a synchronous standby in a second availability zone.
The management API returns the same information as the database's placement field.