Each server need a separate lua virtual machine environment! #70

Closed
fxg opened this Issue Nov 26, 2011 · 5 comments

Projects

None yet

3 participants

@fxg
fxg commented Nov 26, 2011

just about subject,for testing or development, a standalone lua VM ,is aways useful!

thanks for your great job!

@eoranged

What did you mean saying this? If you'll use LuaJIT2, then each nginx worker process will have separate lua VM. If you'll use Lua 5.1 instead, then you'll have no virtual machine at all.

@agentzh
Member
agentzh commented Nov 29, 2011

@eoranged He means each (virtual) server block in nginx.conf owns its own Lua VM instance, that is, every nginx worker can have 3 Lua VM instances if the user defines three virtual servers in her nginx.conf.

@eoranged

@agentzh but when it could be useful? I see no profit creating separate Lua instances inside one process, especially with LuaJIT2.

@agentzh
Member
agentzh commented Nov 30, 2011

On Wed, Nov 30, 2011 at 4:00 AM, Vladimir Protasov
reply@reply.github.com
wrote:

@agentzh but when it could be useful? I see no profit creating separate Lua instances inside one process, especially with LuaJIT2.

It'll be useful when different applications share the same nginx
instance but each uses its own virtual server. And they surely want to
use separate versions of Lua modules and Lua module search paths
settings and etc.

Regards,
-agentzh

@agentzh
Member
agentzh commented Oct 12, 2013

Now I know a solution to this requirement: just define multiple http {} blocks for each server {} block and each virtual server will have its own isolated Lua VM and other configuration settings (in its surrounding http {} block).

I'm closing this :)

@agentzh agentzh closed this Oct 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment