Random early detection
Random early detection (RED), also known as random early discard or random early drop, is a queuing discipline for a network scheduler suited for congestion avoidance.<ref>Template:Cite journal</ref>
In the conventional tail drop algorithm, a router or other network component buffers as many packets as it can, and simply drops the ones it cannot buffer. If buffers are constantly full, the network is congested. Tail drop distributes buffer space unfairly among traffic flows. Tail drop can also lead to TCP global synchronization as all TCP connections "hold back" simultaneously, and then step forward simultaneously. Networks become under-utilized and flooded—alternately, in waves.
RED addresses these issues by pre-emptively dropping packets before the buffer becomes completely full. It uses predictive models to decide which packets to drop. It was invented in the early 1990s by Sally Floyd and Van Jacobson.<ref>Template:Cite news</ref>
OperationEdit
RED monitors the average queue size and drops (or marks when used in conjunction with ECN) packets based on statistical probabilities. If the buffer is almost empty, then all incoming packets are accepted. As the queue grows, the probability for dropping an incoming packet grows too. When the buffer is full, the probability has reached 1 and all incoming packets are dropped.
RED is more fair than tail drop, in the sense that it does not possess a bias against bursty traffic that uses only a small portion of the bandwidth. The more a host transmits, the more likely it is that its packets are dropped as the probability of a host's packet being dropped is proportional to the amount of data it has in a queue. Early detection helps avoid TCP global synchronization.
Problems with classic REDEdit
According to Van Jacobson, "there are not one, but two bugs in classic RED."<ref name="jgred">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Improvements to the algorithm were developed, and a draft paper<ref>Template:Cite journal</ref> was prepared, but the paper was never published, and the improvements were not widely disseminated or implemented. There has been some work in trying to finish off the research and fix the bugs.<ref name="jgred" />
Pure RED does not accommodate quality of service (QoS) differentiation. Weighted RED (WRED) and RED with In and Out (RIO)<ref>Template:Cite news</ref> provide early detection with QoS considerations.
Other variantsEdit
WREDEdit
In weighted RED you can have different probabilities for different priorities (IP precedence, DSCP) and/or queues.<ref>Template:Cite book</ref>
AREDEdit
The adaptive RED or active RED (ARED) algorithm<ref>Template:Cite journal</ref> infers whether to make RED more or less aggressive based on the observation of the average queue length. If the average queue length oscillates around min threshold then early detection is too aggressive. On the other hand, if the average queue length oscillates around max threshold then early detection is being too conservative. The algorithm changes the probability according to how aggressively it senses it has been discarding traffic.
See Srikant<ref>Template:Cite book</ref> for an in-depth account on these techniques and their analysis.
RREDEdit
Robust random early detection (RRED) algorithm was proposed to improve the TCP throughput against Denial-of-Service (DoS) attacks, particularly Low-rate Denial-of-Service (LDoS) attacks. Experiments have confirmed that the existing RED-like algorithms are notably vulnerable under Low-rate Denial-of-Service (LDoS) attacks due to the oscillating TCP queue size caused by the attacks.<ref name=RRED>Template:Cite journal</ref> RRED algorithm can significantly improve the performance of TCP under Low-rate Denial-of-Service attacks.<ref name="RRED"/>
See alsoEdit
ReferencesEdit
External linksEdit
- RED (Random Early Detection) Queue Management. Author: Sally Floyd
- Guduz – A Simple Random Early Detection (RED) Simulator
- Variants of RED Template:Webarchive. Author: Hei Xiao Jun
- Recent Publications in Random Early Detection (RED) schemes Template:Webarchive