Hello!
Yes, via nginx subrequests. You can check out ngx_echo's
echo_subrequest directive or ngx_lua's ngx.location.capture()'s
implementation for such examples.
But as I've said in an earlier thread, it's much easier, more
efficient, and also more flexible to just use cosocket-based Lua
drivers like lua-resty-redis to do such things.
We created the ngx_lua module 5 years ago because we had got tired of
coding complicated nginx C modules which did not give much gain but
just a lot of pain. I can assure you that you won't have fun perusing
the pure nginx C module development route ;)
Regards,
-agentzh