Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Limits to number of consumers #42

Open
sgangam opened this issue Sep 14, 2020 · 1 comment
Open

Limits to number of consumers #42

sgangam opened this issue Sep 14, 2020 · 1 comment

Comments

@sgangam
Copy link

sgangam commented Sep 14, 2020

The number of consuming streams (fanout/destination) streams seems to be limited by the parallelTargets parameter defined here: https://github.com/aws-samples/aws-lambda-fanout/blob/master/fanout.js#L34

If this parameter is 2, the data flows into two of the destination streams, if it is increased to 5 we observed that the data will flow into 5 destination streams.

Is this expected behavior? If yes, should this be documented/parameterized?

@julienlepine
Copy link
Contributor

Hello, the parallelTargets parameter only defines the number of targets that will be processed in parallel.

  • If you have less targets than the defined parallelTargets, there will be no impact.
  • If you have more targets (5) than defined in the parallelTargets parameter (2), fanout will send 2 targets in parallel, then any time one of the targets is done (all records have been sent), it will select another to another target, in the limit of 2 in parallel.

We should parameterize that (and TBH I will need to do a refresh of the code, new Lambda features make it much easier, and some other features are duplicates of https://aws.amazon.com/blogs/compute/introducing-aws-lambda-destinations/ and https://aws.amazon.com/eventbridge/).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants