openresty / lua-nginx-module

Embed the Power of Lua into NGINX HTTP servers
https://openresty.org/
11.3k stars 2.03k forks source link

how to create to or three privileged worker #1864

Open kiss291323003 opened 3 years ago

kiss291323003 commented 3 years ago

ngx.process.enable_privileged_agent() can only create one special worker 。how can I create more then one special worker process ?

xiaocang commented 3 years ago

Openresty currently only supports starting one privileged agent. I would like to know your use case for starting multiple privileged agent processes, because usually with timer and light-thread you can acommplish multi tasks in one privileged agent.

kiss291323003 commented 3 years ago

for example , I wan to reject the ip identify by ip country ,so i have to download the ipinfo from APNIC,and the APNIC text is an huge file ,it will take a lot of time to parse the text。when parse this text,privileged agent is blocking so that is unable to do other things ,such as sync config from my gateway。

kiss291323003 commented 3 years ago

is there any one???

xiaocang commented 3 years ago

maybe this PR would help: https://github.com/openresty/lua-nginx-module/pull/1861

kiss291323003 commented 3 years ago

maybe this PR would help: #1861

not merge yet!!!!!

kiss291323003 commented 3 years ago

hello。。。is there any one ???

xiaocang commented 2 years ago

Hi @kiss291323003, the PR #1861 is already merged.