You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/d1/configuration/data-location.mdx
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,13 @@ Learn how the location of data stored in D1 is determined, including where the l
9
9
10
10
## Automatic (recommended)
11
11
12
-
By default, D1 will automatically create your database in a location close to where you issued the request to create a database. In most cases this allows D1 to choose the optimal location for your database on your behalf.
12
+
By default, D1 will automatically create your primary database instance in a location close to where you issued the request to create a database. In most cases this allows D1 to choose the optimal location for your database on your behalf.
13
13
14
14
## Provide a location hint
15
15
16
-
Location hint is an optional parameter you can provide to indicate your desired geographical location for your database.
16
+
Location hint is an optional parameter you can provide to indicate your desired geographical location for your primary database instance.
17
17
18
-
You may want to explicitly provide a location hint in cases where the majority of your writes to a specific database come from a different location than where you are creating the database from. location hints can be useful when:
18
+
You may want to explicitly provide a location hint in cases where the majority of your writes to a specific database come from a different location than where you are creating the database from. Location hints can be useful when:
19
19
20
20
- Working in a distributed team.
21
21
- Creating databases specific to users in specific locations.
@@ -33,9 +33,7 @@ Providing a location hint does not guarantee that D1 runs in your preferred loca
33
33
### Use Wrangler
34
34
35
35
:::note
36
-
37
36
To install Wrangler, the command-line interface for D1 and Workers, refer to [Install and Update Wrangler](/workers/wrangler/install-and-update/).
38
-
39
37
:::
40
38
41
39
To provide a location hint when creating a new database, pass the `--location` flag with a valid location hint:
@@ -70,3 +68,11 @@ D1 supports the following location hints:
70
68
:::caution
71
69
D1 location hints are not currently supported for South America (`sam`), Africa (`afr`), and the Middle East (`me`). D1 databases do not run in these locations.
72
70
:::
71
+
72
+
## Read replica locations
73
+
74
+
D1 read replication allows you to create and distribute read-only copies of the primary database instance around the world. This reduces the query latency for users located far away from the primary database instance.
75
+
76
+
When using D1 read replication through [Sessions API](/d1/concepts/read-replication/#how-d1-read-replication-works), D1 automatically creates a read replica in [every available region](/d1/configuration/data-location#available-location-hints), including the region where the primary database instance is located.
77
+
78
+
Refer to [D1 read replication](/d1/concepts/read-replication/) for more information.
0 commit comments