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

Adding network latency simulator for block live stream consumers #34

Merged
merged 3 commits into from
Jul 3, 2024

Conversation

AlfredoG87
Copy link
Contributor

@AlfredoG87 AlfredoG87 commented Jun 29, 2024

Description:
Adding network latency simulator for block live stream consumers using TC (linux network tool) for simulating network congestion and slow connection with very high latency.

The result of the Test was successful:

  • The Server was not blocked by slow consumers,
  • The consumers were able to consume blocks as fast as their networks allowed them,
  • The control consumer that did not had any restrictions was not impacted by the network issues of other consumers.
  • And more importantly, once the network issues (latency) resolved on the simulated consumers, the messages or blocks arrived in the correct order

Related issue(s):

Fixes #32

Notes for reviewer:
Due to how Dockerfile performs COPY I had to create a copy of the files consumer.sh and protobuf foldere inside the test project. But I would welcome a suggestion on how to copy relative paths that are above the folder structure of the main project of Dockerfile when building the image.

How is working:
image

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@AlfredoG87 AlfredoG87 requested review from a team as code owners June 29, 2024 00:19
Copy link
Contributor

@mattp-swirldslabs mattp-swirldslabs left a comment

Choose a reason for hiding this comment

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

Looks pretty good. I added a few suggestions

server/src/test/network-latency-simulator/README.md Outdated Show resolved Hide resolved
server/src/test/network-latency-simulator/Dockerfile Outdated Show resolved Hide resolved
server/src/test/network-latency-simulator/consumer.sh Outdated Show resolved Hide resolved
server/src/test/network-latency-simulator/README.md Outdated Show resolved Hide resolved
@AlfredoG87 AlfredoG87 self-assigned this Jul 2, 2024
@AlfredoG87 AlfredoG87 added this to the 0.1.0 milestone Jul 2, 2024
…docker image

- added gitignore to ignore test context files
- removed redundant files that now are copied from original source during setup
- improved Dockerfile, added ENV Defaults, copy from test-context and remove executable step.
- printed ENV values on start.sh startup script
- Improve README.md with changes needed and feedback from PR Review

Signed-off-by: Alfredo Gutierrez <[email protected]>
…e accurate test simulation.

Signed-off-by: Alfredo Gutierrez <[email protected]>
Copy link
Contributor

@mattp-swirldslabs mattp-swirldslabs left a comment

Choose a reason for hiding this comment

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

Looks good!

@AlfredoG87 AlfredoG87 merged commit 207993b into main Jul 3, 2024
2 checks passed
@AlfredoG87 AlfredoG87 deleted the network-delay-simulation-test branch July 3, 2024 15:51
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.

Create a Test that Simulates Network congestion among Consumers for Block LiveStream Feature
2 participants