In Envoy, both lua-resty-ffi (envoy porting) and the built-in golang filter allow you to use golang to develop asynchronous business logic through goroutine, but which one performs better?
Call flow When the headers of an incoming request get parsed by envoy, an HTTP filter’s decodeHeaders() is called.
TL;DR
In openresty, using ngx.location.capture(), we can achieve high-performance asynchronous processing of upstream responses.
Motivation As we all know, due to the design limit, nginx header/body filters are synchronous and you should not perform blocking operations such as blocking system calls, decrypting, decompressing, or forwarding responses to other servers for further processing.
TL;DR
I’ve created a new HTTP/3 testing framework based on bash and curl:
https://github.com/kingluo/burl
Chinese blog version:
https://zhuanlan.zhihu.com/p/675741855
Background A few months ago, when I ported the QUIC patches from the nginx mainline to APISIX and tried to test it, I found that test::nginx didn’t work very well.
Background Both nginx and envoy are high-performance proxy server software.
They are written in C/C++ so they run fast. But the C/C++ ecosystem is notoriously weak. Can we do hybrid programming with Go, Java, Python, Rust or NodeJS? so we can use Those rich ecosystems of popular mainstream programming languages?
TL;DR How can I log the Lua execution time of each request (excluding time spent on asynchronous IO) in ngx.ctx in a non-intrusive, zero-cost way?
The Lua execution time is the sum of the following metrics:
lua_resume phases REWRITE ACCESS CONTENT BALANCER lua_pcall filters header_filter body_filter https://github.