This article remind me a classic discussion I had some years ago with an old friend, a Java developer, who was always trying to argue for me why Java is better and contacted me few months ago announcing that he’s finally convinced to move to PHP. The discussion Java Vs PHP won’t finish I’m sure, but this is not the point. Brian Fioca, who’s behind the Jobby project, posted a very interesting article on O’reilly network about Digg PHP’s Scalability and Performance.

Several weeks ago there was a notable bit of controversy over some comments made by James Gosling, father of the Java programming language. He has since addressed the flame war that erupted, but the whole ordeal got me thinking seriously about PHP and its scalability and performance abilities compared to Java. I knew that several hugely popular Web 2.0 applications were written in scripting languages like PHP, so I contacted Owen Byrne – Senior Software Engineer at digg.com to learn how he addressed any problems they encountered during their meteoric growth. This article addresses the all-to-common false assumptions about the cost of scalability and performance in PHP applications.

Brian interviewed Owen Byrne – Senior Software Engineer at digg.com – and got some good points concerning scalability and performance of Digg :
1- Digg gets 200 million page views per month
2- Digg is running with 3 web servers and 8 small database servers
3- Owen pointed that “none of the scaling challenges we faced had anything to do with PHP, in fact, we found that the lightweight nature of PHP allowed us to easily move processing tasks from the database to PHP in order to deal with that problem.
4- Digg uses APC PHP accelerator platform as well as MCache to lighten their database load.


It’s interesting to notice also that Digg is in the process of preparing to scale to 10 times current load, not by increasing headcount but by switching to a different database platform. And this is also not a PHP related issue, Brian concluded “It turns out that it really is fast and cheap to develop applications in PHP. Most scaling and performance challenges are almost always related to the data layer, and are common across all language platforms. Even as a self-proclaimed PHP evangelist, I was very startled to find out that all of the theories I was subscribing to were true.”
This is interesting to see experience of some successful websites running PHP and how they deal with scalability and performance issues. The major issue is always database related and of course hardware depending on the website’s load.