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

Limits end to end buffering in gridconnect bridge. #758

Merged
merged 2 commits into from
Dec 31, 2023

Conversation

balazsracz
Copy link
Collaborator

When a dispatcher is used to send traffic to a gridconnect bridge, an infinite number of packets were allocated in the dispatcher when more than one client was connected. This is a typical situation when a hub is operating.

By adding a limitedpool to the bridge object, we can ensure that the dispatcher is blocked when the output queue is full and pushes back.

This PR respects the config option gridconnect_bridge_max_outgoing_packets.

When a dispatcher was used to send traffic to a gridconnect bridge,
an infinite number of packets were allocated in the dispatcher when more than
one client was connected.

By adding a limitedpool to the bridge object, we can ensure that the dispatcher is blocked when
the output queue pushes back.
@balazsracz balazsracz requested a review from bakerstu December 29, 2023 09:57
Copy link
Owner

@bakerstu bakerstu left a comment

Choose a reason for hiding this comment

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

Very nice. Simple and flexible.

@balazsracz balazsracz merged commit f7f6206 into master Dec 31, 2023
4 checks passed
@balazsracz balazsracz deleted the bracz-hub-bridge-limit-pool branch December 31, 2023 11:37
balazsracz added a commit that referenced this pull request Jan 1, 2024
# Via GitHub
* master:
  Adds configuration options for TCP sockets, tuning for Hub app. (#759)
  Limits end to end buffering in gridconnect bridge. (#758)
  Ensures that an executor thread can not be created twice. (#757)
  Fixes build_bootloader_img.py. (#755)

# Conflicts:
#	src/utils/sources
balazsracz added a commit that referenced this pull request Jan 2, 2024
* master:
  Adds configuration options for TCP sockets, tuning for Hub app. (#759)
  Limits end to end buffering in gridconnect bridge. (#758)
  Ensures that an executor thread can not be created twice. (#757)
  Fixes build_bootloader_img.py. (#755)
balazsracz added a commit that referenced this pull request Jan 2, 2024
* bracz-optimize-tcp-socket:
  Adds configuration options for TCP sockets, tuning for Hub app. (#759)
  Limits end to end buffering in gridconnect bridge. (#758)
  Ensures that an executor thread can not be created twice. (#757)
  Fixes build_bootloader_img.py. (#755)
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