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

feature request: add blockOnConsumed option #277

Open
ruscon opened this issue Sep 25, 2024 · 0 comments
Open

feature request: add blockOnConsumed option #277

ruscon opened this issue Sep 25, 2024 · 0 comments
Labels

Comments

@ruscon
Copy link

ruscon commented Sep 25, 2024

What I want to have:

{
      points: 10,
      duration: 10,
      blockOnConsumed: 15, // new
      blockDuration: 60,
      inMemoryBlockOnConsumed: 15,
      inMemoryBlockDuration: 30,
}

I want to block only after 15 requests, but update the counter value up to 15 in the storage.
It's not the same as inMemoryBlockOnConsumed and inMemoryBlockDuration.

This is necessary when more than one service instance is used. Then the block duration could be taken from the storage and immediately switched to working in memory after the first request.

@animir animir added the feature label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants