Cloud concept · Updated

Elasticity - Elasticity is the ability to increase and decrease computing resources to match changes in workload demand.

In short

Elasticity aligns available capacity with actual demand, adding resources during busy periods and releasing them when demand falls. In the cloud, automated provisioning and usage-based pricing can reduce idle capacity and avoid purchasing infrastructure for occasional peaks, while helping applications maintain performance.

Cloud Concepts Hub →

6 key aspects of Elasticity

Elasticity combines demand-aligned capacity changes, safe automation, and resource release to balance performance and cost within operational limits.

01
Capacity follows demand

Increase resources when workloads grow and release them when demand falls. Both expansion and contraction are central to elasticity.

02
Automated resource adjustment

Use demand-based policies or scheduled actions to adjust capacity without repeated manual intervention. Choose metrics that reflect workload pressure, such as requests per target or queue backlog per worker.

03
Reduced idle-capacity costs

Releasing unused resources can reduce usage-based charges and the need to provision permanently for peak demand. Savings depend on pricing, minimum capacity, and charges for resources that remain allocated.

04
Application readiness

Design components so new capacity can accept work and removed capacity can shut down safely. Externalized session state and graceful connection draining help prevent scaling events from disrupting users.

05
Bounded response time and capacity

Account for provisioning delays, warm-up periods, quotas, and downstream limits. Set minimum and maximum capacity deliberately rather than assuming resources appear instantly or without limits.

06
Separate from availability and agility

Elasticity matches resources to demand; high availability addresses continued operation through failures; agility concerns the speed of experimentation and delivery. A sound architecture may need all three, but none automatically guarantees the others.

Cloud services for Elasticity

For an elastic web application on AWS, Amazon CloudWatch supplies workload metrics, Amazon EC2 Auto Scaling adjusts instance capacity, and Elastic Load Balancing distributes requests across healthy targets. AWS Application Auto Scaling provides a similar policy-driven mechanism for supported resource dimensions, including container task counts and provisioned database throughput. AWS Lambda handles execution-capacity scaling for function-based workloads without a customer-managed server fleet. These mechanisms still require suitable application design, sensible limits, and monitoring: adding compute cannot remove every downstream bottleneck, and releasing compute does not eliminate all associated infrastructure charges.

Amazon EC2 Auto ScalingAmazon EC2 Auto Scaling

Adjusts the number of EC2 instances in an Auto Scaling group using scaling policies or scheduled actions. Minimum, desired, and maximum capacity settings define the operating range, while instance warm-up and lifecycle handling help manage transitions.

AWS LambdaAWS Lambda

Automatically scales function execution capacity in response to incoming work, subject to concurrency quotas, scaling limits, and event-source behavior. It illustrates elasticity without requiring engineers to manage a fleet of servers.

Amazon CloudWatchAmazon CloudWatch

Provides metrics and alarms that can inform or trigger scaling actions. Monitoring workload pressure, latency, and errors helps engineers determine whether capacity changes are meeting performance goals.

Elasticity exam questions

Real practice exam questions on Elasticity, with the correct answer and its explanation. Answer them with every option in the exam simulator.

CLF-C02

A retailer has configured automatic scaling for an Amazon EC2 Auto Scaling group. After a promotional event, a manager wants evidence that compute capacity increased as demand rose and decreased after demand fell. The group's instance-count metrics are enabled. Which approach best demonstrates this behavior without changing the scaling configuration?

Show answerCORRECT ANSWER

Use an Amazon CloudWatch dashboard to compare application request volume with the group's in-service instance count throughout the promotion and afterward.

CloudWatch can display demand metrics alongside Auto Scaling group instance-count metrics over time. This comparison provides evidence that capacity increased during high demand and was released when demand fell, demonstrating elasticity.

MLA-C02 (beta)

A company hosts three CPU-based NLP models on separate Amazon SageMaker AI real-time endpoints. The models use different serving containers, and their traffic peaks occur at different times. Monitoring shows substantial unused memory and CPU capacity across the endpoints.

The company wants to consolidate the models onto a shared pool of endpoint instances. Each model must remain independently addressable, and the number of running serving copies of each model must scale independently with its request volume. The underlying instance pool must also grow and shrink as the combined capacity requirement changes.

Which solution best meets these requirements?

Show answerCORRECT ANSWER

