StackGrab

Stage 4 · Recap

What stuck?

A few checks to make the ideas yours, then the next stop on the route.

What to remember

  • Scaling up is simple, but it ends at a ceiling and costs more per unit of capacity at the high end.
  • Scaling out adds machines behind a load balancer for near-linear capacity, at the cost of more moving parts.
  • Sessions kept in server memory break round-robin: with N servers only about 1/N of requests find the session.
  • Keep servers stateless and put shared state in a database or cache so any server can answer any request.

Quick check

0 of 6 answered

All 6 questions are here so you can see the climb from recall to challenge. Answer them, then check. 4 of 6 passes; you can retry with new questions. No penalty for guessing.

  1. Warm-up
    1.What is vertical scaling?
  2. Warm-up
    2.Which piece sits in front of scaled-out servers and spreads requests across them?
  3. Apply
    3.One small server handles 250 req/s. Roughly how many are needed to serve 900 req/s?
  4. Apply
    4.Sessions live in server memory and requests go round-robin across 5 servers. What share of a user’s requests find their session?
  5. Challenge
    5.Using the lab’s illustrative table: one large machine serves 1,500 req/s for $700/month, a small one 250 req/s for $50/month. At 900 req/s, which option is cheaper and by how much?
  6. Challenge
    6.You keep adding servers but sessions still live in each server’s own memory. What happens as the number of servers N grows?
10

Next lesson

Requirements & the design process

Continue the journey →