Best Framework/CMS/Platform for large community websites?
View Single Post
03-25-2009, 09:24 PM
Join Date: Nov 2007
Originally Posted by
If by correctly, you mean making the intensive functions in C and adding them on, I would agree. But PHP is in and of itself slow because it is a interpreted scripting language. Even when cached, it is less efficient than hand written compiled code. The reason for this is that PHP code commands the PHP engine, not the machine.
No, I mean straight out PHP.
I've worked with PHP to serve millions of users a day. If by "slow" you mean in comparison C, then you're wrong again. If you're going for straight out speed, then just write it in ASM.
The reason for this is because the linux kernal will cache the data being served. You even have the ability to save the compiled PHP - so you don't need to continously recompile your scripts.
If you believe PHP is a "slow" language, maybe you're in the wrong business. PHP is extremely fast and flexible.
Now, don't get me wrong. In order to serve MILLIONS of users a day, you need several web servers, a couple memcache servers, and a few database servers.
You'll usually set up your Master / Slave DB's, and use them correctly (balancing the selects, using a bucket list)
Then you'll need a couple memcache servers, where you handle which users use which memecache server. (Aka: hashing)
Your web servers will need to all share the same code base, and have a load balancer pool them.
You can impliment things like caching, but I'm able to serve hundreds of thousands of requests without any caching (Daily).
Where I Ramble:
What I do:
Zynga Game Network
Senior Software Engineer at
View Public Profile
Send a private message to dschreck
Visit dschreck's homepage!
Find More Posts by dschreck