Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: msg-sim crate #53

Closed
mempirate opened this issue Jan 4, 2024 · 0 comments · Fixed by #54
Closed

Proposal: msg-sim crate #53

mempirate opened this issue Jan 4, 2024 · 0 comments · Fixed by #54
Assignees
Labels
A-test Area: Testing C-discussion Category: Discussion

Comments

@mempirate
Copy link
Contributor

mempirate commented Jan 4, 2024

Context

Being able to simulate latency, bandwidth, packet loss etc. ("shaping traffic") to reflect the real world is all incredibly useful for testing & benchmarking different protocols. It's how we discovered that QUIC in most cases is actually slower than TCP. We used comcast to add 50ms of latency and a max bandwidth of 1Gbps to localhost, and then ran our benchmarks again.

Proposal

It would be nice to be able to shape traffic in unit tests, integration tests and benchmarks inside of MSG, so I'm proposing the msg-sim crate to do just that. msg-sim will have the following features:

  • Support both MacOS and Linux
  • Highly configurable
  • Standalone crate for use in other projects
  • Will be able to do everything comcast can do

Simulation

We usually use localhost for testing, which is the loopback interface. Aside from it being a virtual network interface, it also has a much higher MTU than normal, doesn't use Ethernet etc.

@mempirate mempirate added C-discussion Category: Discussion A-test Area: Testing labels Jan 4, 2024
@mempirate mempirate self-assigned this Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-test Area: Testing C-discussion Category: Discussion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant