Hi HAproxy community,

I've already read through API Docs and lua.txt on the Github repo, but I
still have questions about implementing Lua tasks with blocking IO.

Facts from my reading:-
* "Lua tasks" do run in *"runtime mode"*
* They are *concurrent with HTTP traffic processing.*
* "core.thread = 0" so the Lua state is shared with all threads.

Logically thinking without knowing implementation details, it makes sense
that blocking IO shouldn't be part of "fetches/actions, etc", but it feels
like that shouldn't be true for "background tasks" as it is mentioned that
they run in separate threads.

Is updating ACLs by doing disk IO via background tasks an acceptable way of
doing that at scale? This example
<https://github.com/zareenc/haproxy-lua-examples/blob/f5853013087642c0ed34ed47bea4c6efbf96dd29/lua_scripts/background_thread.lua>
was
linked on the arpalert.org website but it seems to use *"io.* methods in
runtime"*.

Cheers,
Abhijeet (https://abhi.host)

Reply via email to