rpc/jsonrpc/server: ws server optimizations (#5312)

* docs: goleveldb is much more stable now

Refs https://github.com/syndtr/goleveldb/issues/226#issuecomment-682495490

* rpc/core/events: make sure WS client receives every event

previously, if the write buffer was full, the response would've been
lost without any trace (log msg, etc.)

* rpc/jsonrpc/server: set defaultWSWriteChanCapacity to 1

Refs #3905
Closes #3829

setting write buffer capacity to 1 makes transactions count per block
more stable and also reduces the pauses length by 20s.

before: https://github.com/tendermint/tendermint/issues/3905#issuecomment-681854328 net.Read - 20s
after: net.Read - 0.66s

* rpc/jsonrpc/server: buffer writes and avoid io.ReadAll during read
This commit is contained in:
Anton Kaliaev
2020-09-04 10:58:47 +04:00
committed by GitHub
parent 39d2ac4dbc
commit 59ec3d91e4
6 changed files with 133 additions and 75 deletions

View File

@@ -7,7 +7,10 @@ order: 4
## Database
By default, Tendermint uses the `syndtr/goleveldb` package for its in-process
key-value database.
key-value database. If you want maximal performance, it may be best to install
the real C-implementation of LevelDB and compile Tendermint to use that using
`make build TENDERMINT_BUILD_OPTIONS=cleveldb`. See the [install
instructions](../introduction/install.md) for details.
Tendermint keeps multiple distinct databases in the `$TMROOT/data`: