dice icon indicating copy to clipboard operation
dice copied to clipboard

Integration and Stress tests for Rate Limiter implemented using DiceDB for Playground Backend

Open lucifercr07 opened this issue 1 year ago • 4 comments

Description

DiceDB Playground is an interactive platform that allows users to experiment with DiceDB commands in a live environment, similar to the Go Playground. Users will be able to submit and execute commands directly through a web interface. The initial implementation will focus on enabling users to search for and trigger commands.
For more details about DiceDB playground you can check here.

As part of this task we need to enhance unit tests, integration tests and stress test Rate Limiter implemented using DiceDB for Playground Backend. This task would be extension of https://github.com/DiceDB/dice/issues/729

Details

  • Test the implementation under load to ensure it correctly blocks requests after 1000 requests/minute.
  • Test with fewer than 1000 requests per minute, ensuring no requests are blocked.
  • Test with more than 1000 requests per minute, ensuring that requests beyond the limit are blocked and receive a 429 response.
  • Ensure the rate limit resets correctly after each minute.
  • Validate the correctness of rate-limiting headers (x-ratelimit-limit, x-ratelimit-remaining, etc.) in responses.
  • Test normal API /cli behaviour when under the rate limit (e.g., under 1000 requests/minute).

lucifercr07 avatar Sep 26 '24 13:09 lucifercr07

Dependent on https://github.com/DiceDB/dice/issues/729

lucifercr07 avatar Sep 26 '24 13:09 lucifercr07

@lucifercr07 I would like to work on this

karandixit10 avatar Sep 26 '24 13:09 karandixit10

hey @lucifercr07 i would too like to work on this

rishavvajpayee avatar Sep 26 '24 14:09 rishavvajpayee

related PR : https://github.com/DiceDB/playground-mono/pull/13

rishavvajpayee avatar Oct 02 '24 19:10 rishavvajpayee

Closing, merged as part of https://github.com/DiceDB/playground-mono/pull/13

lucifercr07 avatar Oct 04 '24 15:10 lucifercr07