Coder Social home page Coder Social logo

Comments (5)

Zippersk avatar Zippersk commented on May 22, 2024 1

Is it possible to throw error when limit is less than scanCount? I think it would help...

from nestjs-throttler-storage-redis.

kkoomen avatar kkoomen commented on May 22, 2024

If people run into the problem then I will increase it, maybe even allowing a configurable option for it.

from nestjs-throttler-storage-redis.

wips avatar wips commented on May 22, 2024

@kkoomen , thanks for the scanCount parameter, but it really took me awhile to find the issue. It especially nasty because locally you don't usually test with big limits as @Zippersk mentioned. I believe having an example in readme with full parameter set would be beneficial.

from nestjs-throttler-storage-redis.

kkoomen avatar kkoomen commented on May 22, 2024

@wips This does work right? It has been implemented so I guess I can close this. I totally forgot to close this.

from nestjs-throttler-storage-redis.

wips avatar wips commented on May 22, 2024

@kkoomen , It works, thanks, but in a weird way. For example when I set LIMIT to 1k I need to set scanCount somewhere between 10k and 20k to make it reliably cut-off requests after limit is reached. It happens when I try to load the endpoint at 5-10req/s rate. I assume it has nothing to do with this project, looks like a weird behaviour of ioredis or Redis itself, I don't have much experience with it, so maybe it's expected.

from nestjs-throttler-storage-redis.

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.