Does Hysteria have built-in Forward Error Correction in it? #889
-
Does Hysteria have built-in Forward Error Correction in it? maybe something like UDPSpeeder with Reed-Solomon? Or the custom QUIC protocol does this job? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Nope. At present, Hysteria does not support built-in FEC, such as the Reed-Solomon algorithm used in conjunction with UDPSpeeder. The primary challenge we address in most Hysteria use cases is packet loss, primarily due to network congestion. This problem typically involves the complete discarding of data packets by routers along the transmission path. In contrast, FEC, including Reed-Solomon, is primarily designed to correct bits within a packet that have been altered or misplaced, which is a relatively rare occurrence in modern Internet communications. Applying Reed-Solomon or similar algorithms within UDP packets would be ineffective for our purposes. Since the packets are discarded as a whole, any error-correcting data they contain would also be lost. To effectively utilize FEC such as Reed-Solomon, we would need to spread the data across multiple packets. For instance, if we have 100 UDP packets to send, we would need to intersperse redundant data and spread it over, say, 115 packets. This way, each packet contains bits of data from the original 100 packets, allowing for partial recovery if some packets are completely lost. However, we do not see significant practical advantages to this approach. Waiting for a sufficient number of packets to accumulate before applying FEC can introduce additional latency, especially in low-bandwidth scenarios (imagine Hysteria waiting for 99 more packets to group with the first one before applying Reed-Solomon). In addition, compared to TCP, QUIC's sophisticated Selective Acknowledgment (SACK) capabilities already provide robust support for retransmitting only the lost data in packet loss scenarios. |
Beta Was this translation helpful? Give feedback.
Nope.
At present, Hysteria does not support built-in FEC, such as the Reed-Solomon algorithm used in conjunction with UDPSpeeder. The primary challenge we address in most Hysteria use cases is packet loss, primarily due to network congestion. This problem typically involves the complete discarding of data packets by routers along the transmission path. In contrast, FEC, including Reed-Solomon, is primarily designed to correct bits within a packet that have been altered or misplaced, which is a relatively rare occurrence in modern Internet communications.
Applying Reed-Solomon or similar algorithms within UDP packets would be ineffective for our purposes. Since the packets are discarded as…