Rhino compute multi-threading

I have deployed Rhino compute on my EC2 instance. I receive multiple concurrent web requests to run compute. What is the multi-threading behavior by compute. If I increase the childcount to a high number, the system becomes very slow. Aren’t the child processes spawned based on the number of requests? Since it is a web application, the traffic is even. I want compute to spawn the child processes based on the incoming requests.

The current behavior is that rhino.compute launches all of the child processes (based on the web.config file) whenever it gets its first authenticated request. These children will stay active until the idle timeout value is met, I don’t think we have a method for selectively spawning additional children via requests. I’m also not sure that would give you the desired outcome. I realize that spawning a lot of children can be slow but once they’re loaded, the response time should be relatively quick. I think if you waited to launch children later when multiple requests are received, the response times would be slower because it’s still spawning a few children (which takes time). Is it possible to hit the /activechildren endpoint (which is one method which starts the spawning process) before you expect your first valid request?

1 Like