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

fix: incidental packet drop and weird UDP state maintaining #539

Merged
merged 8 commits into from
Jun 16, 2024

Conversation

mzz2017
Copy link
Contributor

@mzz2017 mzz2017 commented Jun 14, 2024

Background

ebpf drop

The past two PRs #493, #505 have introduced a weird problem: erroneous UDP status maintenance will occur when a large number of concurrent messages are sent.

This results in some packets of stateful udp connection being incorrectly sent directly (such as what should be proxied and sent to dae control plane), resulting in sporadic packet drop. May be relevant: #533 (comment).

This problem is particularly likely to be triggered when the original traffic is udp and the throughput is large, such as http3 traffic and bt traffic.

Although I haven't fully verified, this fix may incidentally resolve the DNS leak issue.

unordered udp packets

The data which should be in order will be handled as unordered by dae, which may cause more resources by quic to process.

Checklist

Full Changelogs

  • [Implement ...]

Issue Reference

Closes #513

Test Result

NA

@dae-prow
Copy link
Contributor

dae-prow bot commented Jun 14, 2024

❌ Your branch is currently out-of-sync to main. No worry, I will fix it for you.

@mnixry
Copy link
Contributor

mnixry commented Jun 14, 2024

Thank you! The fix has been confirmed to work effectively in my local tests. HTTP/3 connections are now able to maintain a reasonable speed.

In real-world scenarios, HTTP/3 now enables smooth playback of 4K videos at 60fps on YouTube without buffering, a feat that was nearly impossible before.

@mnixry
Copy link
Contributor

mnixry commented Jun 14, 2024

Further testing has shown that HTTP/3 upload speeds still drop to zero after a short time. The following command can be used to establish a benchmark for this issue:

./curl -X POST --form file=@/tmp/test.bin -Lv --http3-only "https://h3.speed.cloudflare.com/__up" > /dev/null

image

The results from https://h3.speed.cloudflare.com/ also indicate there is a problem:

image

@jschwinger233
Copy link
Member

Maybe also fix #513? Orz

@mzz2017
Copy link
Contributor Author

mzz2017 commented Jun 14, 2024

Further testing has shown that HTTP/3 upload speeds still drop to zero after a short time.

@mnixry Thanks for your rapid feedback. I have reproduced this problem.

@mzz2017
Copy link
Contributor Author

mzz2017 commented Jun 14, 2024

I observed an interesting phenomenon. Like yours, the data sending was stuck after sending 1023K.

@mzz2017
Copy link
Contributor Author

mzz2017 commented Jun 14, 2024

@mnixry It seems that the data should be in-order and dae handle all packets as unordered. I'll fix it soon.

@mzz2017
Copy link
Contributor Author

mzz2017 commented Jun 15, 2024

@mnixry I've pushed a commit a0a1ace that may fix the problem. Could you please take a try?

@mzz2017 mzz2017 force-pushed the mzz/fix_udp_conn_track branch from ba62394 to b8257f7 Compare June 15, 2024 06:41
@mzz2017 mzz2017 force-pushed the mzz/fix_udp_conn_track branch from b8257f7 to a0a1ace Compare June 15, 2024 06:42
Copy link
Contributor

@dae-prow dae-prow bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 Since the PR has been fully tested, please consider merging it.

@mzz2017 mzz2017 merged commit 93e47ff into main Jun 16, 2024
30 checks passed
@mzz2017 mzz2017 deleted the mzz/fix_udp_conn_track branch June 16, 2024 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] UDP connection state cannot be maintained
4 participants