GithubHelp home page GithubHelp logo

Comments (2)

lianglli avatar lianglli commented on July 20, 2024

#define NGX_XQUIC_HEALTH_CHECK_REQ "UDPSTATUS"
#define NGX_XQUIC_HEALTH_CHECK_RSP "UDPOK"

请求报文含magic string "UDPSTATUS",tengine会回包"UDPOK"

image

image

from tengine.

longmaythesunshine-zx avatar longmaythesunshine-zx commented on July 20, 2024

感谢解答~ 我发现我们健康检查的探测报文并不能通过。看了下ngx_xquic_recv.c中 会对udp报文做一个简单的头检测
` /* check QUIC magic bit */
if (!NGX_XQUIC_CHECK_MAGIC_BIT(packet->buf)) {
ngx_log_error(NGX_LOG_WARN, c->log, 0,
"|xquic|invalid packet head|");
return;
}

#define NGX_XQUIC_CHECK_MAGIC_BIT(pos) (((*(pos)) & 0x40) == 0x40)
`
看起来是需要第一个字符的第二个二进制位是1才行。我看字母都是在这个区间,但是数字不行,我测试了一下也确实如此。

不知道咱们后续有没有考虑优化这块健康检查逻辑?在头检测前先进行healcheck?
以及后续将健康检查报文配置化?这样方便我们自定义配置~

from tengine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.