Create an inference component for each model on a shared endpoint, specifying its compute and memory requirements. Configure automatic scaling of each component's copy count and enable managed instance scaling for the endpoint.

Inference components allow independently addressable models and their containers to share endpoint instance resources. Resource requirements guide placement, each component's copy count can scale independently, and managed instance scaling adjusts the underlying instance pool to accommodate the components' capacity needs.

SAP-C03

A company runs a Linux container worker service on Amazon ECS with AWS Fargate. An existing, validated scaling policy adjusts the service between 6 and 60 tasks based on workload demand. Each task currently requests 2 vCPUs and 16 GiB of memory.

Metrics collected across a complete business cycle show that each task requires at most 0.7 vCPU and 6.2 GiB of memory. Representative load tests confirm that tasks configured with 1 vCPU and 8 GiB of memory maintain the required processing throughput.

The company requires six tasks to run on capacity that is not subject to Spot interruptions. Additional tasks process checkpointed work that can tolerate interruptions and can wait when discounted capacity is unavailable. The company wants to minimize compute charges without changing the scaling policy or managing servers.

Which solution best meets these requirements?

Show answerCORRECT ANSWER

Deploy a task definition with 1 vCPU and 8 GiB of memory. Configure the service capacity provider strategy with FARGATE base 6 and weight 0, and FARGATE_SPOT weight 1.

The tested task size reduces billed CPU and memory allocations while preserving throughput. The base assigns the first six tasks to FARGATE. After the base is satisfied, the weights direct all additional tasks to FARGATE_SPOT. This preserves the non-Spot baseline and uses discounted, interruptible capacity for work that can tolerate interruptions and capacity shortages.

Practice Elasticity in a full exam

Questions on Elasticity in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is Elasticity

2 min read

Elasticity means adjusting resource capacity as demand changes, in both directions. An elastic application can acquire additional capacity during a traffic spike and release that capacity afterward. The goal is not simply to make a system larger; it is to keep capacity appropriately aligned with the work being performed. Cloud platforms make this practical by providing resources through APIs instead of requiring engineers to purchase, install, and later retire physical equipment.

Consider an online store that normally needs two application servers but requires twelve during a sale. An elastic design adds servers as demand rises and removes the additional servers when traffic returns to normal. Without elasticity, the business might keep twelve servers running continuously or accept poor performance during the sale. Releasing unnecessary resources can reduce usage charges, although retained storage, minimum capacity, and other supporting infrastructure may still incur costs.

Elasticity and scalability are related but different. Scalability describes a system's ability to handle changing workload levels by changing capacity. Elasticity emphasizes matching capacity to fluctuating demand and relinquishing resources when they are no longer needed. Horizontal scaling adds or removes instances, containers, or workers; vertical scaling changes the resources assigned to an individual component. Both can support elasticity, but vertical changes may require restarts and have tighter size limits.

Automatic scaling is a common mechanism for implementing elasticity. Policies can respond to CPU utilization, request volume, or queue backlog, while scheduled actions can prepare capacity for known events. For example, background workers might scale out when queued jobs accumulate and scale in after processing catches up. On AWS, Amazon EC2 Auto Scaling provides elasticity by adjusting the number of EC2 instances according to configured policies and capacity limits. Provisioning a fixed set of cloud instances does not automatically make an application elastic.

Application design determines whether additional resources are useful. Stateless request handlers, shared session storage, distributed work queues, and graceful shutdown procedures make it easier to add and remove workers safely. A database bottleneck or an external API limit can prevent extra application servers from improving throughput. Scaling signals should therefore reflect the actual constraint rather than relying on CPU usage alone.

Elasticity is not instantaneous or unlimited. Resource quotas, available capacity, instance startup time, application initialization, and scaling-policy settings affect response speed. Minimum capacity can protect latency during sudden bursts, while maximum capacity limits spending and resource consumption. Scale-in must allow active requests or jobs to finish, and poorly tuned policies can repeatedly add and remove resources.

Elasticity is also distinct from high availability and agility. High availability keeps a workload accessible despite failures, typically through redundancy and fault isolation. Agility is the ability to experiment and deliver changes quickly. An elastic workload can still have a single point of failure, and a highly available workload can use fixed capacity. For exam questions, associate elasticity with matching resources to changing demand, high availability with continued operation, and agility with faster experimentation and delivery.

Learn Elasticity in lessons

21 short lessons on Elasticity in 8 certification courses.

and 15 more lessons

Open the lessons