Skip to content
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

Investigate process delegating to S3 events to start step functions #213

Open
jkeifer opened this issue Feb 9, 2023 · 1 comment
Open

Comments

@jkeifer
Copy link
Collaborator

jkeifer commented Feb 9, 2023

process currently uploads input payloads to S3 and also starts the step function execution using the sfn API. However, we have seen a race condition with this process, as we can't guarantee the step function starts after we claim processing, mainly due to service limits restricting the number of concurrent step function executions.

Instead of having process limited by step functions, we could use the S3 upload to generate an EventBridge event, which can use to start a step function execution. This eliminates the one lengthy step from process and more or less ensures it would not long have time out issues under heavy load.

A disadvantage is that process would not longer have the sfn backpressure, and would move the processing queue from the highly visible SQS queue to the opaque EventBridge. We'd also have to churn through that EventBridge queue before messages start to time out. Unfortunately, it looks like the max age of an EventBridge event is one day, whereas SQS can be configured to queue for up to 14 days (4 days being the default).

In short, this may not be the best idea, but may be worth considering.

@jkeifer
Copy link
Collaborator Author

jkeifer commented Feb 9, 2023

Ha, just realized this probably doesn't work because we won't have a way to write out the execution ARN to the state database. 😞

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

No branches or pull requests

1 participant