Search code examples
phplaravelcakephp-3.0swoolefastroute

Is wrk benchmark tool reliable for testing fastest php framework


So I tried to test php framework on my localhost (6 year old i7 pc) using:

wrk -t12 -c100 -d30s http://127.0.0.1
  • Laravel without DB I've got: 698 request per second
  • Cakephp: 1,400 rps
  • Swoole : 197,000 rps
  • Swoole with middleware (fastroute, etc) for API: 176,000 rps

enter image description here

Is wrk reliable and I can tell to my boss that my api can process 170k request per second?


Solution

  • Yes, Wrk is one of the most respected benchmarking tool but you can not tell you boss that your application will handle 176,000 requests/second

    because there will be some added conditions which will reduce the application performance. To get the correct benchmark score you can test by replicating all those conditions on your development environment and try benchmarking.

    Conditions like

    1. Database Connection (if Application is using Database)
    2. Server Configuration
    3. Reverse Proxy from your HTTP Server (i.e. Nginx or Apache) Very important
    4. And other application-specific conditions