Company growth
A website does not need the same computer setup on its first day as it needs once a million people are using it. It needs more, and different, computer help as more people arrive. Below is one real, honest path a growing website takes, one true step at a time, told by roughly how many people are using it at once. Every real cloud server company offers some version of each piece described here, under its own name for it — nothing on this page depends on using one particular company over another.
All on one server
Up to about 500 people at onceAt the very start, one single computer, called a server, does every job at once: it answers visitors' requests, and it holds the actual database, which is the organized place where all of the website's information is stored. One server is simple to understand, simple to look after, and cheap, and for a small number of people using the website at the same time, one server is genuinely enough. This is the real setup behind the "All On One Server" tier already priced on this site's own Server Infrastructure Maintenance plan.
Two servers — the website and the database, apart
About 500 to about 5,000 people at onceOnce enough people are using the website at the same time, doing two jobs on one machine starts to slow both jobs down. The fix is to give the database its own separate computer, run by a managed database service — a ready-made database that a cloud server company looks after for you, offered under its own name by every major one. The website's own server now only has to answer visitors, and the database only has to hold and answer questions about information, and each does its own job faster for not sharing a machine with the other. This is the real setup behind the "Two Server (App + Database)" tier, the highest tier already priced on this site's own Server Infrastructure Maintenance plan today.
More than one website server, shared out evenly
About 5,000 to about 25,000 people at onceOne website server, on its own, can only answer so many visitors at the same time before it runs out of room. The fix is to run several website servers side by side, all doing the identical job, with a small computer called a load balancer placed in front of them whose only job is deciding which server answers each new visitor, so the work is shared out evenly instead of piling onto one machine. The database also gains a read replica, which is a second, constantly updated copy of the database that is only ever asked questions, never told to change anything, so that answering questions does not slow down the real work of saving new information.
A faster path for pictures, and a memory for common questions
About 25,000 to about 150,000 people at onceAt this size, two more real slowdowns start to matter. The first is distance: a visitor far away from wherever the servers actually sit waits longer for pictures, videos and style files to travel to them. The fix is a content delivery network, shortened to CDN, which is a network of computers placed in many cities that each keep a ready copy of those files, so a visitor's browser gets them from a nearby city instead of one far away. The second is repetition: many visitors often ask the database the exact same question over and over. The fix is a caching layer, a fast, temporary memory store, offered as a ready-made service by every major cloud server company under its own name, that remembers a recent answer instead of making the database work it out fresh every single time. The database itself also starts keeping a live, constantly updated twin copy running in a second physical building at this stage, ready to take over immediately if the first building ever loses power.
The database is split into shards
About 150,000 to about 1,000,000 people at oncePast a certain size, even a well cared-for database, with replicas and caching already in place, becomes too large for comfort on its own. This is the point where sharding, explained fully on the Redundancy, Sharding and High Availability page, actually begins: the one large database is split into several smaller ones, called shards, with each shard responsible for only a portion of the people using the website. Slower background jobs, such as sending an email or resizing a picture someone just uploaded, are also moved off onto a waiting line, called a queue, another ready-made service every major cloud server company offers under its own name, so that a slow job never makes a visitor wait for their own page to finish loading.
Whole copies, running in different countries
More than 1,000,000 people at onceAt this size, the entire system, shards and all, is built again as a complete, working copy inside a second country, and then a third, placed close to where the people actually using the website live, so that someone on the other side of the world is not waiting on a single computer thousands of miles away. From this point on, the plan genuinely stops changing. Growing further does not mean inventing a new kind of computer setup — it means adding more shards, and, when one region is truly full, building the exact same already-proven pattern again in a new country. Every idea needed to do that safely, keeping the information correct and the website working the whole time, is explained in full on the Redundancy, Sharding and High Availability page.
Want the fuller explanation of how all of these copies are kept safe, and kept working, no matter how many there are?
Read Redundancy, Sharding and High Availability