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

Propagate DSQ message via inventory system #5865

Open
PastaPastaPasta opened this issue Feb 9, 2024 · 0 comments
Open

Propagate DSQ message via inventory system #5865

PastaPastaPasta opened this issue Feb 9, 2024 · 0 comments

Comments

@PastaPastaPasta
Copy link
Member

Currently; each DSQ message that we receive is simply repropogated to all connected nodes. This is not ideal for a bandwidth usage perspective. Additionally, if a node explicitly doesn't care about dsq messages; there's no way to avoid sending it to them. Not only does this significantly increase receiving bandwidth, but also sending bandwidth. Instead we should use the inventory system!

2024-02-09T16:08:49Z received: dsq (142 bytes) peer=12
2024-02-09T16:08:49Z sending dsq (142 bytes) peer=3
2024-02-09T16:08:49Z sending dsq (142 bytes) peer=5
2024-02-09T16:08:49Z sending dsq (142 bytes) peer=6
2024-02-09T16:08:49Z sending dsq (142 bytes) peer=7
2024-02-09T16:08:49Z sending dsq (142 bytes) peer=8
2024-02-09T16:08:49Z sending dsq (142 bytes) peer=9
2024-02-09T16:08:49Z sending dsq (142 bytes) peer=10
2024-02-09T16:08:49Z sending dsq (142 bytes) peer=11
2024-02-09T16:08:49Z sending dsq (142 bytes) peer=12
2024-02-09T16:08:49Z sending dsq (142 bytes) peer=13

Calculations

A DS is ~142 bytes. If we have 10 peers; and we send and receive from each of them, then we are sending and receiving ~1.42kB / DSQ session. There are quite a lot of DSQ sessions that happen during a day.

Using inv; we'd send and receive an inv from each peer; so 37 * 10 = 370 bytes + (send and receive for 1 node) 142; this means in the new system we'd be sending receiving about 512 bytes per DSQ session. Additionally, this difference may be significantly higher for master nodes who may have upwards of 100 connections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant