Skip to content

Commit

Permalink
Add RPC batch size CLI option (#1277)
Browse files Browse the repository at this point in the history
* Add RPC batch size CLI option.

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* Minor typo.

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* Minor typo.

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

---------

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>
  • Loading branch information
bgravenorst authored Feb 28, 2023
1 parent 23ed278 commit b52324c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/public-networks/how-to/use-besu-api/json-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ To make RPC requests over HTTP, you can use [`curl`](https://curl.haxx.se/downlo
}
```

You can use `curl` to make multiple RPC requests over HTTP at the same time.
Send the requests as an array, and receive an array of responses.
You can use `curl` to make multiple RPC requests (batch requests) over HTTP at the same time.
Send the requests as an array, and receive an array of responses. The default number of allowed requests
in a RPC batch request is `1024`. Use the [`--rpc-http-max-batch-size`](../../reference/cli/options.md#rpc-http-max-batch-size)
command line option to update the default value.

!!! example

Expand Down
29 changes: 29 additions & 0 deletions docs/public-networks/reference/cli/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -2491,6 +2491,35 @@ To allow remote connections, set to `0.0.0.0`.
The maximum number of allowed HTTP JSON-RPC connections. Once this limit is reached, incoming connections are rejected. The default is 80.
### `rpc-http-max-batch-size`
=== "Syntax"
```bash
--rpc-http-max-batch-size=<INTEGER>
```
=== "Example"
```bash
--rpc-http-max-batch-size=1200
```
=== "Environment variable"
```bash
BESU_RPC_HTTP_MAX_BATCH_SIZE=1200
```
=== "Configuration file"
```toml
rpc-http-max-batch-size=1200
```
The maximum number of allowed requests in a [RPC batch request](../../how-to/use-besu-api/json-rpc.md#http).
The default limit is `1024`, and `-1` specifies no limit.
### `rpc-http-port`
=== "Syntax"
Expand Down

0 comments on commit b52324c

Please sign in to comment.