liveBook · Manning

Horizontal scaling

As explained in Acing the Frontend Interview

Horizontal scaling increases capacity by adding or removing system instances or machines rather than enlarging a single instance.

Horizontal scaling, or scaling out, increases capacity by adding machines or application instances that share the load. Compared with vertical scaling, it offers greater elasticity and fault tolerance, but requires more orchestration around load balancing and state management. section 6.3

Use the following comparison when reasoning about architecture or answering interview follow-ups:

  • Choose vertical scaling for simpler monolithic systems, limited growth, or situations where refactoring is not feasible. section 6.3
  • Choose horizontal scaling for distributed, cloud-native systems where resilience, elasticity, and continued capacity are priorities. section 6.3
  • Pair multiple instances with load balancing so traffic can be distributed across available machines. section 6.3
  • Address distributed state management explicitly because adding instances makes coordination more complex. section 6.3
Table 6.4 Scaling strategies
Topic
Fundamentals
Applied skills
Advanced
Vertical vs. horizontal scaling
Understands that vertical scaling adds CPU/memory to a single node, while horizontal adds nodes.
Chooses horizontal scaling for stateless, cloud-native apps.
Designs for distributed state management and consistent performance under dynamic scaling.
Load balancing
Knows the role of load balancers (LB) in distributing traffic.
Implements NGINX, HAProxy, or cloud ELBs to balance traffic across instances.
Tunes load balancers for sticky sessions, weighted routing, failover, and cross-region balancing.
Autoscaling & elasticity
Understands that autoscaling adjusts resources based on load.
Configures autoscaling policies using metrics like CPU, memory, or queue depth.
Designs for elasticity across microservices with predictive scaling, cost optimization, and graceful scale-in/out mechanisms.

Compare vertical and horizontal scaling across fundamentals, applied choices, and advanced concerns such as distributed state, load-balancer tuning, and elasticity. section 6.3

Interview scenario

When asked to explain the difference between scaling strategies, define vertical scaling as enlarging one machine and horizontal scaling as adding machines. Then justify horizontal scaling for a stateless cloud-native application and explain how a load balancer distributes requests across instances. section 6.3

How Acing the Frontend Interview covers it

How deep it goes
Explains the definition, trade-offs, selection criteria, and load-balancer relationship, while deferring advanced state design and tuning.
Examples
Uses a one-server-to-three-server diagram, a scaling-strategies comparison table, and interview questions about scaling and load balancing.
What it assumes
Assumes basic system-architecture awareness and develops the distinction between vertical and horizontal resource scaling.
What you can do after
Evaluate scaling choices in interviews and explain how load balancing supports multiple application instances.
How it connects
Connects horizontal scaling to vertical scaling, load balancing, autoscaling, stateless architectures, fault tolerance, and cloud-native systems.

Also explained in

Compare how 19 books explain horizontal scaling →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the Frontend Interview. The section links point to the parts of the book it draws on.