Introduce loadtest Command to Soroban RPC #1032
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
This PR adds a new
loadtest
command to generate configurable load to a running Soroban RPC server.Examples:
Simple ping loadtest at 10000 requests/s for 1 minute
soroban-rpc loadtest --soroban-rpc-url=<url> -g getHealth -n 10000 -d 1m
Simulate transaction loadtest at 1000 requests/s for 3 minutes
soroban-rpc loadtest --soroban-rpc-url=<url> -g simulateTransaction -n 1000 -d 3m --network-passphrase="Test SDF Future Network ; October 2022" --hello-world-contract-path="./test_hello_world.wasm"
Tested by spinning up a Soroban RPC docker image on a devbox and generating load to it from my local machine.
Why
It's useful for both us, and infrastructure providers, to be able to benchmark
soroban-rpc
performance with different types of request loads. In the future, we can consider productionalizing this to run on soroban releases to make sure we don't introduce notable performance regressions.Known limitations
getHealth
,getEvents
,simulateTransaction
)soroban-rpc
metrics have limited support)