A Weighted Random Early Detection (WRED) algorithm is described. The WRED
algorithm provides fairness to responsive TCP and non-responsive UDP
traffic at a buffer of a communications system. Because TCP traffic is
responsive to congestion occurrences while UDP traffic is not, without
controls, UDP will monopolize the buffer bandwidth. This invention solves
the problem by applying congestion control alogrithms to TCP and UDP
traffic separately. Discard thresholds for UDP traffic are dynamically
modified in a manner that limits UDP traffic to a provisioned percentage
of the buffer's available bandwidth, while a traditional WRED algorithm
is applied to TCP traffic.