Multi-threading and Multi-processing Architecture Questions for Nautilus Trader #2804
Unanswered
trylovetom
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You can open two startup scripts |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have two questions about running multiple actors and strategies with proper multi-threading/multi-processing in Nautilus Trader:
I have 10,000 instruments and want to use the streaming feature to write data to files. My plan was to create 1 live node with 10 actors, where each actor subscribes to 1,000 instruments.
However, I found that all 10 actors have the same process ID, thread ID, and thread name - meaning they run on a single thread. I expected them to run on 10 separate threads orprocesses.
How can I achieve multi-threading or multi-processing with multiple actors? What is the recommended approach?
According to the documentation (https://nautilustrader.io/docs/latest/concepts/architecture/#processes-and-threads), I need to separate my 2+ strategies into different processes.
I tried both approaches:
But all strategies still have the same process ID, thread ID, and thread name.
How can I deploy 2+ strategies using the same data client and execution client, but running in separate processes? What is the standard approach?
Beta Was this translation helpful? Give feedback.
All reactions