Four principles underlie every cloud. They explain how a provider can serve millions of users on shared hardware, and still give each of them a fast and flexible service.
Virtualization
Virtualization creates a virtual version of a computer resource, such as a server, storage or network, on top of the physical one. A software layer called a hypervisor divides one physical machine into several virtual machines (VMs), each with its own operating system, which are isolated from each other. It makes better use of hardware, since many VMs share one server, and it lets VMs be created, copied and moved quickly. It is the base of the cloud.
Definition: Virtualization. The creation of virtual versions of computing resources, such as servers, storage and networks, on shared physical hardware, so that one machine can act as many.
Resource Pooling
In resource pooling, the provider joins its processors, memory, storage and bandwidth into a shared pool that serves many customers by a multi-tenant model. Resources are assigned to a customer when needed and returned to the pool when released. The customer usually does not know the exact physical location of the resource. Pooling raises utilisation and lowers cost.
Elasticity
Elasticity is the ability to grow and shrink resources automatically as the demand changes, so that capacity matches the load closely. A shop that has a sale can add servers for the day, and then release them. Elasticity gives cost savings, since the user does not pay for idle machines, and good service, since peaks are met. It is done by auto-scaling rules, which add or remove instances based on measures such as CPU use.
Scalability
Scalability is the ability of a system to handle a growing load by adding resources. Vertical scaling, or scaling up, adds power to one machine, such as more memory or CPU, and has a limit. Horizontal scaling, or scaling out, adds more machines and shares the load among them, which can grow much further and is the usual cloud method. Elasticity is the automatic and quick form of scaling, in both directions, while scalability is the general ability to grow.
Table 1.4: The four principles
| Principle | Meaning | Benefit |
|---|---|---|
| Virtualization | Many virtual machines on one server | Better hardware use |
| Resource pooling | Shared pool for many tenants | Lower cost |
| Elasticity | Automatic grow and shrink | Pay only for need |
| Scalability | Grow to meet more load | Handle growth |
Example 1.4: Auto-scaling decision
Problem: A web site runs 4 servers. A rule adds 2 servers when average CPU use is above 70 percent, and removes 1 when it is below 30 percent. The CPU use is 85 percent at noon and 20 percent at midnight. Find the servers at each time (one step each).
Solution:
- At noon, 85 is above 70, so add 2: 4 + 2 = 6 servers.
- At midnight, 20 is below 30, so remove 1: 6 - 1 = 5 servers.
Result: 6 servers at noon and 5 at midnight, after one step each.
servers = 4
for cpu in (85, 20):
if cpu > 70:
servers += 2
elif cpu < 30:
servers -= 1
print(cpu, servers)
Output
85 6
20 5
Common mistakes
- Confusing elasticity with scalability. Elasticity is automatic and works both ways.
- Thinking that scaling up is always enough. One machine has a limit.
- Ignoring multi-tenancy and its need for isolation between customers.
Key takeaways
- Virtualization lets one server act as many virtual machines.
- Resource pooling shares resources among many tenants.
- Elasticity grows and shrinks resources automatically.
- Horizontal scaling adds machines, vertical scaling adds power to one machine.
Practice questions
- What is virtualization?
- Distinguish elasticity and scalability.
- Distinguish vertical and horizontal scaling.
Answers to the practice questions
- Creating virtual versions of resources on shared hardware so that one machine acts as many.
- Elasticity is automatic growth and shrinking with demand, while scalability is the general ability to handle growth.
- Vertical scaling adds power to one machine, horizontal scaling adds more machines.
Sources
- Official BCA syllabus Cloud Computing, course code 25BCA405DS03, Unit I
