How to do load testing of a PHP website from both ends


How to do load testing of a PHP website from both ends



We have developed a website in PHP for small services. Before production, we have to do performance and load testing from server side (that is Apache) and from client side.



From Client side, I want to know what is the average response time overall and for each object etc. For back-end side (apache web-server), I want to know how many request (clients) it can handle before its performance start to degrade.



Is there any open source tool as we are on Linux platform, for this purpose. Or is there any website(s) available (freely) that can do all of these testing.
We are more concerned about load testing where we want to request to our website from 1000 users at same time (for example) and want want to check client and server side different performance metrics.





apache benchmark, jmeter
– NobbyNobbs
Jul 3 at 7:53




2 Answers
2



You can find the list of free and open source load testing tools at http://www.opensourcetesting.org/category/testing-tools-overview/performance/?menu-page=overview, currently there are 59 (and counting).



The narrowed down list of the most advanced cross-platform open source load testing tools can be found in Open Source Load Testing Tools: Which One Should You Use? article, it also has feature comparison matrix, sample scripts and reports.



Given your application is in PHP my expectation is that you don't have a lot of expertise in other programming languages so the most obvious choices would be in:



Both tools provide record-and-replay functionality so you will be able to build your test scenario skeleton using browser.



Since you are running Apache, you could use ab to stress test the server side of your application.


ab



Apache HTTP server benchmarking tool



ab is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give you an impression of how your current Apache installation performs. This especially shows you how many requests per second your Apache installation is capable of serving.


ab



Let's look an example:


ab -k -c 100 -n 10000 example.com/



By issuing the command above, you will be hitting http://example.com/ with 100 simultaneous connections until 10 thousand requests are met.



Here you have another tutorial how to use ab


ab



Stress-Test Your PHP App With ApacheBench



Some other helpful tools are:



If you want a more in-detail view of your php objects and all that stuff I would suggest you to check blackfire. As I know they offer a free version for local testing and only one application. But I don't think that you need this one for now.


php



For your front end I would suggest you a set of tools that help you to see how your page performs in different devices:


front end






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

api-platform.com Unable to generate an IRI for the item of type

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?