influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.6k stars 5.57k forks source link

Allow for configuration of DSCP #5553

Closed timhallinflux closed 2 years ago

timhallinflux commented 5 years ago

Feature Request

A Differentiated Services Code Point (DSCP) is a packet header value that can be used to request (for example) high priority or best effort delivery for traffic. Session-Based DSCP Classification allows you to both honor DSCP values for incoming traffic and to mark a session with a DSCP value as session traffic exits a firewall. This enables all inbound and outbound traffic for a session can receive continuous QoS treatment as it flows through a network. For example, inbound return traffic from an external server can now be treated with the same QoS priority that the firewall initially enforced for the outbound flow based on the DSCP value the firewall detected at the beginning of the session. Network devices between the firewall and end user will also then enforce the same priority for the return traffic (and any other outbound or inbound traffic for the session).

Different types of DSCP markings indicate different levels of service: Completing this step enables a firewall to mark traffic with the same DSCP value that was detected at the beginning of a session (in this example, a firewall would mark return traffic with the DSCP AF11 value). While configuring QoS allows you to shape traffic as it egresses the firewall, enabling this option in a security rule allows the other network devices intermediate to the firewall and the client to continue to enforce priority for DSCP marked traffic.

Expedited Forwarding (EF): Can be used to request low loss, low latency and guaranteed bandwidth for traffic. Packets with EF codepoint values are typically guaranteed highest priority delivery.

Assured Forwarding (AF): Can be used to provide reliable delivery for applications. Packets with AF codepoint indicate a request for the traffic to receive higher priority treatment than best effort service provides (though packets with an EF codepoint will continue to take precedence over those with an AF codepoint).

Class Selector (CS): Can be used to provide backward compatibility with network devices that use the IP precedence field to mark priority traffic.

IP Precedence (ToS): Can be used by legacy network devices to mark priority traffic (the IP Precedence header field was used to indicate the priority for a packet before the introduction of the DSCP classification).

Custom Codepoint: Create a custom codepoint to match to traffic by entering a Codepoint Name and Binary Value.

For example, select the Assured Forwarding (AF) to ensure traffic marked with an AF codepoint value has higher priority for reliable delivery over applications marked to receive lower priority.Use the following steps to enable Session-Based DSCP Classification. Start by configuring QoS based on DSCP marking detected at the beginning of a session. You can then continue to enable the firewall to mark the return flow for a session with the same DSCP value used to enforce QoS for the initial outbound flow.

Proposal:

Enable the user to configure these lower level networking options within the agent configurations. Doing so will allow for additional QoS routing to be applied through network devices (such as firewalls, etc.) This can be beneficial for users with a ton of network traffic -- particularly generated by a large number of Telegraf agents.

Current behavior:

Setting these options is not available within the current config.

Desired behavior:

Allow users to configure DSCP options to take advantage of networking features and capabilities.

danielnelson commented 5 years ago

I wonder if this needs to be set per plugin or across the full agent?

It should also be possible to not include this directly in Telegraf and have the host system set this on outgoing traffic with iptables.

sspaink commented 2 years ago

Closing in favor of recommending to use iptables opposed to integrating it into Telegraf.