Inside Facebook’s Massive Architecture: Key Technologies Powering the Platform

Facebook’s architecture, built on a LAMP‑style foundation yet vastly scaled, relies on technologies such as Memcached, HipHop for PHP, Haystack, BigPipe, Cassandra, Scribe, Hadoop, Hive, Thrift, and Varnish, alongside progressive deployment strategies like Gatekeeper, to handle billions of daily requests and petabytes of data.

21CTO
21CTO
21CTO
Inside Facebook’s Massive Architecture: Key Technologies Powering the Platform

21CTO community reading: this article introduces the Facebook website architecture from around 2015, which has seen little change and remains valuable for developers and architects.

Scale of Facebook’s Data

570 billion page views per month (Google Ad Planner).

More photos than all other image sites combined.

Over 3 billion photos uploaded each month.

120 million photos processed per second by Facebook services (excluding CDN).

Over 2.5 billion content items (status updates, comments, etc.) shared each month.

More than 30 000 servers (as of the previous year).

Core Software Stack

Memcached

Memcached is a widely used distributed memory cache that sits between web servers and MySQL to accelerate database access. Facebook runs a massive Memcached cluster spanning thousands of servers, caching tens of terabytes of data in real time.

HipHop for PHP

HipHop converts PHP code into C++ and compiles it, dramatically improving performance. Developed by a small team at Facebook over 18 months, it enables the heavily PHP‑based site to serve traffic efficiently.

Haystack

Haystack is Facebook’s high‑performance object storage system for photos. It stores billions of uploaded images in multiple resolutions, handling over 800 billion stored photos while supporting a processing rate of 1.2 million photos per second.

BigPipe

BigPipe is a dynamic page‑serving system that breaks a page into “pagelets” (e.g., chat window, news feed) and streams them to the browser in parallel, improving perceived load time and allowing partial page rendering even if some components fail.

Cassandra

Cassandra is a fault‑tolerant distributed storage system used by Facebook for search. It is an open‑source NoSQL project that has also been adopted by other large sites.

Scribe

Scribe is a flexible logging system that aggregates massive volumes of logs across hundreds of categories, enabling Facebook to process and analyze logs at scale.

Hadoop and Hive

Facebook uses Hadoop for large‑scale data processing and Hive (originated at Facebook) to provide SQL‑like queries on Hadoop, making big‑data analysis accessible to non‑programmers.

Thrift

Thrift is an internal cross‑language RPC framework that lets services written in PHP, Erlang, Java, C++, and other languages interoperate. Facebook has open‑sourced Thrift, expanding language support.

Varnish

Varnish is an HTTP accelerator and load balancer that caches static assets such as photos and profile pictures, delivering billions of requests per day with low latency.

Operational Practices

Progressive Release & Dark Launch (Gatekeeper)

Facebook’s “Gatekeeper” system enables A/B testing, gradual rollouts, and dark launches, allowing new features to be enabled for a subset of users before full release, providing real‑world stress testing.

Live Profiling

Facebook monitors production performance of every PHP function using the open‑source XHProf profiler, ensuring configuration and code efficiency.

Gradual Feature Shutdown

When performance issues arise, Facebook can progressively disable non‑essential features to prioritize core functionality.

These components and practices together form the backbone of Facebook’s massive, highly available, and continuously evolving platform.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

architectureScalabilityFacebook
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.