Skip to content

feat: add netemu package for per-flow network emulation#30

Open
hanish520 wants to merge 1 commit into
masterfrom
feature/netemu
Open

feat: add netemu package for per-flow network emulation#30
hanish520 wants to merge 1 commit into
masterfrom
feature/netemu

Conversation

@hanish520

Copy link
Copy Markdown

Summary

  • Adds netemu package using Linux tc (HTB + netem) and iptables to
    enforce per-flow bandwidth, latency, and packet loss between replicas
  • Declarative YAML config: define profiles (rate/delay/loss), assign replicas
    to groups, and map group pairs to profiles
  • Replica supports an optional ip field for iptables --dst when hostname
    DNS resolution is unavailable on the nodes
  • runScript now captures stderr and includes it in error messages
  • Includes a runnable example targeting the bbchain cluster (LAN/WAN groups)

Test plan

  • go test ./netemu/... passes
  • Example ran successfully against bbchain2–bbchain30

Adds the netemu package which uses Linux tc (HTB + netem) and iptables
to enforce per-flow bandwidth and latency between replicas, configured
via a declarative YAML file. Includes a runnable example targeting the
bbchain cluster with LAN/WAN group profiles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant