Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement path migration #554

Merged
merged 73 commits into from
May 14, 2024
Merged

implement path migration #554

merged 73 commits into from
May 14, 2024

Conversation

kazuho
Copy link
Member

@kazuho kazuho commented Jun 13, 2023

Design:

  • We issue 4 CIDs and therefore support 4 paths.
  • conn->paths[0] is the path that will always exist, this path is always validation-complete once the handshake is complete and is the only path on which non-probing packets are sent.
  • paths[1] to paths[3] are backup paths.
  • When receiving a packet (regardless of it being probing or non-probing) from a new path, we pick the least-recently-used backup path that is not currently validating, and set its path to that of the new path, then start path validation.
  • When receiving a packet on one of the backup paths, we consult if we have received non-probing packets on that backup path and if the path is validation-complete. If both conditions are met, this backup path is promoted to path[0].

Notes:

  • At the moment, loss detection and congestion controller are not reset when migrating. We will address the issue as part of adding support for multipath.

Config knobs:

  • max_probe_packets - maximum number of probe packets to send before calling a path unreachable (default: 5)
  • max_path_validation_failures - once path validation fails for the specified number of paths, packets arriving on new tuples will be dropped (default: 100)

Connection stats:

  • num_paths.created - number of paths created
  • num_paths.validated - number of paths that were validated
  • num_paths.validation_failed - number of paths that failed to validate
  • num_paths.migration_elicited - number of paths on which migration was elicited (i.e., non-probing packets were received)
  • num_paths.promoted - number of paths that were promoted (for sending data)
  • num_paths.closed_no_dcid - number of paths that were closed due to Connection ID being unavailable
  • num_packets.sent_promoted_paths - number of packets sent on any promoted path
  • num_packets.ack_received_promoted_paths - number of packets being acked among ones that were sent on any promoted path

kazuho added 30 commits May 16, 2023 12:24
… that we could be using multiple CIDs at the same time
… send RCID for all those with sequence no greater than retire_prior_to
kazuho added 4 commits March 15, 2024 21:40
…try to decrypt packets arriving on new paths, as doing so would allow an attacker to race duplicated packets to prevent those arriving on legitimate paths from being decrypted (note: each PN is decrypted only once)
@kazuho
Copy link
Member Author

kazuho commented Mar 16, 2024

ToDo:

  • Add test case that involves path migration failures; e.g., set max_path_validation_failures to zero?
  • Consider CC behavior upon migration.

As to the second point, when a server receives a HTTP/3 request after quiescence with NAT rebinding involved, the server will send a HTTP/3 response to the old address while sending a probe to the new address. As the client has migrated to the new address, the packet carrying HTTP/3 response gets lost. This would be the most popular pattern of path migration and we are going to see negative effect on HTTP/3 throughput, unless we need to do something.

Regarding what to do, for CC, one way of moving forward would be to reset whenever the path is migrated, potentially adopting the send rate on the old path as the jumpstart rate on the new path. Also, we might look into flushing the sentmap of the old path immediately when the new path is validated. Doing so allows the retransmission logic to kick in at an earlier moment.

Sorry, something went wrong.

@kazuho kazuho merged commit 6a90372 into master May 14, 2024
5 checks passed
kazuho added a commit that referenced this pull request Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant