sui icon indicating copy to clipboard operation
sui copied to clipboard

remove blocking rpc and use a separate tokio runtime for jsonrpc server

Open patrickkuo opened this issue 2 years ago • 2 comments

  • reverted marking RPC methods as "blocking"
  • using separate tokio runtime for the RPC server, worker size is defaulted to 1/2 of the CPU core, can be changed using RPC_WORKER_THREAD env variable.
  • use tokio::spawn for some of the long running rocksdb calls to unblock the request handling task.

patrickkuo avatar Apr 14 '23 19:04 patrickkuo

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
explorer ⬜️ Ignored (Inspect) Apr 22, 2023 1:44am
explorer-storybook ⬜️ Ignored (Inspect) Apr 22, 2023 1:44am
sui-wallet-kit ⬜️ Ignored (Inspect) Apr 22, 2023 1:44am
wallet-adapter ⬜️ Ignored (Inspect) Apr 22, 2023 1:44am

vercel[bot] avatar Apr 14 '23 19:04 vercel[bot]

@patrickkuo have we tried to move all the spawn to the jsonrpc layer? I'm a bit concerned the changes in authority.rs could impact validator performance. It could be in a bad or even good way, but hard to tell without experimenting first.

sure, I will limit the change to RPC layer

patrickkuo avatar Apr 21 '23 23:04 patrickkuo