We’re currently using the lua capture_multi to send production request
to
test systems.
And sometimes we also kind of ‘fork’ these request to multiple test
systems.
But if one of the test systems is slow to respond the lua code waits
till it
gets all responses.
And this is something we actually don’t like to have.
Is there a way to have the lua module launch the requests without
waiting
for the response?
It should fire the requests and continue directly afterwards and forget
about the response handling.
I could try and modify the lua module, but I’m not really familiar with
C/C++ coding.
Is there a way to have the lua module launch the requests without waiting
for the response?
It should fire the requests and continue directly afterwards and forget
about the response handling.
I could try and modify the lua module, but I’m not really familiar with
C/C++ coding.
Completely forget the response handling is not a really good thing to
do here. You can, however, make the upstream requests and response
handling run in the “background” without adding any latency to your
downstream requests. Basically, you can just use ngx_lua’s timer API
and lua-resty-http-simple library for this: