Facebook uses a customized LAMP stack and additional technologies to support over 500 million users. Key aspects include:
1) Facebook created HipHop for PHP to improve PHP performance by 50%, transforming PHP to C++ binaries.
2) Facebook stores most user data in MySQL clusters but also uses Cassandra, Hadoop, and Apache Hive for large-scale data analysis across petabytes of user data.
3) Data analysis is crucial for product decisions; Facebook analyzes data from web servers and databases to test features and email content. Scribe and Hadoop are used to aggregate this data.