Patent ID: 8032653

Claim:
A method for allocating bandwidth in a network appliance, the method comprising: determining, by the network appliance, that a first policy is to be applied to a packet stored in an input queue of the network appliance; determining, by the network appliance and based on determining that the first policy is to be applied to the packet, whether a first bandwidth in a maximum bandwidth bucket is sufficient to allow the packet to pass immediately through the network appliance, where the first bandwidth is allocated to the maximum bandwidth bucket based on a maximum bandwidth allocation associated with the first policy; determining, by the network appliance and when the first bandwidth is determined to be sufficient to allow the packet to pass immediately through the network appliance, whether a second bandwidth in one of a plurality of guaranteed bandwidth buckets is sufficient to allow the packet to pass immediately through the network appliance, where the second bandwidth is allocated to the one of the plurality of guaranteed bandwidth buckets based on a guaranteed bandwidth allocation associated with the first policy; transferring, by the network appliance, a shared bandwidth from a shared bandwidth bucket to the one of the plurality of guaranteed bandwidth buckets when the second bandwidth in the one of the plurality of guaranteed bandwidth buckets is not sufficient to allow the packet to pass immediately through the network appliance, where the shared bandwidth is allocated to the shared bandwidth bucket based on an underutilization of bandwidth in any one of the plurality of bandwidth buckets; determining, by the network appliance and when the second bandwidth or the shared bandwidth is sufficient to allow the packet to pass immediately through the network appliance, whether a different policy is to be applied to the packet; determining, by the network appliance and when the different policy is to be applied to the packet, whether a third bandwidth in another one of the plurality of guaranteed bandwidth buckets is sufficient to allow the packet to pass immediately through the network appliance, where the third bandwidth is allocated to the other one of the plurality of guaranteed bandwidth buckets based on another guaranteed bandwidth associated with the different policy; and transferring bandwidth from the shared bandwidth bucket to the other one of the plurality of guaranteed bandwidth buckets when the third bandwidth, in the other one of the plurality of guaranteed bandwidth buckets, is not sufficient to allow the packet to pass immediately through the network appliance.