Skip to content

Add pluggable congestion controllers (null + BBR) and client --cc option#28

Merged
Alan-Jowett merged 5 commits into
mainfrom
congestion_control
Dec 5, 2025
Merged

Add pluggable congestion controllers (null + BBR) and client --cc option#28
Alan-Jowett merged 5 commits into
mainfrom
congestion_control

Conversation

@Alan-Jowett

Copy link
Copy Markdown
Owner

This PR adds a pluggable congestion-control framework to the client.

Changes:

  • Add null_congestion_controller (default) and bbr_congestion_controller in src/common.
  • Templated client_send_pacer now derives from a base interface so different controllers can be used at runtime.
  • echo_client gains a new --cc (alias -C) option to select null or bbr.
  • README.md updated with usage and examples.

Notes:

  • The bbr implementation is a lightweight experimental controller (EWMA bandwidth estimator, STARTUP/PROBE behavior).
  • Default behavior remains unchanged (--cc null).

Test plan:

  • Build and run local server and client. Example: echo_server --port 7 and echo_client --server ::1 --port 7 --rate 20000 --cc bbr.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a pluggable congestion control framework for the client, allowing selection between a null controller (default, no congestion control) and an experimental BBR-style controller via the new --cc command-line option.

Key changes:

  • New congestion controller interface with null_congestion_controller and bbr_congestion_controller implementations
  • Refactored client_send_pacer to use template-based polymorphism with a virtual base class for runtime controller selection
  • Enhanced client with --cc option and integrated congestion controller feedback via RTT/ACK handling

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/common/pacer.hpp Added polymorphic base class and templated pacer to support pluggable congestion controllers; integrated controller callbacks for send/ack events
src/common/null_cc.hpp New null congestion controller providing no-op implementation (default behavior)
src/common/bbr.hpp New BBR-style congestion controller with bandwidth estimation, RTT tracking, and adaptive pacing gain
src/common/arg_parser.hpp Added help text listing available congestion controllers
src/client/main.cpp Added --cc option parsing, controller instantiation logic, and ACK feedback to pacer
README.md Documented congestion control feature with usage examples and behavioral descriptions

Comment thread src/common/arg_parser.hpp
Comment thread src/common/pacer.hpp
Comment thread src/common/bbr.hpp Outdated
Comment thread src/client/main.cpp Outdated
Comment thread src/common/pacer.hpp Outdated
Comment thread src/common/pacer.hpp Outdated
Comment thread src/common/bbr.hpp Outdated
Comment thread src/common/bbr.hpp Outdated
Comment thread src/client/main.cpp
Comment thread src/common/bbr.hpp Outdated
Alan Jowett added 3 commits December 5, 2025 11:13
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
@Alan-Jowett
Alan-Jowett merged commit 36e69e2 into main Dec 5, 2025
2 checks passed
@Alan-Jowett
Alan-Jowett deleted the congestion_control branch December 5, 2025 20:18
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.

2 participants