Scaling up
One way to handle more traffic is to give a single machine more power: more , more memory, faster disks. This is , or “scaling up”. It is the simplest option, because your application still runs on one : there is no new routing to configure and no need to split work between machines. For a small service it is often the right first move.
The catch is that it runs out. There is always a largest machine you can buy, and beyond that you cannot add capacity no matter how much you pay. The lab’s illustrative table shows a second catch: at the high end, price per unit of capacity tends to rise. A small machine offers 250 requests per second for $50 a month, while the largest offers 1500 for $700 — more capacity, but a worse deal per . And because everything still runs on one box, that box is a : if it stops, the service stops.
Scaling out
Horizontal scaling, or “”, means running more machines instead of one bigger one. A sits in front and spreads incoming requests across them. If one machine handles 250 requests per second, eight machines handle about 2000. That is close to linear: double the machines and you roughly double the capacity, and there is no single largest machine to hit. You can also take one machine away and the others keep serving.
The price is complexity. You now have many processes to deploy, monitor and keep consistent, and the load balancer is a new piece to manage. In the lab, each small costs an illustrative $50 a month. At 900 requests per second, four small servers give 1000 req/s of capacity for $200 — cheaper than the largest single machine in the table, which costs $700. Straight arithmetic like this is how you compare the two options before building either one.

The state problem
More machines only help if any machine can answer any . That breaks the moment a keeps information about a user in its own memory. A common example is a login : you sign in, the server writes “this user is logged in” into its memory, and it gives your browser a session id. Your next request carries that id — but a does not necessarily send it back to the same machine.
With it cycles through the servers, so the server holding your session sees your next request only about one time in N, where N is the number of servers. With three servers that is roughly one request in three. The other two land on a server that has never met you, which treats you as a stranger and asks you to log in again. Scaling out did not fix the problem; it spread it across more machines. The more servers you add, the smaller the share of requests that work.
Making servers stateless
The fix is to make the servers . A stateless keeps no per-user data between requests in its own memory. Each arrives with everything needed to handle it, such as a id, and the server looks up the user’s state in a place every server can reach: a database or a shared such as Redis. Now any server can answer any request.
In the lab, three servers holding sessions in memory find about one request in three. Move that session to a shared store and every request finds it. The store becomes a shared dependency, so it needs to be reliable and fast enough for all the servers, but the application servers themselves become interchangeable. You can add or remove them freely, and the no longer has to remember where anyone’s data lives. That interchangeability is what makes work in practice.