Growing a Service from One Server
Grow the design when evidence identifies the next limit
Follow the responsibility
We will grow a small online shop from one application and database on a server. The target is correct orders with acceptable response time, not a predetermined diagram for a particular user count.
At each stage, measure the constrained resource and change only the relevant part. A million registered users can generate less work than a small group performing expensive operations; request patterns matter more than the headline number.
What you’ll learn
- Evolve a baseline from measured bottlenecks.
- Keep session, data and recovery promises across scaling changes.
- Compare regional placement with coordination cost.
Begin with a system you can operate
Start with DNS, HTTPS, application code, an authoritative database, access checks and tested backup restoration. The application and database can initially share a host if the requirements and failure budget permit. That creates a shared failure boundary which must be acknowledged.
Separating database and application hosts can isolate resources and deployment, but adds a network and another operating surface. Measure connection latency, database CPU, memory and storage work before claiming the separation increases useful throughput.
Add the component that addresses the evidence
If large public assets dominate transfer, evaluate object storage and a CDN. If repeated eligible reads dominate database work, add a cache with a freshness and failure policy. If application CPU is the constraint, add instances behind a load balancer and move required shared session state out of local memory.
Use read replicas for reads whose guarantee permits them. Use a queue for work that can finish later under a clear acceptance contract. If the writer or a hot key is still constrained, application autoscaling alone cannot remove that limit. Query changes and schema changes may precede sharding.
Choose the next change from the observed limit
Try the design choices
Compare the visible consequences. With JavaScript enabled, choose an option in each scenario to assemble your decision record.
This is an exploratory design exercise. It does not run infrastructure, measure capacity or replace the lesson’s quiz.
Each option should solve the measured problem without silently changing what success means.
Place data deliberately before expanding geographically
A region is a geographic deployment area; availability zones provide failure boundaries within a region under a provider’s model. Serving in several regions can reduce some distance and survive some regional failures, but brings data transfer, replication and operational cost.
Assign an authoritative write location or a product-supported multi-writer contract. State how concurrent changes and partitions are handled. Keep data-residency requirements explicit: backups, logs and analytics can cross boundaries too. Geographic traffic routing does not supply a data-consistency policy.
A failover region needs sufficient capacity, credentials, data, dependencies and tested procedures. Prevent conflicting writers, evaluate replica lag and define what happens when the recovery target cannot be met. Use the recovery lesson for the restoration plan.
A growth stage is an experiment, not a universal architecture
After each change, repeat representative workload and failure tests. Compare useful completions, tail latency, error rate, recovery and total cost. Keep the simpler alternative in the decision record; remove components that no longer justify their burden.
The progressive structure was informed by ByteByteGo’s scaling chapter. This course uses original scenarios and does not claim that any named user count requires a specific architecture. Refer to the individual component lessons for their real implementation contracts.
Check your reasoning
Check your reasoning
Bring the decisions together
Keep a correct baseline, change from evidence and validate the new boundary. Plan regional data and recovery before advertising regional availability.
Reaching the recap and completing the quizzes are separate milestones.