Wikipedia's system design

0/3
☰
Wikipedia · system design

Wikipedia is a read-mostly machine: over a thousand page views for every edit, so the whole design is about answering reads from a cache close to you — and throwing exactly the right copies away when someone edits.

+ The whole system in one paragraph

Wikipedia gets over a thousand page views for every edit, so the design is about answering reads from a cache near you. Cache servers in seven data centers answer most logged-out reads from memory or disk. An edit is written once in a core data center, and a purge message tells every cache server to throw away its old copy.

~176B
page views by people: Wikipedia + its sister sites (2025)[26]
~171M
edits to Wikipedia alone, all languages, people + bots (2025)[27]
90%+
of the ~21B monthly reads the 2020 post counts (a narrower count than all CDN traffic), served by the CDN[13]

In this lesson

3 chapters · ~8 min · a quick check in each

Everything is on this page — just scroll down ↓

Chapter 1 of 3

The whole system

1
Requirements

What it must do — and how well

What Wikipedia must do (yellow) and how well (blue). The note that shapes everything: 1,000+ views for every edit. The million views in an hour is one article on June 25, 2009.

ⓘ Details & sources

Yellow = what the system must do. Blue = how well it must do it.[8][13][25][32]

Serve any article,in 300+ languages,to anyone.Anyone can edit —and the next readersees it.Keep every revisionof every page,forever.Search acrossmillions ofarticles.Survive a millionviews of one page inan hour.Read-mostly: 1,000+views for everyedit.A non-profit'sbudget: hostingunder 2% ofspending.Private: encryptedeven between datacenters.
2
Architecture

Wikipedia, end to end

Left: the edge (DNS, a load balancer and two caches, in every data center), which answers most reads. Right: the core, where MediaWiki builds pages and databases keep every revision.

ⓘ Details & sources

Left: the edge, in all seven data centers. Right: the core, where MediaWiki and the databases live. Click any piece; play a flow.[1][2][3]

Watch it happen:
Edge: every data centerCore: Virginia + Texaswhere?1223miss4still a miss55lock?reads5writesreplicateeventspurgepurgeindexGeoDNSnearest data centerYoubrowser or appLoad balancerLVS → LibericaTLS terminationHAProxyFrontend cacheVarnish · in memoryBackend cacheATS · on diskSearchOpenSearchKafkapurge + job eventsDB primarywrites · MariaDBDB replicasmost readsMediaWikiPHP app serversParser cacherendered HTMLPoolCounterone parse at a timeMemcachedvia mcrouter
clientedge / CDNload balancerservicecachedatabasequeue dashed border = simplified model
12345
Step 1 of 5

You type en.wikipedia.org. Wikipedia's own DNS sees where you are and answers with the closest of its seven data centers.

4
In numbers

Read-mostly, in numbers

English Wikipedia got ~1,400 page views per edit in 2025. That ratio is why caching whole pages pays: in 2020 the caches answered most of what they received.

ⓘ Details & sources

English Wikipedia alone: about 1,400 page views per edit in 2025. That ratio is why caching whole pages pays.[28][29][14]

English Wikipedia, 2025Page views by people85.5BEdits, people + bots61MRequests answered by the CDN (2020)Pages, CSS, JS (text)83–88%Images and video (upload)~97%
Curious? Go deeper+ 1 optional
3
Architecture

Seven data centers, two cores

Five data centers only cache, close to readers; the two cores, Virginia and Texas, run MediaWiki and the databases. An edit goes to the primary core, which swaps twice a year.

ⓘ Details & sources

Cache-only sites send misses to the nearest core; edits go to whichever core is primary (Virginia Mar–Sep, Texas Sep–Mar). São Paulo's routing isn't published.[4][3][17][18][56][57][58][59]

Watch it happen:
The two coresmissesmisses2edits (Mar–Sep)missesmissesreplicateSan Franciscoulsfo · cache onlySingaporeeqsin · cache onlyTexascodfw · primary Sep–MarVirginiaeqiad · primary Mar–SepAmsterdamesams · cache onlyMarseilledrmrs · cache onlySão Paulomagru · cache only
edge / CDNservice dashed border = simplified model
12
Step 1 of 2

A reader in Asia is routed by DNS to Singapore, which only caches. Most pages are answered right there.

Quick check

English Wikipedia had about 85.5B page views and 61M edits in 2025. Roughly how many views per edit?

Pick one — or just keep scrolling, it's not graded.

Keep going — it's free

Create your free account to unlock the rest of Wikipedia's system design, keep your progress and pick up right where you left off.

  1. 2Reading
  2. 3Editing
Questions & comments

Ask anything about this system, or share how you'd design it.

Log in to join the conversation