Skip to content

Commit 605dc10

Browse files
Merge pull request #226308 from cebundy/sigr-internals
[SignalR]: Freshness review of signalr-concept-internals.md
2 parents 4321090 + 5aa3023 commit 605dc10

8 files changed

+245
-268
lines changed

articles/azure-signalr/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
href: howto-shared-private-endpoints-key-vault.md
124124
- name: Use managed identity
125125
href: howto-use-managed-identity.md
126-
- name: Authorize from Azure Application
126+
- name: Authorize from Azure Applications
127127
href: signalr-howto-authorize-application.md
128128
- name: Authorize from Managed Identity
129129
href: signalr-howto-authorize-managed-identity.md

articles/azure-signalr/concept-connection-string.md

Lines changed: 88 additions & 96 deletions
Large diffs are not rendered by default.

articles/azure-signalr/howto-network-access-control.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,41 @@ services: signalr
66
author: vicancy
77
ms.service: signalr
88
ms.topic: conceptual
9-
ms.date: 05/06/2020
9+
ms.date: 03/29/2023
1010
ms.author: lianwei
1111
---
1212

1313
# Configure network access control
1414

15-
Azure SignalR Service enables you to secure and control the level of access to your service endpoint, based on the request type and subset of networks used. When network rules are configured, only applications requesting data over the specified set of networks can access your Azure SignalR Service.
15+
Azure SignalR Service enables you to secure and control the level of access to your service endpoint based on the request type and subset of networks. When network rules are configured, only applications requesting data over the specified set of networks can access your SignalR Service.
1616

17-
Azure SignalR Service has a public endpoint that is accessible through the internet. You can also create [Private Endpoints for your Azure SignalR Service](howto-private-endpoints.md). Private Endpoint assigns a private IP address from your VNet to the Azure SignalR Service, and secures all traffic between your VNet and the Azure SignalR Service over a private link. The Azure SignalR Service network access control provides access control for both public endpoint and private endpoints.
17+
SignalR Service has a public endpoint that is accessible through the internet. You can also create [private endpoints for your Azure SignalR Service](howto-private-endpoints.md). A private endpoint assigns a private IP address from your VNet to the SignalR Service, and secures all traffic between your VNet and the SignalR Service over a private link. The SignalR Service network access control provides access control for both public and private endpoints.
1818

