Hi,
It depends a little on how you structure your code.
Apache is actually a dependency for some other things, its purpose is more centered around the PHP functionalities, and some of the 3rd party tools. Nginx drives the main process. The Apache process will be removed in the next version.
A module will work as intended, as there is one Lua process per "worker", which on the smaller boxes is one. This will spawn child threads (coroutines). You can not share Lua module data between workers (though you can move it around using a datastore).
The mod will stay in memory between (any) requests until a reboot of the process. As you get to production, you can also turn on Lua code caching, which will give you a boost in speed. Once this is turned on, you have to restart the service for each update, so leave it off while developing.
I will add that you should not rely on a Lua module to keep data between requests, use a datastore.
The MySQL component uses a connection pool, so it does not bring up an entire new connection each time unless needed.
Hope that helps.
Cheers.