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

Add SQS polling information to docs #1761

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

harveydobson
Copy link

Updating documentation based on our discussion on #1760 in an attempt to be helpful!

I wonder if this information would be better in a more centralised area of the docs that can provide more detailed information about different parts of the infrastructure layer work. I couldn't see anything like this so for now I've added the information to the Symfony Messenger and Laravel Queue sections.

Added to Laravel Queue and Symfony Messenger documentation
In relation to this discussion brefphp#1760
@mnapoli
Copy link
Member

mnapoli commented Mar 22, 2024

This might be best on this page though: https://bref.sh/docs/use-cases/sqs

@@ -67,3 +67,13 @@ Instead, "Bref for Laravel" makes all the feature of Laravel Queues work out of
<Callout>
The "Bref-Laravel bridge" v1 used to do the opposite. We changed that behavior in Bref v2 in order to make the experience smoother for Laravel users.
</Callout>

### SQS Polling and Charges
AWS Lambda maintains a continuous "poller" for SQS messages, which invokes the Lambda function upon receiving messages. This process, while eliminating the need for manual polling, generates continuous SQS requests, incurring charges, [though the first 1M requests of each month are free as part of the AWS free tier](https://aws.amazon.com/sqs/pricing/#:~:text=First%201%20Million%20Requests/Month).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be best to be precise here. I'd rather not create fear for users.

I had in mind that if you deploy 1 queue it fits in the free tier, can you confirm? I'd rather make that obvious in the docs if we mention costs.

Comment on lines +74 to +75
Reducing Polling Charges
To mitigate these charges, consider adjusting the `MaximumBatchingWindowInSeconds` in your Lambda configuration. This setting delays message delivery to the Lambda function when batching, aiming to assemble the largest possible batch within the specified timeframe, counted as a single SQS API request.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Reducing Polling Charges
To mitigate these charges, consider adjusting the `MaximumBatchingWindowInSeconds` in your Lambda configuration. This setting delays message delivery to the Lambda function when batching, aiming to assemble the largest possible batch within the specified timeframe, counted as a single SQS API request.
If you want to lower the number of SQS requests (and thus potential costs), you can set the `MaximumBatchingWindowInSeconds` option in your Lambda configuration. This setting delays message delivery to the Lambda function when batching, aiming to assemble the largest possible batch within the specified timeframe, counted as a single SQS API request.

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

Successfully merging this pull request may close these issues.

None yet

2 participants