Complete Unit 2
Complete Unit 2
Because of the costs to buy and maintain mainframe computers, it was not
practical for an organization to buy and maintain one for every employee.
Nor did the typical user need the large (at the time) storage capacity and
processing power that a mainframe provided.
Providing shared access to a single resource was the solution that made
economical sense for this sophisticated piece of technology.
The newly offered virtualized private network connections had the same
service quality as their dedicated services at a reduced cost.
Cluster Computing
The trend toward cloud computing started in the late 1980s with the concept
of grid computing when, for the first time, a large number of systems were
applied to a single problem, usually scientific in nature and requiring
exceptionally high levels of parallel computation.
117
Types of Clients
Clients are the devices that the end users interact with to manage their
information on the cloud. Clients generally fall into three categories:
• Thin: Clients are computers that do not have internal hard drives, but rather
let the server do all the work, but then display the information.
• Thick: This type of client is a regular computer, using a web browser like
Firefox or Internet Explorer to connect to the cloud.
Cloud computing is the server accessed through the internet. The servers are owned
by big companies like Google that run applications and many start-ups that provide
data storage.
A single server in cloud is basically a virtual server, not very different from a
traditional server. However, the power of cloud comes from a server farm (many
virtual servers interconnected). Traditionally, if you need to add a new server, it will
take at least a few days. In cloud, it takes a few seconds!
122
Cloud V/S Grid Computing
Cloud Computing is for Service Oriented where as Grid Computing is for
Application Oriented. Grid computing is used to build Virtual supercomputer
using a middlerware to achieve a common task that can be shared among
several resources. A Virtual supercomputer using middleware
124
3. Service Model:
1. Cloud Computing: Cloud computing offers various service models,
including Infrastructure as a Service (IaaS), Platform as a Service
(PaaS), and Software as a Service (SaaS). Users can choose the level of
abstraction they need.
2. Grid Computing: Grid computing is more focused on sharing
computing resources among different organizations. It may involve
lower-level infrastructure services and is often tailored for specific,
resource-intensive applications.
125
Figure : Grid Computing
The components of a cluster are usually connected to each other through fast local
area networks ("LAN"), with each node (computer used as a server) running its own
instance of an operating system.
In most circumstances, all of the nodes use the same hardware and the same
operating system, although in some setups an be geographically distributed.
The cloud provider will validate, through the BSS, your request and if the validation is
okay (credit card, contract), it will provision the request through the OSS.
To be able to provide these services you will need Operational Support Services (OSS),
which will be in charge of deploying the requested service, and Business Support
Services (BSS), mainly used to validate the request and create the invoice for the
requested services.
A cloud computing environment will also need to provide interfaces and tools for the
service creators and users. designs, implements and maintains run-time and
management artifacts specific to a cloud service.
17 February 2024 132
NIST Cloud Computing Reference Architecture
133
• Consumer: The entity that uses cloud services. Consumers can be
individuals, organizations, or systems that access and use cloud
resources.
134
NIST Characteristics of Cloud
On-demand self-service
Location independence
Measured service
Improved performance
Device independence
Enabling techniques
Hardware virtualization
Web service
Utility
Computing
SOA + SLA Central Ideas
Utility
Computing
SOA + SLA Central Ideas
Perspective from user :
Users do not care about how the works are done
Instead, they only concern about what they can get
Users do not care about what the provider actually did.
Instead, they only concern about their quality of service
Functionalities of service :
A service should be well-defined
A service should be self-contained
A service should not depend on the context or state of other services.
Utility
Definition :
It is a standardized way for different software applications to communicate
with each other over the web.
Web services enable the exchange of data between different systems,
regardless of the programming languages or platforms they are built on.
Web service providers offer APIs that enable developers to exploit
functionality over the Internet, rather than delivering full-blown applications
146
4. Scalability:
4. Elasticity: The ability of a cloud service to dynamically scale
resources up or down based on demand. This ensures that
performance remains consistent even during periods of high usage.
5. Network Performance:
1. Bandwidth: Adequate network bandwidth is essential to support data
transfer between cloud services and users. QoS measures may include
guarantees on minimum bandwidth or prioritization of certain types of
traffic.
6. Security:
1. Data Security: QoS considerations include the implementation of
security measures to protect data integrity, confidentiality, and
availability.
2. Compliance: Ensuring that the cloud service adheres to regulatory and
compliance standards relevant to the user's industry.
147
7. Resource Management:
1. Resource Allocation: Fair and efficient allocation of computing
resources among users and applications. QoS mechanisms may involve
prioritizing critical applications or users.
8. Monitoring and Reporting:
1. Performance Monitoring: Continuous monitoring of system
performance and user experience to identify and address potential issues.
2. Reporting: Providing users with reports on service performance,
downtimes, and other relevant metrics.
9. Service Level Agreements (SLAs):
1. SLA Guarantees: Cloud providers often define SLAs that specify the
guaranteed levels of performance, availability, and other QoS parameters.
Users rely on SLAs to understand the expected service quality.
10. User Experience:
1. User Satisfaction: QoS ultimately aims to ensure a positive user
experience by meeting or exceeding user expectations for system
performance and reliability.
148
Utility
Computing
SOA + SLA
Service Level Agreement
Definition
A service-level agreement (SLA) is a contract between a network
service provider and a customer that specifies, usually in measurable
terms (QoS), what services the network service provider will furnish.
System throughput
Response time
What is elasticity?
The ability to apply a quantifiable methodology that allows for the basis
of an adaptive introspection within a real-time infrastructure.
Resources
Capacity
Demand
Resources
Capacity
1 2 3
Demand
1 2 3
Multi-tenant Design
What is multi-tenant design ?
Multi-tenant refers to a principle in software architecture where a single
instance of the software runs on a server, serving multiple client
organizations.
With a multi-tenant architecture, a software application is designed to
virtually partition its data and configuration thus each client organization
works with a customized virtual application instance.
Preparing
Local mirror systems
Surge protector
Workflow Control
Describe the flow of installation and configuration of
resources
Workflow processing daemon delivers speedy and efficient
construction and management of cloud resources
PaaS - Summary
PaaS is the development platform that abstract the infrastructure,
OS, and middleware to drive developer productivity.
Basic characteristics :
Heterogeneous or homogeneous infrastructure
Customized policies
Dedicated resources
In-house infrastructure
End-to-end control on-premise or off-premise
Public vs. Private
Comparison :
209
Virtualization
A simple definition of the virtualization is the formation of virtual computer
inside real computer. It is a abstraction layer above the hardware laye.
The idea of virtualization is not new. It was introduced by IBM in 1960 when
mainframe computers were in use. Main frame computers were underutilized
most of the time, hence to amplify the resource utilization of these main frame
computers virtualization technology was invented which allows to run many
OS simultaneously.
But over the past few decades with the invention of new technology like
utility computing and cloud computing once again virtualization became so
popular.
17 February 2024 210
It allows to run several OS concurrently on a single PM. In other words, it
divides the physical hardware into the multiple segments and each segment
can be operated independently.
Each one of these virtual machines or operating systems you have will be able
to run its own programs, as it will appear that the system has the host hardware's
processor, memory and resources. In reality, however, it is actually the
hypervisor that is allocating those resources to the virtual machines.
In effect, a hypervisor allows you to have several virtual machines all working
optimally on a single piece of computer hardware.
Denali
Hardware
etc.
Bare metal hypervisors are faster and more efficient as they do not need to go
through the operating system and other layers that usually make hosted
hypervisors slower. Type I hypervisors are also more secure than type II
hypervisors.
Hosted hypervisors, on the other hand, are much easier to set up than bare
metal hypervisors because you have an OS to work with. These are also
compatible with a broad range of hardware.
A hypervisor is a natural target for hackers because its designed control all the
resources of the hardware while managing all the virtual machines residing on
it. The bad news is that a hypervisor is vulnerable to a lot of malicious code,
especially those coming from an unmanaged virtual machine.
Advantage:
• Has higher performance and good application isolation
Shortcoming & limitation:
• Very expensive to implement (complexity)
Advantage:
• Has minimal starup/shutdown cost, low resource requirement, and high
scalability;
Shortcoming & limitation:
• All VMs at the operating system level must have the same kind of guest
OS
• Poor application flexibility and isolation.
224
This approach usually provides a high level of isolation and security as all
communication between the guest and host is through the hypervisor.
Containers
Containers are the products of operating system virtualization. They
provide a lightweight virtual environment that groups and isolates a set
of processes and resources such as memory, CPU, disk, etc., from the host
and any other containers.
The isolation guarantees that any processes inside the container cannot see
any processes or resources outside the container.
225
Containers can be OS containers and application containers.
OS containers are virtual environments that share the kernel of the host
operating system but provide user space isolation.
Container technologies like LXC, OpenVZ, Linux VServer, BSD Jails and
Solaris zones are all suitable for creating OS containers.
226
227
Virtualization for Linux and Windows NT
Platforms
All VMs in the same OS container must have the same or similar
guest OS, which restrict application flexibility of different VMs on
the same physical machine.
Advantage:
• It has very low implementation effort
Advantage:
• has the best application isolation
Cloud is prone to faults and they can be of different types. Various fault
tolerance techniques can be used at either task level or workflow level to
resolve the faults
i. Check pointing/Restart-
• The failed task is restarted from the recent checkpoint rather than from
the beginning. It is an efficient technique for large applications.
ii. Replication:
• In order to make the execution succeed, various replicas of task are run
on different resources until the whole replicated task is not crashed.
HAProxy, Haddop and AmazonEc2 are used for implementing
replication.
iii.Retry:
• This task level technique is simplest among all. The user resubmits the task
on the same cloud resource.
• The failed task is submitted again either to the same machine on which it
was operating or to some other machine.
Privileged instructions are all used to access the value or state of shared
resources including shutdown, set the timer, set the program counter, change
the value of the relocation register and instructions associated with I/O
Privileged and sensitive calls are set to automatically trap to the hypervisor
and handled by hardware, removing the need for either binary translation or
para-virtualization.
• For processor virtualization, Intel offers the VT-x or VT-i technique. VT-x adds a privileged mode
(VMX Root Mode) and some instructions to processors. This enhancement traps all sensitive
instructions in the VMM automatically.
• For memory virtualization, Intel offers the EPT, which translates the virtual address to the machine’s
physical addresses to improve performance.
• For I/O virtualization, Intel implements VT-d and VT-c to support.
• Privileged instructions,
• Privileged instructions execute in a privileged mode and will
be trapped if executed outside this mode.
• Behavior-sensitive instructions.
• Behavior-sensitive instructions have different behaviors
depending on the configuration of resources, including the
load and store operations over the virtual memory
*All the privileged and sensitive instructions are trapped in the hypervisor automatically. This technique removes
the difficulty of implementing binary translation of full virtualization. It also lets the operating system run in VMs
without modification.
Memory Virtualization
In a traditional Operating system maintains mappings of virtual memory to
machine memory using page tables, which is a one-stage mapping from
virtual memory to machine memory.
Figure 3.16 Four VCPUs are exposed to the software, only three cores are actually
present. VCPUs V0, V1, and V3 have been transparently migrated, while VCPU V2
has been transparently suspended. (Courtesy of Wells, et al., “Dynamic
Heterogeneity and the Need for Multicore Virtualization”, ACM SIGOPS Operating
Systems Review, ACM Press, 2009 [68] )
running with different OSs can be deployed on the same physical node.
A VM runs with a guest OS, which is often different from the host OS, that manages the resources
in the physical machine, where the VM is implemented.
The purpose of using VMs is to consolidate multiple functionalities on the same server. This will
greatly enhance the server utilization and application flexibility.
VMs can be colonized (replicated) in multiple servers for the purpose of promoting distributed
parallelism, fault tolerance, and disaster recovery.
The size (number of nodes) of a virtual cluster can grow or shrink dynamically, similarly to the
way an overlay network varies in size in a P2P network.
The failure of any physical nodes may disable some VMs installed on the failing nodes. But the
failure of VMs will not pull down the host system.
Copyright © 2012, Elsevier Inc. All rights reserved. 1 - 270
Virtual Clusters vs. Physical Clusters
Hotspot mitigation
Resource Leakages
Load Balancing
Security
Server Consolidation
In cloud computing many PM having low-resource-usage VMs.
VMs on lightly loaded hosts can be “Packed” onto fewer machines to meet
resource requirements.
The freed-up PMs can either be switched off (to save power) or represent
higher-resource availability bins for new VMs.
Hotspot Mitigation
Changes in workload conditions of VMs can lead to “hot spots” —not
enough resources provisioned to meet demand —or “cold spots” —
provisioned resources are not utilized efficiently
When local resources are not sufficient to remove the hot spot, VMs can be
migrated to another host to make the resources required available to
mitigate the hot spot
Load Balancing
It is a process that distribute the dynamic load evenly across all the node in
the cloud, simultaneously removing a condition in which some of the nodes
are over loaded while some others are under loaded.
There is a nonlinear relationship between the number of processes used and power
consumption.
180
170
160
150
140
Watts
130
120
110
100
90
0 1 2 3 4 5 6 7 8
Number of Processing Cores
Resource Leakage
Resource leakage is the one of the major issue in cloud computing. It is
define as a amount of resources that can’t be allocated to any VM.
1) To balance the load on the physical machine. Some VM are migrated from
overloaded PM to underloaded PM.
2) In the case of server consolidation, all the VM inside the underloaded PM
are migrated to the other host, to increase the resource utilization and
reduce the energy consumption.
3) To mitigate the hot spot.
(2) Selecting the candidate VM
Which VM is selected for the migration depends on the situation, i.e., load
balancing, server consolidation, and hot spot mitigation.
In the case of server consolidation, all the VMs available on the host have to be
selected for the migration.
VM selection in the case of hot spot and load balancing is a complicated task,
because if light weight VM is chosen than, number of VM has to be migrated
and if we choose weighted VM then it will increase the total migration time.
Numbers of approaches have been used for selecting the VM.
T. Wood et al. used a volume-to-size ratio (VSR) to select the VM. When
the hot spot is detected one or more VM is moved from this PM to another
PM. VM which is having highest VSR is selected as a candidate VM, where
volume is corresponding to the load of the VM and size is the memory
footprint of the VM.
282
A. Beloglazov et al., proposed a method for load balancing, they select the
VM whose size is greater than or equal to the (host utilization-upper
threshold). If K is the selected VM, then
Size of VM >= host utilization −− upper threshold
283
(3) Choosing the target physical machine
Placing a VM on the appropriate host play a vital role in VM migration
because resource utilization can be increased and power consumed by the
data centers can be reduced by the efficient VM placement algorithm.
Y. Fang et al. give equal weight to all the resources. They simply calculate
the load on the host by adding the load of the VM available in the PM.
284
M.Mishra et al. give different weights to each resource by using the
weighting coefficient (Wi). The following equation is used to calculate the
load on the kth host
M.Mishra et al., proposed a vector method for placing a VM. In the VectorDot
method they are using dot product between the source utilization of physical
machine and resource requirement of virtual machine to choose the target physical
machine.
For the proper utilization of the resources it is necessary that the virtual machine which
required more CPU and less memory should be placed on the physical machine which has
low CPU and more memory utilization
285
4.Methods for transferring the VM
In order to resume running the migrated VM on the new host,
the states of VM’s physical memory, network connection,
file system and other resources should be migrated. The
most complicated issue is migrating physical memory,
because the content of memory is dynamic and it is a main
factor that affects the migration performance.
Down time and Total migration time are two issues which is
considered during the migration
287
1) Suspended and Copy
In this approach stop the virtual machine on the source PM, copy all
memory pages and CPU states to the destination PM, and then resume
the VM on the destination PM.
Problem
Minimizes total migration time, the downtime is proportional to the
“size” of the VMs and network resources available for state transfer
288
2) Pre-Copy approach (Live migration)
In the first round all memory pages and CPU states are transferred to the
destination physical machine. Since virtual machine still run on the source
virtual machine, so during the transmission some memory pages are
modified.
These modified pages are called dirty page. Set of dirty pages is called
writable working set (WWS). Set of dirty pages in the previous round are
transferred into the next round.
This process is repeated until the size of WWS is reduced to the predefine
maximum allowable window size say 1MB or the predefined maximum
number of iteration, then stop the virtual machine on the source PM and
transfer all memory pages and CPU states to the destination physical
machine, then start the virtual machine on the destination PM.
290
Problem
Minimum download time and high total migration time.
291
Effect on data transmission rate of a VM
migrated from one failing web server to
another.
292
Memory Migration
The Internet Suspend-Resume (ISR) technique exploits temporal locality as
memory states.
Temporal locality refers to the fact that the memory states differ only by the
amount of work done since a VM was last suspended before being initiated
for migration.
A copy of this tree exists in both the suspended and resumed VM instances.
The ISR technique may increase the down time because single page may be
transferred multiple times.
293
Implementation-writable working sets
Significant overhead: transferring memory pages that
are subsequently modified.
294
File Migration
Provide each VM with its own virtual disk which the file system is
mapped to and transport the contents of this virtual disk along with
the other states of the VM.
Migration of the contents of an entire disk over a network is not a
viable solution.
A global file system across all machines where a VM could be
located.
VMM only accesses its local file system. The relevant VM files are
explicitly copied into the local file system for a resume operation and
taken out of the local file system for a suspend operation.
In smart copying, the VMM exploits spatial locality
295
Network Migration
The VMM maintains a mapping of the virtual IP and MAC addresses
to their corresponding VMs.
296
297
3) Post-Copy
The main benefit of this approach is that each memory page is transferred
at most once, thus avoiding the duplicate transmission overhead of pre-
copy
Pre-copy approach is more reliable then the post copy because in the pre
copy approach source node keep the updated copy of all memory pages and
CPU states, so in the case of destination failure virtual machine can be
recovered.
This approach is useful only if the dirty page transfer rate is larger than the
dirty page growth rate.
Problem
Minimum download time and high total migration time.
299
300
Live Migration of VMs between Two
Xen-Enabled Hosts
301
Implementation-managed & self migration
Managed migration
Managed migration, a third-party service provider or a specialized
team within the organization is responsible for overseeing the entire
migration process.
This approach is often preferred when organizations lack the internal
expertise or resources to manage the migration themselves.
Self migration
Self-migration involves organizations taking full responsibility for
planning and executing the migration process internally, using their
own resources and expertise.
This approach offers greater control and flexibility over the
migration timeline, process, and outcomes.
Organizations may choose self-migration when they have sufficient
in-house expertise, resources, and infrastructure to handle the
migration effectively. 302
303
What is cloud load balancing?
Cloud load balancing is the practice of evenly distributing traffic,
workloads, and client requests across multiple servers running in a cloud
environment.
1. Static algorithms
1) Round Robin: This algorithm uses round-robin method to assign jobs. First, it
randomly selects the first node and assigns tasks to other nodes in a round-robin
manner. This is one of the easiest methods of load balancing.
2) Weighted Round Robin assigns servers with greater capacity a higher “weight,”
enabling them to receive more incoming application traffic.
3) IP Hash performs a hash, or a mathematical computation, on the client IP address,
converting it to a number and mapping it to individual servers.
4) Min-Min: Each task determines its minimum completion time over all the
machines and assigns the task to the machine that gives the minimum completion
time.
5) Max-Min: The goal of this algorithm is to maximize resource utilization while
minimizing the potential for overload or underutilization of individual
resources.
304
2. Dynamic algorithms
1) Least Connections distributes traffic to the servers with the fewest active
connections.
2) Least Response Time directs traffic to the servers with the lowest average
response time and fewest connections.
305
Sender-Initiated Load Balancing:
• In sender-initiated load balancing, the sender of the request or data
determines how to distribute the workload across available resources.
• This approach is typically implemented by the client or sender
application, which decides how to distribute requests or data based on
various factors such as server availability, latency, or server load.
306
Types of load balancers
Network load balancers
Network load balancers optimize traffic and reduce latency across local
and wide area networks. They use network information such as IP
addresses and destination ports, along with TCP and UDP protocols, to
route network traffic and provide enough throughput to satisfy user
demand.
307
Virtual load balancers
With the rise of virtualization and VMware technology, virtual load
balancers are now being used to optimize traffic across servers, virtual
machines and containers. Open-source container orchestration tools like
Kubernetes offer virtual load balancing capabilities to route requests
between nodes from containers in a cluster.
Global server load balancers
This type of load balancer routes traffic to servers across multiple
geographic locations to ensure application availability. User requests can
be assigned to the closest available server, or if there is a server failure,
to another location with an available server. This failover capability
makes global server load balancing a valuable component of disaster
recovery.
308
Physical versus Virtual Clusters
310
Virtual Cluster
311
VIOLIN Project at Purdue University
317
1) OpenStack Compute (Nova):- It is responsible for handling all
management activities which are required to support the life cycle of
instances in cloud. These activities include instance creation, resource
allocation, and policy management.
318
3) OpenStack Identity Service (Keystone): - Keystone is responsible for the user
authentication and role based access controls for all OpenStack components. Role
based access controls validate whether the authenticated user has a right to access
the requested services. It manage list of all users and the service which they can
access. Main aim of adding this component is to provide the central authentication
to the user for accessing OpenStack components.
4) Block Storage (Cinder): - Cloud user can change their storage requirement
according to their need through the dashboard. Cinder provides persistent block
storage to the running VM instances. In addition, Cinder volume can backup
through the snapshot.
319
5) Object Storage (Swift): - It is equivalent of Amazon Web Services - Simple
Storage Service (S3). It is a distributed storage system and mainly used for
storing static data like VM snapshot, photo storage, archives, VM images and
backups. Data stored in Swift automatically replicates across the multiple node
to ensure redundancy and fault tolerance. In case of server failure, OpenStack
replicate its content to the other server.
5) OpenStack Image Service (Glance): - Images of VMs and its snapshots are
stored in Glance. These images worked as a template for creating new VMs. In
Glance, the cloud provider stores a set of VM images with different configurations
and uses these images to quickly launch the VM instance. It allows the users to
copy and save the snapshot of running VM that can be used to recreate the VM.
320
7) Dashboard (Horizon): - It provides the web based graphical user interface which
is used for management of VM. In OpenStack, all hypervisor turn into the single
pool of resources which is managed by the single point named dashboard. Both
cloud provider and user use dashboard to perform their task like VM creation,
network configuration, volume management etc.
321
OpenStack conceptual Architecture 322