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: articles/cosmos-db/mongodb/vcore/quickstart-cross-region-replica-portal.md
+30-2Lines changed: 30 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,6 +197,9 @@ db.cats.find();
197
197
198
198
## Enable access to replica cluster
199
199
200
+
> [!IMPORTANT]
201
+
> Replica clusters are always created with networking access disabled. You should add firewall rules on the replica cluster after it is created to enable read operations.
202
+
200
203
1. From the Azure Cosmos DB for MongoDB vCore *primary* cluster page, select the **Global distribution (preview)** page under **Settings**.
201
204
202
205
:::image type="content" source="media/quickstart-cross-region-replication/global-distribution-page-on-primary-cluster.png" alt-text="Screenshot of the global distribution preview page in the primary cluster properties.":::
In the MongoDB shell, read data from the database.
237
+
In the MongoDB shell, read data from the database on the replica cluster.
235
238
236
239
```MongoDB Shell
237
240
db.dogs.find();
238
241
db.cats.find();
239
242
```
240
243
244
+
## Promote replica cluster
241
245
242
-
246
+
To promote a cluster read replica to a read-write cluster, follow these steps:
247
+
248
+
1. Select the *read replica cluster* in the portal.
249
+
250
+
1. On the cluster sidebar, under **Cluster management**, select **Global distribution (preview)**.
251
+
252
+
1. On the **Global distribution (preview)** page, select **Promote** on the toolbar to initiate read replica promotion to read-write cluster.
253
+
254
+
1. In the **Promote cluster** pop-up window, confirm that you understand how replica promotion works, and select **Promote**. Replica promotion might take a few minutes to complete.
255
+
256
+
### Write to promoted cluster replica
257
+
258
+
Once replica promotion is completed, the promote replica becomes available for writes and the former primary cluster is set to read-only.
259
+
260
+
Go back to the MongoDB shell session for the promoted replica and perform a write operation.
261
+
262
+
```MongoDB Shell
263
+
db.createCollection('foxes')
264
+
```
265
+
266
+
Go beck to the MongoDB shell session for the former primary cluster to confirm that writes are now disabled.
0 commit comments