V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
YGBlvcAK
V2EX  ›  DNS

分享一个 DoH 降低延迟的优化小技巧

  •  
  •   YGBlvcAK · Sep 13, 2024 · 3764 views
    This topic created in 594 days ago, the information mentioned may be changed or developed.
    doh 在首次连接时会耗费 4-5 个 RTT 延迟,这意味着:如果 udp 解析延迟在 8ms ,那 doh 就是 40ms

    连接建立后,如果 60s 没有解析,连接就会断开,为了避免断开,可以通过循环 30 秒解析一次的方式来保持连接,Linux 可以在计划任务中添加:
    ```
    * * * * * sleep 10; dig 163.com
    * * * * * sleep 40; dig 163.com
    ```

    注意这个域名要排除在缓存之外,让每次解析都去访问上游
    xusp
        1
    xusp  
       Sep 19, 2024
    服务器要被你们这样的客户压崩了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   995 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 18:20 · PVG 02:20 · LAX 11:20 · JFK 14:20
    ♥ Do have faith in what you're doing.