A packet-based traffic shaping system including a scheduler that forwards
packets in accordance with a scheduling algorithm from queues that have
at least a minimum good credit rating. The minimum good credit rating is
not dependent on the size of a packet that is to be forwarded. Rate
shapers associated with the queues reduce credit by transmission costs
associated with the packets and restore credit incrementally over time.
When a queue is empty, credit does not accumulate above an idle credit
value at the associated rate shaper. When a packet is enqueued in a queue
that has been idle for a period of time, the packet is forwarded without
undue delay.