Load Comparison - PyCurl vs HTTPClientFactory + Deferred

    In the process of developing one project in Python + Twisted (SMS request dispenser), I had to rewrite the call to the URL of various services from different servers from a 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

    Jakarta Jmeter was used.

    In 200 threads, 100 requests were sent to the same server, but with random data (to exclude caching). I ran it on an ordinary working machine with a GUI - so for a rough estimate.

    Test results

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

    Distribution Charts

    Blocking (PyCurl)

    Non-blocking (deferred)


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

    Of course, I did not discover America, but at least - now I have specific numbers on hand. I hope they come in handy for someone.

    Also popular now: