test: add warp/axum comparison test#11
Conversation
|
@pawanjay176 @AgeManning could you have a look ? :) |
|
Oh yeah, seems strange Axum is that little bit slower. I do expect the task spawner to take more time for individual small endpoints because it does more things. However, we do want to keep the task spawner because it spawns the processing into our For example, we don't want someone to be hitting the API to retrieve lots of blocks and then have that consume all the CPU threads such that we can no longer follow the chain. By using the spawner, we can still prioritize important chain duties over HTTP API requests. Having it be a little bit slower per endpoint is worth this trade-off I think. |
Yes, I was a bit surprised to see The reason for testing it without the task spawner was purely out of curiosity : I'd like to investigate further to determine if there's something in the code causing this slowdown or if it is only linked to the framework. |
Issue Addressed
Evaluate and benchmark the performance of newly implemented axum endpoints, specifically comparing them to the existing Warp implementation
Proposed Changes
/eth/v1/beacon/genesisAdditional Info
The following results were obtained by running:
gives us the following :
Next Steps
To further investigate, additional endpoints should be tested to determine if performance differences with the task spawner can be reduced.