| CPC G06F 9/4843 (2013.01) [H04L 47/215 (2013.01); H04L 47/22 (2013.01)] | 16 Claims |

|
1. A computing device for traffic shaping, the computing device comprising:
one or more processor(s) coupled to a memory, wherein the memory comprises a set of instructions which when executed causes the one or more processor(s) to:
divide a burst period associated with a shaper queue into a plurality of microbursts based at least on a count of worker threads corresponding to a plurality of queues and a shaper bandwidth, wherein the plurality of queues constitutes the shaper queue;
generate one or more tokens to be filled in a token bucket;
fill the token bucket with the generated one or more tokens after every burst period in such a manner that the one or more tokens in the token bucket correspond to the shaper bandwidth, wherein the one or more tokens are used for a dequeue operation to dequeue packets from the plurality of queues;
maintain a token balance that comprises tokens corresponding to a number of bytes that can be dequeued during a dequeue operation;
subtract bytes dequeued during the dequeue operation from the token balance; and
add bytes worth a microburst to the token balance from the token bucket.
|