Scalability versus elasticity
Scalability and elasticity are different
Scalability is the ability of a system to support a different workload by changing its capacity. Elasticity is the ability to provision and release capacity as demand changes. A bookstore that can grow from two servers to six is scalable; a system that adds capacity during a sale and releases it afterwards demonstrates elasticity.
The two concepts are related but not interchangeable. A scalable system may stay at its largest size until an operator manually changes it. Elasticity can be manual or automated, but a slow annual capacity purchase is not the rapid elasticity of the cloud model.
Scale up or scale out
Vertical scaling (scaling up) gives an existing server more resources, such as memory or processing power. Scaling down reduces those resources. Horizontal scaling (scaling out) adds servers or other service instances; scaling in removes them.
Imagine a bookstore application with a single server that can handle 40 requests per minute under fixed test conditions. A larger server might handle more, but doubling its memory does not guarantee double throughput. Adding a second identical server could increase total capacity if requests are distributed effectively. Application design, database limits and coordination overhead determine the actual result.
A resize may require a restart; adding a server may require setup and healthy traffic distribution. Removing a server must not discard unfinished requests or irreplaceable data.
Worked example: match capacity to demand
Use three equal one-hour periods. Each server can safely handle 40 requests per minute in this fictional model. Demand is 60, 130 and 20 requests per minute. Assume identical servers, perfectly balanced requests, immediate capacity changes and a minimum of one server.
Period Demand (req/min) Required serversMorning 60 2Sale 130 4Evening 20 1Round demand divided by 40 upward to a whole server, then enforce the minimum. Three servers at the sale handle only 120 requests per minute, so four are needed. The evening still has one server even though its capacity exceeds demand.
A fixed allocation sized for the peak uses 4 + 4 + 4 = 12 server-hours. An ideal elastic allocation uses 2 + 4 + 1 = 7 server-hours. The model saves five server-hours, not necessarily five hours of money: rate plans, storage and other expenses may differ.
Why real scaling takes time
An automated scaling system observes a signal (for example, sustained request rate), compares it with a configured rule, and requests a capacity change. New instances must become ready before they can handle requests. A later decrease can release excess capacity after the workload falls.
Observe demand -> Decide -> Request capacity -> Wait for readiness ^ | +---------- Measure actual behavior <--------+This is a conceptual feedback loop. No specific cloud API is shown. If demand changes suddenly, the measurement and startup delays can leave the service briefly overloaded. Scaling too quickly in both directions may cause repeated unnecessary changes. Minimum and maximum capacity, spare capacity and stabilization periods help balance responsiveness and cost. Maximum capacity is not a guaranteed spending cap.
When adding servers does not solve the problem
Suppose each application server can accept 40 requests per minute, but the database can complete only 90 requests per minute. Four application servers could accept 160 requests per minute in isolation; the full application cannot complete that many if each request needs a database operation. A bottleneck is the component that constrains overall throughput.
Measure end-to-end response and error rates, not just server count. Scaling the wrong component can increase spending while leaving the bottleneck unchanged. A service with user sessions or local data may also need changes before additional instances can handle requests correctly.
Practice and recap
Use the same 40-request/minute model for demand of 0, 40, 41 and 160 requests/minute across four one-hour periods. Predict the minimum allocation, compare it with a constant four-server allocation, and explain the difference between the ideal result and a real service.
The minimum allocations are 1, 1, 2 and 4 servers: eight server-hours instead of sixteen. Zero demand still uses one server because of the stated minimum. A system configured to allow zero instances would need a different model and could incur startup delays on the next request.
Scalability concerns capacity; elasticity concerns matching capacity to demand. The next chapter uses these foundations to compare what customers manage in IaaS, PaaS and SaaS.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Scalability versus elasticity — knowledge check
Choose the best answer for each fictional cloud scenario.
A service grows from two servers to six but remains at six after traffic falls. What is demonstrated?
Increasing memory on an existing server is which change?
With 40 requests/minute per server and ideal distribution, how many servers are needed for 81 requests/minute?
Demand requires 1, 3 and 2 servers across three one-hour periods. How many server-hours does ideal matching use?
Application servers can handle 160 requests/minute together, but their required database can handle only 90. What should you investigate?