[#1639] node: Support active RPC limiting
All checks were successful
DCO action / DCO (pull_request) Successful in 43s
Vulncheck / Vulncheck (pull_request) Successful in 1m0s
Build / Build Components (pull_request) Successful in 1m33s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m35s
Tests and linters / Run gofumpt (pull_request) Successful in 2m31s
Tests and linters / gopls check (pull_request) Successful in 3m10s
Tests and linters / Staticcheck (pull_request) Successful in 3m13s
Tests and linters / Lint (pull_request) Successful in 3m17s
Tests and linters / Tests with -race (pull_request) Successful in 3m19s
Tests and linters / Tests (pull_request) Successful in 3m20s

- Allow configuration of active RPC limits for method groups
- Apply RPC limiting for all services except the control service

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
Aleksey Savchuk 2025-02-07 15:17:37 +03:00
parent 096fefa340
commit 72685e35ee
Signed by: a-savchuk
GPG key ID: 70C0A7FF6F9C4639
11 changed files with 217 additions and 5 deletions

View file

@ -416,6 +416,27 @@ object:
| `delete.tombstone_lifetime` | `int` | `5` | Tombstone lifetime for removed objects in epochs. |
| `get.priority` | `[]string` | | List of metrics of nodes for prioritization. Used for computing response on GET requests. |
# `rpc` section
Contains limits on the number of active RPC for specified method(s).
```yaml
rpc:
limits:
- methods:
- /neo.fs.v2.object.ObjectService/PutSingle
- /neo.fs.v2.object.ObjectService/Put
max_ops: 1000
- methods:
- /neo.fs.v2.object.ObjectService/Get
max_ops: 10000
```
| Parameter | Type | Default value | Description |
|------------------|------------|---------------|--------------------------------------------------------------|
| `limits.max_ops` | `int` | | Maximum number of active RPC allowed for the given method(s) |
| `limits.methods` | `[]string` | | List of RPC methods sharing the given limit |
# `runtime` section
Contains runtime parameters.