The following metering primitives are available:
The metering primitives can be used like any Boolean expression.
Examples:
// Typical two-rate meter $p1 = bucket(rate 1Mbps,burst 20kB); $p2 = bucket(rate 2Mbps,burst 2kB); prio { class if conform $p1 && conform $p2 && count $p1 && count $p2; class if conform $p2 && count $p2; class if 1; }
// Rate limiter $p = bucket(rate 50kbps,burst 3kB,mpu 200B); ingress { class (1) if conform $p && count $p; drop if 1; }