This repository has been archived by the owner on Dec 20, 2024. It is now read-only.
Proposal: Dragonfly supports seed pattern to solve massive proxy requests which may cause huge pressure on rss or supernode. #1284
Labels
kind/proposal
any proposals for project
Backgrounds
Now the clients of Dragonfly should communicate with supernode when proxying every request. Thus, when massive machines of a cluster request a large file, supernode may be the key node which influences the continuous improvement of better performance.
On the other word, every proxy request should at least cost four RTT, such as
register
,peer wait
,getPeerInfo
,proxy from target peer
. The first three RTT could be considered as the extra RTT. In our case, there are some demand for low latency. And every request may be small range request and the costs of extra RTT could not be ignored.So a solution is needed to reduce the extra RTT and the pressure of supernode.
Idea
Seed pattern
provides the asynchronously communication with supernode, in which peer could asynchronously fetch the p2p network info from supernode and self simply schedule the target peer to get data.A seed represents a file which is always defined by
taskUrl
. A peer could be selected as a seed, which provides the seed file to be downloaded by other peers. And only the seed node could request the resource data fromrss
, by the way which reduces the pressure ofrss
.Feature
Architecture Diagram
This diagram describes the control flow and part data flow.
HeartBeat
,Report
,Fetch
.HeartBeat
reports the peer base info to supernode every serval seconds. Thus supernode could update the aliveness of peers.Report
allows peer to report local seeds info to supernode.Fetch
allows peer to fetch the seeds info of p2p network, so peer knows the location of seed file to get data from seed node.Seed Data Flow
This diagram describes how the seed node provides the data services.
Downloader
requests the data of seed file fromrss
.Uploader
provides the data service to be downloaded by other peers.The text was updated successfully, but these errors were encountered: