mirror of https://github.com/grpc/grpc.git
[core] Add a channel argument to set DSCP on streams (#28322)
This adds a new channel argument `GRPC_ARG_DSCP` which allows users to create classified gRPC streams with a Differentiated Services Code Point (DSCP) marking on the IP frames. The channel argument is handled on both clients and servers, but currently only on posix based systems. Fixes #17225 **Background**: In addition to what is already described is #17225, when gRPC is used in telco systems there is often a need to classify streams of importance. There can be multiple hops between two endpoints (e.g. between 2 telecom operators) and some streams that are more important than others (e.g. emergency call related or similar). By marking the IP packets using DSCP the aware routers can make a sound decision of the prioritization. This PR propose to use DSCP as the configuration value since its common for both IPv4/IPv6, an alternative would be to use a config name that includes TOS and Traffic Class. There might be more needed regarding documentation and end2end testing, but there I need some advice. **References** https://datatracker.ietf.org/doc/html/rfc2474 https://www.iana.org/assignments/dscp-registry/dscp-registry.xhtml <!-- Your pull request will be routed to the following person by default for triaging. If you know who should review your pull request, please remove the mentioning below. --> @yashyktpull/33588/head
parent
189acd82dc
commit
ac874c2c83
17 changed files with 157 additions and 2 deletions
@ -0,0 +1,12 @@ |
||||
# Quality of Service (QoS) using Differentiated services |
||||
|
||||
Differentiated services or DiffServ is a mechanism for classifying network traffic and providing quality of service on IP networks. |
||||
DiffServ uses dedicated fields in the IP header for packet classification purposes. |
||||
By marking outgoing packets using a Differentiated Services Code Point (DSCP) the network can prioritize accordingly. |
||||
|
||||
The DSCP value on outgoing packets is controlled by the following channel argument: |
||||
|
||||
* **GRPC_ARG_DSCP** |
||||
* This channel argument accepts integer values 0 to 63. See [dscp-registry](https://www.iana.org/assignments/dscp-registry/dscp-registry.xhtml) for details. |
||||
* Default value is to use system default, i.e. not set. |
||||
* Only apply to POSIX systems. |
Loading…
Reference in new issue