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

Improve metrics and add rate limit for the batch request feature in WS server #2474

Closed
quiet-node opened this issue May 10, 2024 · 0 comments · Fixed by #2487
Closed

Improve metrics and add rate limit for the batch request feature in WS server #2474

quiet-node opened this issue May 10, 2024 · 0 comments · Fixed by #2487
Assignees
Labels
enhancement New feature or request

Comments

@quiet-node
Copy link
Member

Problem

Currently, batch request feature lack of metrics and is not rate limited.

Solution

Improve metrics and add rate limit for the batch request feature in WS server

Alternatives

No response

@quiet-node quiet-node added the enhancement New feature or request label May 10, 2024
@quiet-node quiet-node self-assigned this May 10, 2024
quiet-node added a commit that referenced this issue May 16, 2024
…ture in ws server (#2474) (#2487)

* feat: added shouldRateLimitOnMethod() to connectionLimiter

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* feat: applied shouldRateLimitOnMethod() on batch requests

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* feat: applied shouldRateLimitOnMethod() on single requests

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* feat: added methodsCounter metric for batch_requests

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* fix: skipped rateLimit for eth_subscribe and eth_unsubscribe

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* test: added acceptancetest for rate limiter in the WS

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* test: enabled test_ws_server in ratelimiter CI

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

---------

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
quiet-node added a commit that referenced this issue May 21, 2024
…ture in ws server (#2474) (#2487)

* feat: added shouldRateLimitOnMethod() to connectionLimiter

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* feat: applied shouldRateLimitOnMethod() on batch requests

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* feat: applied shouldRateLimitOnMethod() on single requests

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* feat: added methodsCounter metric for batch_requests

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* fix: skipped rateLimit for eth_subscribe and eth_unsubscribe

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* test: added acceptancetest for rate limiter in the WS

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* test: enabled test_ws_server in ratelimiter CI

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

---------

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
quiet-node added a commit that referenced this issue May 21, 2024
feat:  improved metrics and added rate limit for the batch request feature in ws server (#2474) (#2487)

* feat: added shouldRateLimitOnMethod() to connectionLimiter



* feat: applied shouldRateLimitOnMethod() on batch requests



* feat: applied shouldRateLimitOnMethod() on single requests



* feat: added methodsCounter metric for batch_requests



* fix: skipped rateLimit for eth_subscribe and eth_unsubscribe



* test: added acceptancetest for rate limiter in the WS



* test: enabled test_ws_server in ratelimiter CI



---------

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
1 participant