Cloudflare opened code implementation of the Protocol, QUIC, on the Rust language

Компания Cloudflare открыла код реализации протокола QUIC на языке Rust

Cloudflare has opened the source code of the project Quiche, which prepared the implementation of the Protocol, QUIC, written in the Rust language, and the corresponding 17 draft version of the specifications in the standardization process in the IETF. Code is open under a BSD license.

The implementation provides an API for packet processing and governance QUIC connection state. This view is supported by the versions are reconciled, TLS 1.3 (based on BoringSSL), Stream API, flow control, evaluation of the packet loss, congestion control (congestion control), key update, forward flow, 0-RTT, the reset status and migration connections.

In addition, the project Quinn separately developing another implementation of QUIC on the Rust language. Code is delivered under the Apache 2.0 license. Functionality Quinn also focused on the repetition of 17 draft specification, however, the opportunities behind implementing Cloudflare. For example, not yet supported 0-RTT and transmission of HTTP over QUIC (HTTP/3). Encryption layer implemented with the help of rust-libraries rustls and ring. Prepared pilot versions of server and client for QUIC.

Recall that the Protocol, QUIC (Quick UDP Internet Connections) c 2013 developed by Google as an alternative bundle TCP+TLS for the Web that solves the problems with a large setup time and coordination of ports in the TCP and eliminate the delay when there is packet loss in the data transfer process. QUIC is an add-on over the UDP Protocol supports multiplexing of multiple connections and provides encryption methods, equivalent to TLS/SSL. The draft Protocol is already integrated in the server infrastructure of Google is part of Chrome, is scheduled for inclusion in Firefox and is actively used to service client requests on the Google servers.

  • High security similar to TLS (in fact, QUIC provides the ability to use TLS over UDP).
  • Monitoring the integrity of a stream, prevents packet loss;
  • The ability to instantly establish a connection (0-RTT, approximately 75% of the cases you can send data immediately after sending a packet connection) and to provide a minimal delay between sending the request and receiving the response (RTT, Round Trip Time);
  • No use in re-transmission of the same packet sequence number that allows to avoid ambiguity when determining the received packets and to get rid of the timeouts;
  • Packet loss affects the delivery of only the associated stream, and does not stop the delivery of data in parallel are transmitted via the current connection threads;
  • Funds correction of errors, minimizing delays due to retransmissions of lost packets. The use of special codes error correction at the packet level to reduce the situations that require re-transmission of the lost packet.
  • The cryptographic boundary of the blocks aligned with the boundaries of the QUIC packet, which reduces the impact of packet loss on the decoding of the content of the following packages;
  • No problems with the queue spinlock TCP;
  • Support connection ID, which allows to reduce the installation time of re-connection for mobile clients;
  • Connectivity advanced mechanisms for congestion control of connections;
  • The use of techniques of forecasting of bandwidth in each direction to ensure optimal intensity send packets, preventing the slide into the overload condition, in which there is packet loss;
  • Noticeable gains in performance and throughput compared to TCP. For video services such as YouTube, use QUIC showed reduction in operations re-buffering when watching videos 30%.

According to the materials: