Hello!
On Tue, Aug 19, 2014 at 9:00 AM, James Hurst wrote:
> You could use the ngx.timer.at API to create multiple "light threads", which
> each create a lua-resty-http connection. This combined with connection
> pooling would be a good way to "concurrently" make upstream requests,
> scheduled by Nginx.
>
No, it's not recommended to use ngx.timer.at() in this context because
it'll be hard to "wait" on the threads if desired and also more
expensive. For this very use case, one should just use the ngx.thread
API to spawn more "light threads" directly, like ngx.thread.spawn().
Regards,
-agentzh