Skip to content

Pooling support for high request rates? #49

Closed
@jgimness

Description

@jgimness

Would there be problems having multiple instances? Example use: A high traffic site that needs to do lots of vue/react SSR. A single nodejs process could become CPU-limited.

The readme says to avoid it, but are there any other consequences?

Try to avoid creating multiple INodeJSService instances since by default, each instance spawns a NodeJS process.

Also, if you are using the static API from multiple threads and the NodeJS process is performing invocations for other threads, you might get unexpected results.

For the static API, does that mean we need to implement our own concurrency control on top of it?

There's an older issue in the aspnet repo where someone put up some sample pooling code, for reference:
aspnet/JavaScriptServices#1442 (comment)

I think it would be so valuable to the .net community to have an out-of-the-box pooled nodejs service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions