liveBook · Manning

Scalability

As explained in Acing the Frontend Interview

Scalability is the capacity of a system to maintain acceptable operation as workload, users, or data volume increases.

Scalability is a system’s ability to handle increased demand by adjusting resources. In a frontend system-design interview, a working interface is not the whole answer: be ready to explain how it performs as traffic grows and how it interacts with backend services. section 6.3 section 1.1

Interview question: scale a growing application

Suppose traffic rises beyond what one server can handle. Adding CPU or memory to that server is vertical scaling: relatively simple to manage, but limited by the machine and vulnerable to a single point of failure. Adding instances is horizontal scaling: it offers elasticity and fault tolerance, but requires load balancing and attention to state management. A strong answer chooses between them using performance, reliability, and business constraints rather than assuming that more servers are always better. section 6.3

Follow-up questions often test how the choice works in practice:

  • How will traffic reach the added instances? Explain the load balancer’s role in distributing requests. section 6.3
  • When should capacity change? Discuss autoscaling policies based on load metrics, including CPU or request rate. section 6.3
  • Can repeated requests be served without repeatedly reaching the database? Caching across client, CDN, application, and database layers can reduce load and latency, but adds consistency, invalidation, and observability work. section 6.4
Listing 6.5 HPA manifest for multi-metric autoscaling in Kubernetes
apiVersion: autoscaling/v2 #A
kind: HorizontalPodAutoscaler #B
metadata:
  name: my-api-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: my-api
  minReplicas: 3 #C
  maxReplicas: 20 #D
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 70 #E
    - type: Pods
      pods:
        metric:
          name: http_requests_per_second
        target:
          type: AverageValue
          averageValue: 100 #F

The Kubernetes autoscaling manifest makes a scaling policy concrete: it bounds replicas from 3 to 20 and specifies CPU utilization and HTTP requests per second as metrics. section 6.3

In an interview, state the expected load, justify the scaling strategy, and name its operational costs. Connect frontend performance to backend capacity rather than treating the interface as an isolated system. section 6.3 section 1.1

How Acing the Frontend Interview covers it

How deep it goes
Defines scalability, compares scaling strategies and their trade-offs, then probes load balancing and autoscaling through interview questions.
Examples
Uses a scaling-choice interview question, a Kubernetes autoscaling manifest, and layered caching to make capacity decisions concrete.
What it assumes
Assumes web-development familiarity while introducing vertical and horizontal scaling at a fundamentals level.
What you can do after
Evaluate/understand it by justifying a scaling choice and explaining load distribution, capacity adjustment, and caching trade-offs.
How it connects
Connects vertical scaling, horizontal scaling, load balancing, autoscaling, caching, state management, and fault tolerance.

Also explained in

Compare how 37 books explain scalability →

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.