19-
Optionally, you can choose to allow or deny certain types of requests for public endpoint and each private endpoint. For example, you can block all [Server Connections](signalr-concept-internals.md#server-connections) from public endpoint and make sure they only originate from a specific VNet.
19+
Optionally, you can choose to allow or deny certain types of requests for the public endpoint and each private endpoint. For example, you can block all [Server Connections](signalr-concept-internals.md#application-server-connections) from public endpoint and make sure they only originate from a specific VNet.
2020

21-
An application that accesses an Azure SignalR Service when network access control rules are in effect still requires proper authorization for the request.
21+
An application that accesses a SignalR Service when network access control rules are in effect still requires proper authorization for the request.
2222

2323
## Scenario A - No public traffic
2424

25-
To completely deny all public traffic, you should first configure the public network rule to allow no request type. Then, you should configure rules that grant access to traffic from specific VNets. This configuration enables you to build a secure network boundary for your applications.
25+
To completely deny all public traffic, first configure the public network rule to allow no request type. Then, you can configure rules that grant access to traffic from specific VNets. This configuration enables you to build a secure network boundary for your applications.
2626

2727
## Scenario B - Only client connections from public network
2828

29-
In this scenario, you can configure the public network rule to only allow [Client Connections](signalr-concept-internals.md#client-connections) from public network. You can then configure private network rules to allow other types of requests originating from a specific VNet. This configuration hides your app servers from public network and establishes secure connections between your app servers and Azure SignalR Service.
29+
In this scenario, you can configure the public network rule to only allow [Client Connections](signalr-concept-internals.md#client-connections) from the public network. You can then configure private network rules to allow other types of requests originating from a specific VNet. This configuration hides your app servers from the public network and establishes secure connections between your app servers and SignalR Service.
3030

3131
## Managing network access control
3232

33-
You can manage network access control for Azure SignalR Service through the Azure portal.
33+
You can manage network access control for SignalR Service through the Azure portal.
3434

35-
### Azure portal
36-
37-
1. Go to the Azure SignalR Service you want to secure.
38-
39-
1. Click on the settings menu called **Network access control**.
35+
1. Go to the SignalR Service instance you want to secure.
36+
1. Select **Network access control** from the left side menu.
4037

4138
![Network ACL on portal](media/howto-network-access-control/portal.png)
4239

4340
1. To edit default action, toggle the **Allow/Deny** button.
4441

4542
> [!TIP]
46-
> Default action is the action we take when there is no ACL rule matches. For example, if the default action is **Deny**, then request types that are not explicitly approved below will be denied.
43+
> The default action is the action the service takes when no access control rule matches a request. For example, if the default action is **Deny**, then the request types that are not explicitly approved will be denied.
4744
4845
1. To edit public network rule, select allowed types of requests under **Public network**.
4946

@@ -53,7 +50,7 @@ You can manage network access control for Azure SignalR Service through the Azur
5350

5451
![Edit private endpoint ACL on portal ](media/howto-network-access-control/portal-private-endpoint.png)
5552

56-
1. Click **Save** to apply your changes.
53+
1. Select **Save** to apply your changes.
5754

5855
## Next steps
5956

articles/azure-signalr/signalr-concept-internals.md

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,55 @@ ms.service: signalr
66
ms.topic: conceptual
77
ms.devlang: csharp
88
ms.custom: devx-track-csharp
9-
ms.date: 11/13/2019
9+
ms.date: 03/29/2023
1010
ms.author: lianwei
1111
---
1212
# Azure SignalR Service internals
1313

1414
Azure SignalR Service is built on top of ASP.NET Core SignalR framework. It also supports ASP.NET SignalR by reimplementing ASP.NET SignalR's data protocol on top of the ASP.NET Core framework.
1515

16-
You can easily migrate a local ASP.NET Core SignalR application or ASP.NET SignalR application to work with SignalR Service, with a few lines of code change.
16+
You can easily migrate a local ASP.NET Core SignalR or an ASP.NET SignalR application to work with SignalR Service, with by changing few lines of code.
1717

18-
The diagram below describes the typical architecture when you use the SignalR Service with your application server.
18+
The diagram describes the typical architecture when you use the SignalR Service with your application server.
1919

2020
The differences from self-hosted ASP.NET Core SignalR application are discussed as well.
2121

2222
![Architecture](./media/signalr-concept-internals/arch.png)
2323

24-
## Server connections
24+
## Application server connections
2525

26-
Self-hosted ASP.NET Core SignalR application server listens to and connects clients directly.
26+
A self-hosted ASP.NET Core SignalR application server listens to and connects clients directly.
2727

28-
With SignalR Service, the application server is no longer accepting persistent client connections, instead:
28+
With SignalR Service, the application server no longer accepts persistent client connections, instead:
2929

3030
1. A `negotiate` endpoint is exposed by Azure SignalR Service SDK for each hub.
31-
1. This endpoint will respond to client's negotiation requests and redirect clients to SignalR Service.
32-
1. Eventually, clients will be connected to SignalR Service.
31+
1. The endpoint responds to client negotiation requests and redirect clients to SignalR Service.
32+
1. The clients connect to SignalR Service.
3333

3434
For more information, see [Client connections](#client-connections).
3535

36-
Once the application server is started,
37-
- For ASP.NET Core SignalR, Azure SignalR Service SDK opens 5 WebSocket connections per hub to SignalR Service.
38-
- For ASP.NET SignalR, Azure SignalR Service SDK opens 5 WebSocket connections per hub to SignalR Service, and one per application WebSocket connection.
36+
Once the application server is started:
3937

40-
5 WebSocket connections is the default value that can be changed in [configuration](https://github.com/Azure/azure-signalr/blob/dev/docs/run-asp-net-core.md#connectioncount). Please note that this configures the initial server connection count the SDK starts. While the app server is connected to the SignalR service, the Azure SignalR service might send load-balancing messages to the server and the SDK will start new server connections to the service for better performance.
38+
- For ASP.NET Core SignalR: Azure SignalR Service SDK opens five WebSocket connections per hub to SignalR Service.
39+
- For ASP.NET SignalR: Azure SignalR Service SDK opens five WebSocket connections per hub to SignalR Service, and one per application WebSocket connection.
4140

42-
Messages to and from clients will be multiplexed into these connections.
4341

44-
These connections will remain connected to the SignalR Service all the time. If a server connection is disconnected for network issue,
45-
- all clients that are served by this server connection disconnect (for more information about it, see [Data transmit between client and server](#data-transmit-between-client-and-server));
46-
- the server connection starts reconnecting automatically.
42+
The initial number of connections defaults to 5 and is configurable using the `InitialHubServerConnectionCount` option in the SignalR Service SDK. For more information, see [configuration](https://github.com/Azure/azure-signalr/blob/dev/docs/run-asp-net-core.md#maxhubserverconnectioncount).
43+
44+
While the application server is connected to the SignalR service, the Azure SignalR service may send load-balancing messages to the server. Then, the SDK starts new server connections to the service for better performance. Messages to and from clients are multiplexed into these connections.
45+
46+
Server connections are persistently connected to the SignalR Service. If a server connection is disconnected due to a network issue:
47+
48+
- All clients served by this server connection disconnect. For more information, see [Data transmission between client and server](#data-transmission-between-client-and-server).
49+
- The server automatically reconnects the clients.
4750

4851
## Client connections
4952

50-
When you use the SignalR Service, clients connect to SignalR Service instead of application server.
51-
There are two steps to establish persistent connections between the client and the SignalR Service.
53+
When you use the SignalR Service, clients connect to the service instead of the application server.
54+
There are three steps to establish persistent connections between the client and the SignalR Service.
5255

53-
1. Client sends a negotiate request to the application server. With Azure SignalR Service SDK, application server returns a redirect response with SignalR Service's URL and access token.
56+
1. A client sends a negotiate request to the application server.
57+
1. The application server uses Azure SignalR Service SDK to return a redirect response containing the SignalR Service URL and access token.
5458

5559
- For ASP.NET Core SignalR, a typical redirect response looks like:
5660
```
@@ -68,21 +72,29 @@ There are two steps to establish persistent connections between the client and t
6872
}
6973
```
7074
71-
1. After receiving the redirect response, client uses the new URL and access token to start the normal process to connect to SignalR Service.
75+
1. After the client receives the redirect response, it uses the URL and access token to connect to SignalR Service.
76+
77+
To learn more about ASP.NET Core SignalR's, see [Transport Protocols](https://github.com/aspnet/SignalR/blob/release/2.2/specs/TransportProtocols.md).
7278
73-
Learn more about ASP.NET Core SignalR's [transport protocols](https://github.com/aspnet/SignalR/blob/release/2.2/specs/TransportProtocols.md).
79+
## Data transmission between client and server
7480
75-
## Data transmit between client and server
81+
When a client is connected to the SignalR Service, the service runtime finds a server connection to serve this client.
7682
77-
When a client is connected to the SignalR Service, service runtime will find a server connection to serve this client
78-
- This step happens only once, and is a one-to-one mapping between the client and server connections.
83+
- This step happens only once, and is a one-to-one mapping between the client and server connection.
7984
- The mapping is maintained in SignalR Service until the client or server disconnects.
8085
8186
At this point, the application server receives an event with information from the new client. A logical connection to the client is created in the application server. The data channel is established from client to application server, via SignalR Service.
8287
83-
SignalR Service transmits data from the client to the pairing application server. And data from the application server will be sent to the mapped clients.
88+
SignalR Service transmits data from the client to the pairing application server. Data from the application server is sent to the mapped clients.
89+
90+
SignalR Service doesn't save or store customer data, all customer data received is transmitted to the target server or clients in real-time.
91+
92+
The Azure SignalR Service acts as a logical transport layer between application server and clients. All persistent connections are offloaded to SignalR Service. As a result, the application server only needs to handle the business logic in the hub class, without worrying about client connections.
93+
94+
## Next steps
8495
85-
SignalR Service does not save or store customer data, all customer data received is transmitted to target server or clients in real-time.
96+
To learn more about Azure SignalR SDKs, see:
8697
87-
As you can see, the Azure SignalR Service is essentially a logical transport layer between application server and clients. All persistent connections are offloaded to SignalR Service.
88-
Application server only needs to handle the business logic in hub class, without worrying about client connections.
98+
- [ASP.NET Core SignalR](/aspnet/core/signalr/introduction)
99+
- [ASP.NET SignalR](/aspnet/signalr/overview/getting-started/introduction-to-signalr)
100+
- [ASP.NET code samples](https://github.com/aspnet/AzureSignalR-samples)

0 commit comments

Comments
 (0)