Skip to content

Proposal: exposing the option to parallelize actions/triggers #120

Open
@hannah-bulmer

Description

@hannah-bulmer

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:

  • read an optional parallelize: bool field in from component.json inside every action/trigger
  • if this field exists, read in a number from component.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 available
  • the RABBITMQ_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 context
  • documentation should be added to explain what actions should and should not be run in parallel
  • investigation should be done to determine the capacities of running messages in parallel and how to calculate them

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions