rpc server: add rate limiting middleware (#3301)

Add RPC server rate limiting which can be utilized by the CLI
`--rpc-rate-limit <calls/per minute>`

Resolves first part of
https://github.com/paritytech/polkadot-sdk/issues/3028

//cc @PierreBesson @kogeler  you might be interested in this one

---------

Co-authored-by: James Wilson <james@jsdw.me>
Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
This commit is contained in:
Niklas Adolfsson
2024-02-17 11:18:15 +01:00
committed by GitHub
parent 612587b7b6
commit de73dd9ac5
16 changed files with 257 additions and 23 deletions
+11
View File
@@ -0,0 +1,11 @@
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json
title: rpc server add rate limiting.
doc:
- audience: Node Operator
description: |
Add rate limiting for RPC server which can be utilized by the CLI `--rpc-rate-limit <calls per minute>`
The rate-limiting is disabled by default.
crates: [ ]