In Go-Nebulas, all messages to be broadcasted/relayed will be cached in a sending queue at first. Then a sending routine will be launched to consume these messages and send them to almost all neighbors. Delay exists between a message is pushed into the queue and sent out. When DDoS attack appears, the delay will become longer because of the limited bandwidth. It will impact the latency of data consistency achievement globally. In this project, we will design a throttling algorithm to adjust the forwarding number of neighbors dynamically. The more cached messages, the less forwarding neighbors, the less sending delay. But in this way, the message jump count in p2p network will be bigger because forwarding number is reduced. Thus, we will design an another regulator to adjust the arguments in the throttling algorithm to balance the delay and jump count to reduce the latency of data consistency achievement.
Regulator: adjust the arguments in the Throttlor based on the latency of data consistency achievement.
Throttlor: adjust the forwarding number of neighbors based on the count of cached messages.