Skip to content

Add tbf (token bucket filter) qdisc to support egress traffic shaping / rate limiting#13196

Merged
copybara-service[bot] merged 2 commits into
masterfrom
test/cl916176633
May 19, 2026
Merged

Add tbf (token bucket filter) qdisc to support egress traffic shaping / rate limiting#13196
copybara-service[bot] merged 2 commits into
masterfrom
test/cl916176633

Conversation

@copybara-service
Copy link
Copy Markdown

@copybara-service copybara-service Bot commented May 15, 2026

Add tbf (token bucket filter) qdisc to support egress traffic shaping / rate limiting

resolves the egress part of #11109.

AI usage disclosure: used ai to help me generate some tests and cleanups after the manual implementation I did by hand modeled after linux/net/sched/sch_tbf.c TBF implementation. Also used it in guided documentation writing. I understand every line of code written and wrote the core logic manually, and happy to answer questions / revisit parts of the implementation as necessary.

Also tested and benchmarked manually against a local Kubernetes kind cluster to ensure it resolves isola-run/isola#290

FUTURE_COPYBARA_INTEGRATE_REVIEW=#13104 from benldrmn:feat/network-traffic-shaping fcb5c35

@copybara-service copybara-service Bot added the exported Issue was exported automatically label May 15, 2026
@benldrmn
Copy link
Copy Markdown
Contributor

@parth-opensrc I don't have access to buildkite, anything I can do to push this forward?

Implements a single-rate TBF qdisc modeled on Linux's net/sched/sch_tbf.c
and exposes it via --qdisc=tbf, with required --qdisc-tbf-rate and
--qdisc-tbf-burst flags. OCI annotations can lower the configured rate
and burst ceilings but not raise them without --allow-flag-override.

The fifo qdisc's circular packet-buffer list moves into a shared
pkg/tcpip/link/qdisc package so both qdiscs share one implementation.
Loopback and ingress traffic are not shaped.
@copybara-service copybara-service Bot force-pushed the test/cl916176633 branch 2 times, most recently from fdf96b5 to e492001 Compare May 19, 2026 21:23
@parth-opensrc
Copy link
Copy Markdown
Contributor

@parth-opensrc I don't have access to buildkite, anything I can do to push this forward?

Will check it out

@copybara-service copybara-service Bot merged commit 18331ea into master May 19, 2026
@copybara-service copybara-service Bot deleted the test/cl916176633 branch May 19, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Egress Traffic Shaping

3 participants