Skip to content

zio-sqs release 0.7 led to huge AWS bill #809

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

Open
fabian-braun opened this issue Mar 23, 2025 · 4 comments
Open

zio-sqs release 0.7 led to huge AWS bill #809

fabian-braun opened this issue Mar 23, 2025 · 4 comments

Comments

@fabian-braun
Copy link

Hi, we found out that the zio-sqs release https://github.com/zio/zio-sqs/releases/tag/v0.7.0 caused a huge cost increase in our AWS bill.

This commit in ZIO-SQS changed the default behavior for waitTimeSeconds from 20 seconds to None

That means we switched from SQS-“long”-polling to “short”-polling without noticing it.

Quoting from the AWS docs:

When the wait time for the ReceiveMessage API action is greater than 0, long polling is in effect. […] Long polling helps reduce the cost of using Amazon SQS by eliminating the number of empty responses (when there are no messages available for a ReceiveMessage request

In our case this meant an absolute cost increase of 40$ per day (60$ instead of 20$)

Maybe you would want to reconsider changing the default back and re-introduce the waitTimeSeconds.

@calvinlfer
Copy link
Member

Hey @fabian-braun i’m very sorry for this oversight, we can change the default back to 20 seconds to re enable long polling and leave a note

@fabian-braun
Copy link
Author

Hey @calvinlfer , no worries :) I don't have a strong opinion on what's the best way forward here:

  • Short polling is the default in AWS client libs (maybe because it's historically grown)
  • On the flip side AWS recommends long polling as "preferable in most cases" (See here )

Personally, I think zio-sqs should go with the recommendation and make long polling the default.

If you agree, I think this should be changed and mentioned in the release notes of the next release. I could file a PR!

@calvinlfer
Copy link
Member

Done! I've made long-polling the default, and i've made a note about long vs short polling and how short polling will affect cost

@calvinlfer
Copy link
Member

Released under https://github.com/zio/zio-sqs/releases/tag/v0.8.0 - please feel free to close the issue when you confirmed this is the desirable behavior by default 🙏🏽

Thank you so much for reporting

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

2 participants