1. Home
  2. Protocol
  3. Quality of Service (QOS)

Quality of Service (QOS)

Starting with StayLinked Server build 208, there is a feature that can help Linux and Unix installations that utilizes QoS in their network relying on Differentiated Services (DiffServ) packet headers that prioritize delivery of network traffic. Windows installations can utilize the Microsoft recommendations listed below in the section for Windows.

More information for Differentiated Services can be found here:

https://en.wikipedia.org/wiki/Differentiated_services

In short, Java supports an 8 bit (256 values) field, called the Differentiated Services (DS) field, or Traffic Class, where the first 6 bits (64 values) are the DSCP (differentiated services code point) field.

When the DSCP value is set appropriately (see the above link for possible values), some network equipment will give it higher priority.

For Linux and Unix:

We will be able to attempt setting the DSCP value by using the values in the StayLinked server.

The setting will be manually configured in the espadmin.xml file using a new 'traffic_class' attribute of the <protocol> node in the XML document. How it Works:

<protocol traffic_class="184"/>  (this is the value for the most common one… Expedited Forwarding)

Valid values you can set for traffic_class are 0 to 255.

Note that values for Traffic Class are specified in Decimal, but include the final two bits which are not used for DiffServ, so you’ll need to manually adjust them.

For example, if you want to turn on Expedited Forwarding, you would want to use Decimal 46 (101110), but since we set the traffic class, you need to use 10111000 (two 0's added to the end), which is a decimal value of 184.

This change will take effect for new Connections only after either restarting the StayLinked service, or placing a file called reload.xml in the ../stay-linked/config folder and then logging off and on. The reload will delete the reload.xml file.

You can confirm it is working by looking in the Handler log for a new connection. There will be a line similar to the following.

StayLinked Handler has set Client2Host Socket Traffic Class = 0xb8

For Windows:

Setting the Traffic Class has been confirmed to work for Linux and does not work for current Windows Operating Systems (the OS blocks application packet labeling). On a Windows OS, you would want to use Windows Policy Management for QoS:

https://learn.microsoft.com/en-us/windows-server/networking/technologies/qos/qos-policy-manage

to set the Diff Serv value for outbound traffic.

Both approaches have been confirmed to work with Wireshark.

Updated on October 24, 2023

Related Articles