Wondering if infinity requests to a PHP script can overload a website. What do you think?
4 回答
Try apache bench... ab -n 10000 -c 1000
Use ab if you have access to a command line.
The fact that it handles an AJAX request doesn't really matter. It's the same with the fact that a PHP scripts sends the request - it does not matter that it comes from a PHP script. So your question basically is: "Does my server go down if a PHP scripts is called very often?" and this only depends on the Hardware and Installation of your Server.
If you are bench testing your Apache server for a particular configuration you need to measure the number of concurrent requests vs the response time.
It makes little difference if the server is able to handle X number of concurrent requests if the response time is too long. The is because users are impatient and likely to just move on.