YGBlvcAK
V2EX  ›  DNS

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

  •  
  •   YGBlvcAK · Sep 13, 2024 · 3890 views
    This topic created in 630 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   ·   2823 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 13:00 · PVG 21:00 · LAX 06:00 · JFK 09:00
    ♥ Do have faith in what you're doing.