What is Autoscaling?

A mechanism that automatically increases or decreases the number of servers or containers according to load indicators (CPU utilization, request rate, queue length and so on). Adding machines is called scaling out and removing them scaling in. The Kubernetes HorizontalPodAutoscaler computes the required number as ⌈current number × current value ÷ target value⌉. New instances take time to start working, so sudden load increases are handled with a target that leaves headroom, and a waiting period before scaling in is common so that the number does not change too often.

Japanese name: オートスケーリング

Autoscaling appears in 2 practice questions across 2 topics, including System Architecture and Reliability, Cloud and Container Basics.

Field: Cloud and Container Basics

Try it: questions about Autoscaling

Which is generally a desirable design for a system that uses autoscaling to add and remove servers automatically according to the load?

  1. AStoring business data that only that server holds on each server's local disk
  2. BStoring users' session information in a shared data store instead of each server's memory, so that the result is the same whichever server processes a request
  3. CWhen reducing the number of servers, stopping a server immediately even if it has requests in progress
Show answer and explanation

Answer: B. Storing users' session information in a shared data store instead of each server's memory, so that the result is the same whichever server processes a request

With autoscaling, a design in which servers hold no state of their own (stateless) is desirable, so that it does not matter when servers are added or removed. If session information and business data are kept in a shared data store, any server can process a request in the same way, and no data is lost when servers are removed. When reducing the number of servers, new requests stop being distributed to a server and it is stopped only after its requests in progress have finished.

Autoscaling in the explanations

Questions that mention Autoscaling (2)

  1. Which is generally a desirable design for a system that uses autoscaling to add and remove servers automatically according to the load?
  2. In a Deployment whose Pod containers have the settings above, four Pods are running, each using 400m (0.4 cores) of CPU. The HorizontalPodAutoscaler's target CPU utilization is 60%, and the required number of Pods is computed as ⌈current number × current utilization ÷ target utilization⌉. Which of the following is the required number of Pods?

Books on Cloud and Container Basics Ad

As an Amazon Associate I earn from qualifying purchases.

Related terms

Pod Container Availability zone Blue-green deployment Canary release Container image Docker Immutable infrastructure Infrastructure as code (IaC) Kubernetes

Back to the glossary