Skip to content

Commit d120a18

Browse files
authored
Update concept-disaster-recovery.md
1 parent dbf6649 commit d120a18

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

articles/azure-web-pubsub/concept-disaster-recovery.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: An overview on how to set up multiple Azure Web PubSub service inst
44
author: vicancy
55
ms.service: azure-web-pubsub
66
ms.topic: conceptual
7-
ms.date: 11/08/2021
7+
ms.date: 05/28/2023
88
ms.author: lianwei
99
---
1010
# 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
1515

1616
## High available architecture for Web PubSub service
1717

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
1825
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.
1926

2027
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:
4451

4552
![Diagram shows two regions each with an app server and a Web PubSub service, where each server is associated with the Web PubSub service in its region as primary and with the service in the other region as secondary.](media/concept-disaster-recovery/topology.png)
4653

47-
## Failover sequence and best practice
54+
#### Failover sequence and best practice
4855

4956
Now you have the right system topology setup. Whenever one Web PubSub service instance is down, online traffic will be routed to other instances.
5057
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
8895
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.
8996
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.
9097

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.
105+
91106
## How to test a failover
92107

93108
Follow the steps to trigger the failover:

0 commit comments

Comments
 (0)