I wonder how tough PHP is? Let's say my server get 50.000 hits to the index page.
Index.php contains some php/mysql/cookie action. Would it be a problem? My server config: 450 Mhz, 256 Kb ram, linux, apache.
Michael
Overall I think its pretty tough, a mate (who I hardly see any more due to his work!)whos the lead programmer on a site had 150k hits overnight and this was all handled okay, tough on the server, but it didn't crash.
Hi,
It highly depends on the quality of the code. With poor code PHP won't handle no more than 10 simultaneous users on your site ( I've seen that, breaking a dual Xeon 600 with 6-7 users ). With good coding pratices you can handle hundreds thousands hits a day even on a low end server. This is a general rule and is applicable not only to PHP.
Quite true.
The next question that pops to mind is: What is good code, or rather, what would constitute bad code?
Ok... is good code = fast code?
Is it possible to print some timestamps in the PHP script so I can see how much time the PHP uses to create the final page?
http://www.phpbuilder.com/columns/akent20000926.php3
That should help.
Well,
what about your connection?
Vincent, Ithink that neither you nor I can give an absolute answer to the question: what is bad code and what is good code. It would be to nice if cookbooks about how to write good code exists.
good code = fast code
It's not exactly what I said. I think good code is code that use available resources in the most efficient way. It highly depends on the goal you want to achieve. For example, you can write code that runs very fast but exhausts all system memory, or won't be able to handle high load... In spite it's really fast, you can't call it good code.