Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider merging in-process-node branch #17

Open
Marak opened this issue Jan 4, 2017 · 1 comment
Open

Consider merging in-process-node branch #17

Marak opened this issue Jan 4, 2017 · 1 comment

Comments

@Marak
Copy link
Collaborator

Marak commented Jan 4, 2017

Currently, all Node.js services are spawned in a new process using the micro-node binary, which is called via microcule.spawn. This ensures process level isolation of the untrusted source code.

Inside micro-node we are using the run-service module, which provides Node.js in-processvm based isolation of the untrusted source code.

Technically ( and previously ) run-service could be executed in-process where microcule.spawn is called ( instead of spawning a new micro-node process ). This could be dangerous as a memory leak or CPU leak in the untrusted source code could affect other running services. It could also be advantageous because it would significantly reduce the amount of resources needed to run Node services, as well as reduce response times by 150+ milliseconds.

We should consider merging the in-process-node branch as a configurable option. Depending on the server environment and intended use-case, being able to spawn in-process Node scripts may be better than enforcing process isolation per Node service.

@Marak
Copy link
Collaborator Author

Marak commented Feb 10, 2017

This will be merged in soon.

I'd like to first setup a good way to run benchmarks before we start exposing optimization options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant