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/azure-web-pubsub/concept-disaster-recovery.md
+17-2Lines changed: 17 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: An overview on how to set up multiple Azure Web PubSub service inst
4
4
author: vicancy
5
5
ms.service: azure-web-pubsub
6
6
ms.topic: conceptual
7
-
ms.date: 11/08/2021
7
+
ms.date: 05/28/2023
8
8
ms.author: lianwei
9
9
---
10
10
# Resiliency and disaster recovery in Azure Web PubSub Service
@@ -15,6 +15,13 @@ Your service instance is a regional service and the instance is running in one r
15
15
16
16
## High available architecture for Web PubSub service
17
17
18
+
There are two typical patterns using Web PubSub service:
19
+
* One is client-server pattern that [clients send events the the server](./quickstarts-event-notifications-from-clients.md] and [server pushes messages to the clients](./quickstarts-push-messages-from-server.md)
20
+
* Another is client-client pattern that [clients pub/sub messages through the Web PubSub service to other clients](./quickstarts-pubsub-among-clients.md)
21
+
22
+
Below sections describe different ways for these two patterns to do disaster recovery
23
+
24
+
### High available architecture for client-server pattern
18
25
In order to have cross region resiliency for Web PubSub service, you need to set up multiple service instances in different regions. So when one region is down, the others can be used as backup.
19
26
20
27
One typical setup for cross region scenario is to have two (or more) pairs of Web PubSub service instances and app servers.
@@ -44,7 +51,7 @@ Below is a diagram that illustrates such topology:
44
51
45
52

46
53
47
-
## Failover sequence and best practice
54
+
####Failover sequence and best practice
48
55
49
56
Now you have the right system topology setup. Whenever one Web PubSub service instance is down, online traffic will be routed to other instances.
50
57
Here is what happens when a primary instance is down (and recovers after some time):
@@ -88,6 +95,14 @@ Be noted no matter which patterns you choose to use, you'll need to connect each
88
95
Also due to the nature of WebSocket connection (it's a long connection), clients will experience connection drops when there is a disaster and failover take place.
89
96
You'll need to handle such cases at client side to make it transparent to your end customers. For example, do reconnect after a connection is closed.
90
97
98
+
### High available architecture for client-client pattern
99
+
100
+
For client-client pattern, currently it is not yet possible to support a zero-down-time disaster recovery.
101
+
102
+
The general principles when handling disaster recovery for client-client pattern are:
103
+
1. Make sure there is only one **primary** Web PubSub service available for all the running app server instances across regions.
104
+
2. Make sure there is no active clients connected to **secondary** Web PubSub services.
0 commit comments