firecracker-node
    Preparing search index...

    Interface TokenBucket

    Defines a token bucket with a maximum capacity (size), an initial burst size (one_time_burst) and an interval for refilling purposes (refill_time).

    • The refill-rate is derived from size and refill_time, and it is the constant rate at which the tokens replenish. The refill process only starts happening after the initial burst budget is consumed.
    • Consumption from the token bucket is unbounded in speed which allows for bursts bound in size by the amount of tokens available.
    • Once the token bucket is empty, consumption speed is bound by the refill_rate.
    interface TokenBucket {
        one_time_burst?: number;
        refill_time: number;
        size: number;
    }
    Index

    Properties

    one_time_burst?: number
    refill_time: number

    The number of bytes/operations added to the bucket per second.

    size: number

    The initial size of a token bucket.