简体   繁体   English

QUIC 连接迁移实际上是如何工作的?

[英]How does QUIC connection migration actually work?

I understand that QUIC has a unique id for each connection, that allows the participants to change their IP address (eg when moving from WIFI to mobile networks) but still send packets to each other, which can still be assigned to the correct connection.我知道 QUIC 对每个连接都有一个唯一的 id,它允许参与者更改他们的 IP 地址(例如,从 WIFI 移动到移动网络时),但仍然相互发送数据包,仍然可以分配给正确的连接。

But how do the recipients know the new IP address of each other to send packets to?但是收件人怎么知道对方新的 IP 地址来发送数据包呢?

I've read through the spec , but I don't really understand how that works我已经阅读了规范,但我真的不明白它是如何工作的

QUIC still uses IP underneath. QUIC下面仍然使用IP。 So yes you need an IP address to send messages from and receive messages back to.所以是的,您需要一个 IP 地址来发送消息和接收回消息。

What QUIC connection migration saves you from is all the effort to set up a reliable, and secure connection. QUIC 连接迁移为您省去了建立可靠、安全连接的所有工作。

Reliability is traditionally handled by TCP but that requires a three-way handshake to set up - which takes time and round trips, not to mention TCP slow start meaning it's slow at the beginning.可靠性传统上由 TCP 处理,但这需要设置三次握手 - 这需要时间和往返,更不用说 TCP 慢启动意味着它在开始时很慢。

Security is traditionally handled by TLS to create an HTTPS connection through which to send HTTP messages.安全性传统上由 TLS 处理以创建 HTTPS 连接,通过该连接发送 HTTP 消息。 That also takes time to negotiate the ciphers to use.这也需要时间来协商要使用的密码。

QUIC basically allows you to reuse the settings for those without having to start a connection from scratch. QUIC 基本上允许您重复使用这些设置,而无需从头开始连接。

So you send a message from IP address 1 and should expect to get the response back to that IP address.因此,您从 IP 地址 1 发送一条消息,并且应该期望将响应返回到该 IP 地址。 However if you move IP (eg from WIFI to Mobile) to IP address 2, then yes you might lose a few responses.但是,如果您将 IP(例如从 WIFI 移动到移动设备)移动到 IP 地址 2,那么是的,您可能会丢失一些响应。 Next time you talk to the QUIC endpoint using the same connection id, it will see you're on a new IP and that there are some unacknowledged packets that have been sent so they will be resent.下次您使用相同的连接 ID 与 QUIC 端点通信时,它将看到您在一个新的 IP 上,并且已经发送了一些未确认的数据包,因此它们将被重新发送。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM