-
Notifications
You must be signed in to change notification settings - Fork 4
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
Proposal: exposing the option to parallelize actions/triggers #120
Comments
Or just have a single number that defaults to |
It's a good idea to optimize the processing, however drawbacks of this approach are:
Taking drawbacks into account I don't' think the component developer can make this decision |
I potentially also makes sense to allow this value to be dynamically configured at runtime based on a specific |
Currently, our platform doesn't really support messages above ~3.5 MB in side. So even if we fetched 10 messages in parallel, at most 35 MB of RAM would be consumed which is still less than the default 256 MB allocated to a component.
I don't understand why the costs of doing this would be a significant concern. |
By exposing functionality that allows multiple messages to run through actions in parallel (when it makes sense, for example, in lookup actions), we can increase the time efficiency of performing these actions.
To do this, we want to expose the
RABBITMQ_PREFETCH_SAILOR
env variable, which controls how many messages are read from the queue at once. This variable is currently defaulted to 1. It does not make sense for this to be set as an env variable, as it is dependent per action/trigger and not per component.We could implement the following changes to allow parallelizing actions run on our platform:
parallelize: bool
field in fromcomponent.json
inside every action/triggercomponent.json
that represents the number of messages that should be read in parallel at once. This number should default to a value greater than 1 (2?) if not set. It should also be able to be configured as a config field by a user, as it would be dependent on the amount of computing power availableRABBITMQ_PREFETCH_SAILOR
should be set now to this value to run that many messages available, each time. It should be deprecated as an env variable as it does not make sense to use in that contextThe text was updated successfully, but these errors were encountered: