Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What server-side language(s) should be used for user-created information sites such as Facebook, SE, Blogs, etc.?

share|improve this question
up vote 3 down vote accepted

It can be any language. But if you say PHP, I have some points-

From migueldeicaza in Twitter:
Reddit is experiencing some cognitive dissonance pains over StackOverflow using 5 .NET servers instead of 500 PHP ones.

I have also seen a article by a facebook developer team member who said that, if facebook were to re-developed from scratch now, probably they would have chosen python.

So, if your site really scale up, you should consider using other languages than php. Using php you can scale up. But have to do a lot of tweaking IMHO.

share|improve this answer

Well, Facebook is written in PHP and SE sites are written in ASP.NET. Blog engines are pretty diverse in their implementations as well (Wordpress is in PHP, dasBlog is .NET, etc.). The obvious answer is "any language will do, pick whatever you're most familiar with". With the possible exception of languages like C that aren't typically used for large-scale web development.

There are some performance metrics to consider, but just about anything can be made to scale appropriately if/when you run up against having handle massive traffic.

share|improve this answer
I believe SE switch from PHP to ASP.NET at some point and there was a large performance increase. I could be remembering incorrectly, however. – Matthew Read Jan 1 '11 at 23:43
@Matthew: SE was written in ASP.NET MVC from the very beginning. – Dean Harding Jan 1 '11 at 23:48
Don't forget MediaWiki, also in PHP. – Macneil Jan 2 '11 at 5:23
@Macneil don't forget me also Develop in MVC. ha ha very nice. – Gupta Anirudha Jan 30 '11 at 17:56
Facebook doesn't use the vanilla PHP implementation. HipHop compiles PHP to C++ which is then compiled with g++. Saying that facebook uses PHP is like saying Noh is just theater. – Scant Roger Feb 26 '11 at 23:45

The language does not matter nearly as much as the architecture of the server application.

In theory, sites like these could be created in any language, but in practice it comes down to what languages are reasonable choices given things like differences in your familiarity with them and your choice of platform.

share|improve this answer

Let's see the list

  • Facebook - PHP
  • Twitter - Ruby on Rail
  • Digg - PHP
  • Wordpress - PHP

My impression is that PHP is on the lead, because the owner cost is lower.

Most hosting offer LAMP service in really cheap prices, but not that close with say ASP or J2EE server (Google App Engine may be a escape route for this).

For Small company or individuals, as cost is a vital factor, they'll pick PHP instead. Which makes more users and devs effort driven more into Opensource project in PHP, and thus reinforced the cycle. (Correct me if I am wrong)

As many had mentioned, the language of choice probably decided by the scalability and the deployment environment you have.

share|improve this answer
Actually, twitter uses scala – Mahmoud Hossam Feb 26 '11 at 20:31
for backend yes, and they did used ror before scala rewite – Nazgob Feb 26 '11 at 21:39
Facebook doesn't use the vanilla PHP implementation. HipHop compiles PHP to C++ which is then compiled with g++. Saying that facebook uses PHP is like saying Charles Bukowki drank too much. – Scant Roger Feb 26 '11 at 23:54

The architecture is far more important. Web servers are quite easy to scale, databases are not.

If you use a relational database you'll need to distribute it amongst different servers. You'll soon need to throw everything you know about RDBMS out the window and use techniques like sharding or a non-relational database.

Then you have other performance gains for caching servers, load balancers. With many servers there is also deployment to worry about.

The language doesn't matter too much when you consider performance is limited by disk usage and ram not CPU. Having said that I have to get in my 2c of PHP hate, it really isn't a nice language.

share|improve this answer

I have a feeling that if Fog Creek, an established firm, wasn't there to help support the infrastructure of SO / SE, ASP.NET MVC / IIS / SQL Server would not have been such an easy and obvious choice. Many startups understandably take advantage of the free or cheap solutions, and by the time they're able to afford something easier to transform into a more robust solution, they are too far deep into it. So they stick with their original stack and tweak it the best they could. Hence, the public growing pains we've witnessed for some "overnight" successes.

That said, sites that popular are so few and far between that it's a "happy" problem if you ever find yourself in that situation. So, like others have said, the language is way down on the list of importance. Focus on architecture, and potential, reasonable growth expectancy for scalability.

share|improve this answer

If I were to pick a language for large scale systems at this point it would probably be Erlang. It has a lot of features designed for fault tolerance and concurrency in telecoms that just make large scale systems easier to build. Also the lightweight thread model will work quite well in that space.

Honestly I don't think there is one perfect language for building large scale systems (but some better choice to be sure)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.