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

Extend certifier limits configuration to avoid OOMs #271

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 138 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions certifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ rand = "0.8.5"
serde_json = "1.0.117"
base64 = "0.22.1"
axum-prometheus = "0.6.1"
tower = { version = "0.4.13", features = ["limit"] }
duration-str = { version = "0.7.1", default-features = false, features = [
tower = { version = "0.4.13", features = ["limit", "load-shed", "buffer"] }
duration-str = { version = "0.10.0", default-features = false, features = [
"serde",
"time",
] }
parity-scale-codec = { version = "3.6.12", features = ["derive", "serde"] }
mockall = "0.12.1"

[dev-dependencies]
axum-test = "14.9.1"
reqwest = { version = "0.12.4", features = ["json"] }
tempfile = "3.8.1"
9 changes: 9 additions & 0 deletions certifier/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ init_cfg:

metrics: "127.0.0.1:9090"
randomx_mode: Fast

limits:
# How many requests can be processed in parallel.
# As PoST verification is CPU-bound, it defaults to the number of CPUs.
max_concurrent_requests: 4
# How many requests can be queued, waiting to be processed.
max_pending_requests: 1000
# Maximum size of request body (the proof JSON)
max_body_size: 1024
```

Each field can also be provided as env variable prefixed with CERTIFIER. For example, `CERTIFIER_SIGNING_KEY`.
Expand Down
Loading
Loading