Skip to content

Commit f2b5b4b

Browse files
committed
Merge requirement 201 into text.
1 parent 7f0cec0 commit f2b5b4b

1 file changed

Lines changed: 63 additions & 58 deletions

File tree

asciidoc/volume2/concurrent-connections/tf2-ch-a-mdpws-concurrent-connections.adoc

Lines changed: 63 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,42 @@
11
[#vol2_ch_a_mdpws_concurrent_connections]
22
==== MDPWS Concurrent Consumer TCP Connections
33

4-
SDC allows a <<vol1_spec_sdpi_p_actor_somds_consumer>> to open multiple, concurrent TCP
5-
connections to a <<vol1_spec_sdpi_p_actor_somds_provider>>'s hosted services.
6-
While this offers flexibility for implementations, <<vol1_spec_sdpi_p_actor_somds_provider>>
7-
may constrain the number of concurrent TCP connections to help mitigate risks to the availability of its
8-
<<acronym_sfc,system function contribution>>.
9-
For example, securing connections may be expensive or network bandwidth may be limited.
10-
11-
This section describes scenarios and recommendations for managing concurrent connections
12-
between consumers and providers.
13-
14-
.R0201
15-
[sdpi_requirement#r0201,sdpi_req_level=may]
16-
[sdpi_req_type=risk_mitigation,sdpi_ses_type=effectiveness,sdpi_ses_test=wire]
17-
****
18-
[NORMATIVE]
19-
====
20-
The <<term_manufacturer>> of a <<vol1_spec_sdpi_p_actor_somds_provider>> may limit the number of
21-
concurrent TCP connections from an individual <<vol1_spec_sdpi_p_actor_somds_consumer>> to its hosted services.
22-
====
23-
24-
[NOTE]
25-
====
26-
* A <<vol1_spec_sdpi_p_actor_somds_provider>> may choose to limit the number of concurrent connections
27-
accepted from an individual <<vol1_spec_sdpi_p_actor_somds_consumer>> to one or more, or
28-
allow unlimited connections, based on its resource capabilities and design goals.
29-
* To enforce TCP connection limits, a provider may identify a <<vol1_spec_sdpi_p_actor_somds_consumer>> by its:
30-
** <<term_transport_address>> and/or,
31-
** `[source endpoint]` message property (see <<ref_oasis_ws_addressing_2006>>) and/or,
32-
** client credentials used for TLS authentication.
33-
* Securing the connection may be the most expensive part of an SDC service operation, so a <<vol1_spec_sdpi_p_actor_somds_provider>> may
34-
drop concurrent connections from a <<vol1_spec_sdpi_p_actor_somds_consumer>> that exceed its limits, or respond with
35-
HTTP status code `429 (Too Many Requests)` (after securing the connection) to signal the <<vol1_spec_sdpi_p_actor_somds_consumer>>
36-
to reduce its connection count and/or frequency.
37-
====
4+
SDC allows a <<vol1_spec_sdpi_p_actor_somds_consumer>> to open multiple,
5+
concurrent TCP connections to the hosted services of a
6+
<<vol1_spec_sdpi_p_actor_somds_provider>>. While this offers flexibility for
7+
implementations, opening unlimited connections can negatively impact performance of
8+
and/or resources available in some <<vol1_spec_sdpi_p_actor_somds_provider>>s.
9+
Typical constraints might include the cost of securing connections, available
10+
network bandwidth and sockets.
11+
12+
To protect availability of its <<acronym_sfc,system function contribution>>,
13+
the <<term_manufacturer>> of a <<vol1_spec_sdpi_p_actor_somds_provider>>
14+
could choose, for example, to limit the number of concurrent TCP connections that one or more
15+
<<vol1_spec_sdpi_p_actor_somds_consumer>>s can establish with the provider's
16+
hosted services. For example, the <<vol1_spec_sdpi_p_actor_somds_provider>> could:
17+
18+
* drop connections from a <<vol1_spec_sdpi_p_actor_somds_consumer>> that exceed a configured limit
19+
without sending any response; or
20+
* after securing the connection, respond with HTTP status code 429 (too many requests)
21+
to invite the <<vol1_spec_sdpi_p_actor_somds_consumer>> to reduce its connection count and/or
22+
frequency.
23+
24+
However, securing a new connection could be the most resource-intensive part of an SDC service operation.
25+
So, under some conditions, the provider might not be able send a reply.
26+
27+
To enforce a connection limit, a <<vol1_spec_sdpi_p_actor_somds_provider>> could identify a
28+
<<vol1_spec_sdpi_p_actor_somds_consumer>> using one or more of the following:
29+
30+
* its <<term_transport_address>>;
31+
* the `[source endpoint]` message property (see <<ref_oasis_ws_addressing_2006>>); or
32+
* the client credentials used for TLS authentication.
33+
34+
The client credentials and `[source endpoint]` information is only available after
35+
the connection has been secured and, at least part of, the message has been parsed.
36+
So, a <<vol1_spec_sdpi_p_actor_somds_provider>> dropping connections, based only on the
37+
peer's <<term_transport_address>>, could be unable to distingish between multiple
38+
<<vol1_spec_sdpi_p_actor_somds_consumer>>s originating from the same host.
3839

39-
// todo: specify how client credentials can identify consumer based on the work from the
40-
// security working group: https://github.com/ornet-ev/wg-certificates
41-
42-
****
4340

4441
.R0202
4542
[sdpi_requirement#r0202,sdpi_req_level=shall]
@@ -58,27 +55,32 @@ its <<acronym_sfc,system function contribution>>.
5855
5956
[NOTE]
6057
====
61-
* A <<vol1_spec_sdpi_p_actor_somds_consumer>> may create concurrent connections
58+
* A <<vol1_spec_sdpi_p_actor_somds_consumer>> could create concurrent connections
6259
when it invokes operations on one or more of a <<vol1_spec_sdpi_p_actor_somds_provider>>'s
6360
services at the same time.
6461
65-
* A concurrent connection means 2 or more active client connections create by the
62+
* A concurrent connection means 2 or more active client connections created by the
6663
<<term_manufacturer>>'s <<vol1_spec_sdpi_p_actor_somds_participant>> to one other
6764
<<vol1_spec_sdpi_p_actor_somds_participant>>. This requirement does not apply to
6865
connections to different <<vol1_spec_sdpi_p_actor_somds_participant>>s.
6966
67+
* Two <<vol1_spec_sdpi_p_actor_somds_participant>>s sharing a host could be indistinguishable
68+
until the transport security handshake is complete and/or the message header is processed.
69+
Shared hosting could impact <<vol1_spec_sdpi_p_actor_somds_participant>>s dropping
70+
connections based on <<term_transport_address>> alone.
71+
7072
* This requirement does not replace any limitation imposed by other requirements, which
71-
may limit the number of concurrent connections made by a <<vol1_spec_sdpi_p_actor_somds_participant>>
72-
such as RefRequirement:R1001[].
73+
could also limit the number of concurrent connections made by a
74+
<<vol1_spec_sdpi_p_actor_somds_participant>> such as RefRequirement:R1001[].
7375
74-
* A <<vol1_spec_sdpi_p_actor_somds_participant>> may limit the number concurrent connections
75-
and/or frequency of connections when it receives a response with HTTP status code
76-
`429` (Too Many Requests).
76+
* A <<vol1_spec_sdpi_p_actor_somds_participant>> could choose to limit the number
77+
concurrent connections, and/or frequency of connections, when it receives a
78+
response with HTTP status code `429` (too many requests).
7779
78-
* A <<vol1_spec_sdpi_p_actor_somds_consumer>> may limit the number of
80+
* A <<vol1_spec_sdpi_p_actor_somds_consumer>> could limit the number of
7981
active subscriptions or close connections with infrequent notifications.
8082
81-
* A <<vol1_spec_sdpi_p_actor_somds_participant>> may reject, with or without any
83+
* A <<vol1_spec_sdpi_p_actor_somds_participant>> could reject, with or without any
8284
response, any inbound connection attempt. For example, when its backlog of pending
8385
connection attempts exceeds available capacity for new connections.
8486
@@ -90,36 +92,39 @@ connection attempts exceeds available capacity for new connections.
9092

9193
====== Resource Constraints
9294

93-
Devices with limited processing and/or memory resources (e.g., pulse oximeters, infusion pumps, etc.) may support
94-
only a small number of active TCP connections (e.g., 10-20).
95+
Devices with limited processing and/or memory resources (e.g., pulse oximeters, infusion pumps, etc.)
96+
might support only a small number of active TCP connections (e.g., 10-20).
9597
These connections are allocated to support the <<vol1_spec_sdpi_p_actor_somds_provider>>s
9698
<<acronym_sfc,system function contribution>> including: hosted services (e.g., `GET` and subscription management),
9799
publishing updates, discovery and logging.
98100

99101
A <<vol1_spec_sdpi_p_actor_somds_consumer>> opening multiple concurrent connections to a
100-
<<vol1_spec_sdpi_p_actor_somds_provider>>'s hosted services may consume a disproportionate number of
102+
<<vol1_spec_sdpi_p_actor_somds_provider>>'s hosted services could consume a disproportionate number of
101103
available connections, reducing the number of <<vol1_spec_sdpi_p_actor_somds_consumer>>s that a
102104
<<vol1_spec_sdpi_p_actor_somds_provider>> can support and/or compromising its <<acronym_sfc,system function contribution>>.
103105

104106
====== Consumer Rationale for Multiple Connections
105107

106-
A <<vol1_spec_sdpi_p_actor_somds_consumer>> may open multiple concurrent connections to a provider's hosted services to:
108+
A <<vol1_spec_sdpi_p_actor_somds_consumer>> could choose to open multiple concurrent connections
109+
to a provider's hosted services to:
107110

108-
* separate time-critical operations (e.g., `SET SERVICE` operations) from less critical operations (e.g., subscription
109-
renewals),
111+
* separate time-critical operations (e.g., `SET SERVICE` operations) from less critical
112+
operations (e.g., subscription renewals),
110113
* reduce the risk of urgent messages being delayed by less urgent traffic, or
111114
* provide redundancy for critical operations.
112115

113116
===== Interoperability Strategy
114117

115118
====== Status Signalling
116119

117-
A <<vol1_spec_sdpi_p_actor_somds_provider>> experiencing excessive load:
120+
A <<vol1_spec_sdpi_p_actor_somds_provider>> experiencing excessive load could choose to:
118121

119-
* may respond with HTTP status code `429` (Too Many Requests, <<ref_rfc_6585,RFC 6585, section 4>>), and
120-
* may include a `Retry-After` header (<<ref_rfc_7231,RFC 7231, section 7.3.1>>) to indicate when the consumer may retry the request.
122+
* respond with HTTP status code `429` (too many requests, <<ref_rfc_6585,RFC 6585, section 4>>), and
123+
* include a `Retry-After` header (<<ref_rfc_7231,RFC 7231, section 7.3.1>>) to indicate when the consumer
124+
could retry the request.
121125

122-
Consumers can interpret this response as a signal to adapt their connection strategy. For example, a consumer may:
126+
Consumers can interpret this response as a signal to adapt their connection strategy. For example, a consumer
127+
could choose to:
123128

124129
* reduce the number of concurrent connections,
125130
* use a single connection for all operations,
@@ -146,7 +151,7 @@ HTTP-date values and potential clock synchronization issues between devices.
146151

147152
| Normal provider (no constraints)
148153
| Accept multiple connections per consumer
149-
| May use multiple connections for priority separation if desired
154+
| Use multiple connections for priority separation if desired
150155

151156
| Provider under load (temporary)
152157
| Respond with `429` to new connection attempts and include a `Retry-After` header

0 commit comments

Comments
 (0)