Coder Social home page Coder Social logo

Comments (10)

esetnik avatar esetnik commented on July 23, 2024

@zoellner any idea why this is the case? AWS specifies 20s as the maximum allowable WaitTimeSeconds and I use this in my projects without any issues.

from serverless-plugins.

zoellner avatar zoellner commented on July 23, 2024

I'm not quite sure yet.
It might be related to this softwaremill/elasticmq#9
Although they claim that it is fixed on their end

My serverless-offline-sqs config is

  serverless-offline-sqs:
    autoCreate: false
    apiVersion: '2012-11-05'
    endpoint: http://127.0.0.1:9324
    region: us-east-1
    accessKeyId: root
    secretAccessKey: root
    skipCacheInvalidation: false

using softwaremill/elasticmq:latest docker image for local SQS

from serverless-plugins.

esetnik avatar esetnik commented on July 23, 2024

I am using localstack so that could account for the difference

from serverless-plugins.

zoellner avatar zoellner commented on July 23, 2024

So maybe make that a parameter passed through from the serverless.yaml config? That way I can adjust it as needed while you can still use the maximum value?

from serverless-plugins.

esetnik avatar esetnik commented on July 23, 2024

@zoellner actually the maintainer suggested the same thing in my PR #96 (review). I'd be happy with exposing a configuration for this, except the default should probably still be 20s as this gives the best performance characteristics.

from serverless-plugins.

zoellner avatar zoellner commented on July 23, 2024

I'd suggest 15s as a compromise default. Would have a lower likelihood of others running into similar issues.

from serverless-plugins.

esetnik avatar esetnik commented on July 23, 2024

Not opposed to that, but I don't really understand why 15s vs 20s would make a difference from a compatibility perspective. In my experience almost everyone who uses SQS in production sets it to 20s in production to reduce costs without any other downsides so I'm not sure why we'd make it lower here.

from serverless-plugins.

zoellner avatar zoellner commented on July 23, 2024

Given that it was at 1s before I'm not sure how many people had an issue with compatibility before the change.
But since I didn't dig deeper to find the true cause of the issue with 20s I can't make a super strong argument against it either. Just feel that 15 (or event 19) seconds as default will be a little "safer" for most.

from serverless-plugins.

esetnik avatar esetnik commented on July 23, 2024

The reason I changed it from 1s to 20s is that we use real queues in some cases and this change caused a 20x decrease in cost. I’d argue that for most users 20s is the safest setting since changes to this value can cost real money. I am hesitant to agree that a different default is appropriate solely due to a bug in a third-party library. I think the argument is largely irrelevant if you’re able to supply a PR that makes this value configurable, then I’m happy either way because I will just set it at 20 for my projects.

from serverless-plugins.

zoellner avatar zoellner commented on July 23, 2024

Not sure using real queues is a common use case for serverless-offline - the name implies that it should be optimized for offline use cases.

I've just downgraded to the previous version for now since this introduced a breaking change, so should not have been a patch version change when released by @CoorpAcademyAdmin

from serverless-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.