mirror of
https://github.com/skywind3000/kcp.git
synced 2025-01-13 20:10:12 +08:00
Updated EN_KCP Feature (markdown)
parent
d8ce1db827
commit
aa996551e9
@ -1,10 +1,10 @@
|
||||
# Algorithms
|
||||
|
||||
The design of TCP focus on transport bandwidth, to transmit as more data as possible. While, KCP is designed for high transport speed and low latency, to transmit as fast as possible, for some special use scenario, for example, realtime communication, low latency message system. KCP transmit faster than TCP(30%-40%), use FEC/ARQ which cost 10%-20% bandwidth. KCP support normal and fast mode, use different strategy to improve the transport efficiency and speed:
|
||||
The design of TCP focus on transport bandwidth, to transmit as more data as possible. While, KCP is designed for high transport speed and low latency, to transmit as fast as possible, for some special use scenario, for example, realtime communication, low latency message system. KCP transmit faster than TCP(30%-40%), use FEC/ARQ which cost 10%-20% bandwidth. KCP support normal and fast mode, use bellow algorithms to improve the transport speed and decrease the latency:
|
||||
|
||||
#### Double RTO or Not
|
||||
#### Exponential backoff or Not
|
||||
|
||||
The algorithm for TCP to calculate timeout is RTOx2, which will become very bad when network is bad, for example, the RTO will change to RTOx8 for just drop 3 packets. KCP use different algorithm, use RTOx1.5(not RTOx2), it works very good in scenario of internet.
|
||||
When retransmission, TCP use exponential backoff(Karn/Partridge Algorithm) for congestion avoidance, which means the RTOx2, so the timeout will be very large when network is heavy, for example, the RTO will change to RTOx8 for just drop 3 packets. KCP use different algorithm, use RTOx1.5(not RTOx2), it's better in practice.
|
||||
|
||||
#### Retransmit All or Partial
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user