You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 20, 2024. It is now read-only.
It's just the raw version of my future implementation, maybe rough, but could still be optimizing later.
My implementation plan
Add {weight、rateLimiter} in PeerMgr struct
Design a schedule algorithm that will optimize the process that one PeerNode download from a high weight level PeerNode, also maintains weight in PeerMgr struct. (As the picture below)
Write a program to listen host total bandwidth(HTB Listener)
Design a algorithm dynamically adjust the host rateLimiter, and send it to SuperNodePeer.(The flow chart and the algorithm are as below)
Add cli option to determine whether to open dynamically rateLimiter.
Benchmark and optimization.
Additional information
There is ProducerLoad in progress_manager, may be we should using ProducerLoad instead of weight and add rateLimiter in each progress_manager.
We could use gopacket to listen host local bandwidth.
The dynamical rate algorithem may be too rough, TCP Congestion Control Algorithm could be a better method to imitate.