📜 ⬆️ ⬇️

Load Comparison - PyCurl vs HTTPClientFactory + Deferred

In the process of developing a single project in Python + Twisted (distributor of SMS requests), we had to rewrite the call of URLs of various services from different servers from the blocking call through PyCurl to non-blocking (client.HTTPClientFactory + deferred). To have real data before my eyes, I decided to give a load and look at the results.


Test description


Used by Jakarta Jmeter

In 200 threads, 100 requests were sent to the same server, but with random data (to exclude caching). It was run on an ordinary working machine with a GUI - so for an approximate assessment.
')

Test results




One mistake - the base failed, so the error can be neglected


Distribution graphs



Blocking (PyCurl)




Non-blocking (deferred)



Results


As can be seen from the result, the defered server has a minimum response value of almost 2.5 times less (due to the failure of the database), and the maximum value is less than twice that of the blocking server. The average is also less than 2 times.

I, of course, did not discover America, but at least - now I have concrete figures on my hands. I hope someone will come in handy.

Source: https://habr.com/ru/post/92721/


All Articles