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

Implementing API Endpoint Throttling Tied to User Sessions #1944

Open
URVL opened this issue Dec 15, 2023 · 0 comments
Open

Implementing API Endpoint Throttling Tied to User Sessions #1944

URVL opened this issue Dec 15, 2023 · 0 comments
Labels

Comments

@URVL
Copy link

URVL commented Dec 15, 2023

Impress and Node.js versions

No response

Platform

No response

Describe the bug

Currently, there is a single queue for all users per API endpoint to manage throttling. This setup allows a single user to flood an endpoint with requests, leading to performance degradation for the API experienced by other users. To address this, we propose binding the throttling mechanism to individual user sessions. This change aims to ensure that the excessive requests of one user do not negatively impact the API performance for others.

A piece of video discussing this problem

//Example method with timeout and queue:

({
  timeout: 1000,

  queue: {
    concurrency: 1,
    size: 200,
    timeout: 3000,
  },

  method: async ({ a, b }) => {
    const result = a + b;
    return result;
  },
});

To Reproduce

No response

Expected behavior

No response

Screenshots

No response

Additional context

No response

@URVL URVL added the bug label Dec 15, 2023
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

1 participant