I am receiving the http request in apache which is handled via a php file. Is there way(by some setting in apache) that same request can be bifurcated to two php files where they can be processed simultaneously and in parallel. Will it cause any performance issue??
Share
Unless you have a very odd set up, you should be able to process up to thousands of requests per second.
Apache (assuming a standard set up) spawns a new worker thread for each request, then the thread handles the request. So if you have a php script handling the request, then it will handle the request inside that thread.
PHP scripts are not locked, they are interpreted and executed by the PHP runtime when the server handles the request, this means that a single script can be running in multiple threads.
For example, the application that I work on at my job consists of hundreds of PHP files all working together and the application fields 1000’s of requests per second, this all on a mostly standard LAMP set up (we have some extra’s, like XHProf).