qdisc
also: queueing discipline, traffic qdisc
A qdisc (queueing discipline) is a kernel subsystem that manages how network packets are queued and transmitted on a network interface. It determines the order, timing, and rate at which packets leave the system.
A qdisc is the queuing mechanism in Linux's traffic control (tc) system that sits between the network stack and the physical network interface. When packets are ready to transmit, they are placed into a qdisc queue, which decides how to schedule their departure based on configured rules.
Different qdisc types provide different behaviors. For example, pfifo_fast (the default) uses simple FIFO queuing, while fq_codel implements active queue management to reduce latency. Advanced qdiscs like htb (Hierarchical Token Bucket) allow bandwidth limiting and traffic shaping across multiple priority classes.
Qdiscs are configured using the tc qdisc command. Example: tc qdisc add dev eth0 root tbf rate 1mbit burst 32kbit latency 400ms adds a token bucket filter qdisc to eth0 limiting traffic to 1 Mbps.