You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run it on Python 3.11.3 with robyn 0.36.0 (default config, single process), and test with httpit -d60s -c8 'http://10.200.0.210:8000/' (8 concurrent connections) and results are as follows:
rps
latency
performance
no middleware
~23600
0.32 ms
100%
middlware 1
~17500
0.46 ms
74% (-26%)
middleware 1&2
~13700
0.58 ms
58% (-42%)
Both the server and the client are running on idling systems and network so other factors could be excluded, and results are consistent when tests are repeated.
What is interesting is that fastapi delivers similar results - rps are lower of course but empty middleware also introduces ~30% degradation, while blacksheep has almost no overhead.
Now the question is - what could be the possible reason for this degradation?
The text was updated successfully, but these errors were encountered:
Firstly, thank you for raising this issue! This is a very interesting observation and I was not aware of such a pattern. Thank you for pointing it out. 😄
We execute the middlewares serially but I will have a look at how Blacksheep handles the middlewares. Thanks again!
I was going through your issue and turns out we can chain middlewares in Robyn 😅 This is unintentional but I really wanted to implement this feature anyway. LOL
Just tried robyn and in general I am impressed - it looks very promising, thank you! 👍
However, after first quick test for framework overhead (empty response) I noticed serious degradation in performance after adding an empty middleware.
My test code is dead simple:
I run it on Python 3.11.3 with robyn 0.36.0 (default config, single process), and test with
httpit -d60s -c8 'http://10.200.0.210:8000/'
(8 concurrent connections) and results are as follows:Both the server and the client are running on idling systems and network so other factors could be excluded, and results are consistent when tests are repeated.
What is interesting is that fastapi delivers similar results - rps are lower of course but empty middleware also introduces ~30% degradation, while blacksheep has almost no overhead.
Now the question is - what could be the possible reason for this degradation?
The text was updated successfully, but these errors were encountered: