Run microflows in multiple instances (multithreading)
Hi, In a multiple-instance app, I am aware that all the Scheduled Events are running in the first instance (main). Is there any way I can distribute the load of a queue into multiple instances? I have a microflow that will run many many times loading data to the system, the data that the microflow is processing is completely independent (it will not be modified by any other action). I am queuing and processing these microflows using the Process Queue module, so I can use multiple threads, the queue actions are created by a scheduled event. However, Process Queue uses threads only from the first instance of the app. How can I use my other instances? Thanks.
Load balancing scheduled events on all instances is on the roadmap.
Easiest way to workaround the current limitation of scheduled events is to call the microflow as a rest endpoint: the scheduled event starts a microflow, which does nothing more than call the actual implementation through a REST call. Nginx will now load balance the requests across your instances.