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-signalr/howto-network-access-control.md
+12-15Lines changed: 12 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,44 +6,41 @@ services: signalr
6
6
author: vicancy
7
7
ms.service: signalr
8
8
ms.topic: conceptual
9
-
ms.date: 05/06/2020
9
+
ms.date: 03/29/2023
10
10
ms.author: lianwei
11
11
---
12
12
13
13
# Configure network access control
14
14
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.
16
16
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.
18
18
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.
20
20
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.
22
22
23
23
## Scenario A - No public traffic
24
24
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.
26
26
27
27
## Scenario B - Only client connections from public network
28
28
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.
30
30
31
31
## Managing network access control
32
32
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.
34
34
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.
40
37
41
38

42
39
43
40
1. To edit default action, toggle the **Allow/Deny** button.
44
41
45
42
> [!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.
47
44
48
45
1. To edit public network rule, select allowed types of requests under **Public network**.
49
46
@@ -53,7 +50,7 @@ You can manage network access control for Azure SignalR Service through the Azur
53
50
54
51

Copy file name to clipboardExpand all lines: articles/azure-signalr/signalr-concept-internals.md
+40-28Lines changed: 40 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,51 +6,55 @@ ms.service: signalr
6
6
ms.topic: conceptual
7
7
ms.devlang: csharp
8
8
ms.custom: devx-track-csharp
9
-
ms.date: 11/13/2019
9
+
ms.date: 03/29/2023
10
10
ms.author: lianwei
11
11
---
12
12
# Azure SignalR Service internals
13
13
14
14
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.
15
15
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.
17
17
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.
19
19
20
20
The differences from self-hosted ASP.NET Core SignalR application are discussed as well.
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.
27
27
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:
29
29
30
30
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.
33
33
34
34
For more information, see [Client connections](#client-connections).
35
35
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:
39
37
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.
41
40
42
-
Messages to and from clients will be multiplexed into these connections.
43
41
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.
47
50
48
51
## Client connections
49
52
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.
52
55
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.
54
58
55
59
- For ASP.NET Core SignalR, a typical redirect response looks like:
56
60
```
@@ -68,21 +72,29 @@ There are two steps to establish persistent connections between the client and t
68
72
}
69
73
```
70
74
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).
72
78
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
74
80
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.
76
82
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.
79
84
- The mapping is maintained in SignalR Service until the client or server disconnects.
80
85
81
86
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.
82
87
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
84
95
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:
86
97
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.
0 commit comments