-
Notifications
You must be signed in to change notification settings - Fork 52
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
Integrate Ratelimiter Headers and Cron Cleanup Timer with Playground UI #66
Comments
@lucifercr07 I'd like to take this up. |
@aasifkhan7 assigned, thanks for contributing. Please let me know if any details required regarding this. |
#67 |
@aasifkhan7 would you like to continue work on this, draft PR is raised here: DiceDB/playground-mono#43 |
Sure @lucifercr07 let me take a look at the PR |
@lucifercr07 also when we execute a command in Playground the first time, the remaining request updates to 998 , it should be 999, Or is there anything i am missing here, correct me if i am wrong. |
Also regarding on initial page load we have to send a post request to any one of the command to get the headers as the headers are attached to the /shell/cmd/{cmd} endpoint, but this way it will took away one request each time when the page first loads for the user, can we have something like anoither endpoint for this that returns its ratelimits for the initial page load. Also kindly share the discord link so that i can discuss these pointers there instead of here. |
@aasifkhan7 any updates on this? |
@lucifercr07, in the PR DiceDB/playground-mono#43, I noticed that the exposed header is x-last-cleanup-time. However, the UI is intended to display "cleanup time left." How can I retrieve the context for the "next cleanup time"? |
@aasifkhan7 since we know that cron cleanup frequency happens every 15 mins, we can get next cleanup time by |
@vanshavenger yes we can integrate that with our existing |
@lucifercr07, I think we should start sending |
@aasifkhan7 please go ahead and implement, created an issue for it: DiceDB/playground-mono#47 |
@lucifercr07 please review these PRs: |
Closing merged as part of #76 |
Description
The goal of this issue is to enhance the Playground UI by integrating ratelimiter headers and a cron cleanup timer. These headers and timer values should be displayed on the UI whenever the page is loaded or when a command response is received as part of an API call.
The ratelimiter headers will show the current rate limits (e.g., the number of commands allowed and the remaining commands for the current window). Additionally, the cron cleanup timer will display the remaining time before the next scheduled cleanup of keys in DiceDB.
Tasks
Integrate Ratelimit Headers in the UI:
Display the cron cleanup timer and update it as necessary by getting info from backend (
playground-mono
) .Ensure the UI fetches and displays these values on initial page load and on every command response from the server.
Write unit tests for the UI components.
Verify the rate limit headers are updated as expected when interacting with the command interface.
The text was updated successfully, but these errors were encountered: