Cloud Computing Notes-1
Cloud Computing Notes-1
SEWP ZG527
BITS Pilani
Motivation
Powerful
multi-core 1. Web Scale
processors Problems
General
Explosion of
domain
purpose 2. Web 2.0 and
graphic
applications Social
processors
Networking
Superior
Proliferation 3. Information
software
of devices
methodologies
Explosion
Virtualization 4. Mobile Web
Wider bandwidth leveraging the
for communication powerful
hardware
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Technology Advances
Cloud applications: data-intensive,
compute-intensive, storage-intensive
Bandwidth
WS
Services interface
64-bit
processor
http://blogs.technet.com/b/yungchou/archive/2011/03/03/chou-s-theories-of-cloud-computing-the-5-3-2-principle.aspx
• Shared pool of
configurable
computing
resources
• On-demand
network access
• Provisioned by
the Service
Provider
On demand self-
service
Broad network
access
Resource
pooling
Rapid elasticity
Measured
service
2. Private Cloud
The cloud infrastructure is operated
solely for an organization. It may be
managed by the organization or a
third party and may exist on
premise or off premise.
SalesForce CRM
LotusLive
Google
App
Engine
Hardware Hardware
Hardware Hardware
BITS Pilani
What does Virtualization do?
• Virtualization allows multiple operating system instances to run
concurrently on a single computer
• It is a means of separating hardware from a single operating
system.
• Each “guest” OS is managed by a Virtual Machine Monitor (VMM),
also known as a hypervisor.
• Because the virtualization system sits between the guest and the
hardware, it can control the guests’ use of CPU, memory, and
storage, even allowing a guest OS to migrate from one machine to
another.
• Instead of purchasing and maintaining an entire computer for one
application, each application can be given its own operating
system, and all those operating systems can reside on a single
piece of hardware.
• Virtualization allows an operator to control a guest operating
system’s use of CPU, memory, storage, and other resources, so
each guest receives only the resources that it needs. 6
BITS Pilani
Changes after Virtualization
Before Virtualization After Virtualization
• Single OS image per machine • Hardware-independence of
• Software and hardware tightly operating system and
coupled applications
• Running multiple applications on • Virtual machines can be
same machine often creates provisioned to any system
conflict
• Can manage OS and
• Underutilized resources
application as a single unit by
• Inflexible and costly encapsulating them into
infrastructure
virtual machines
BITS Pilani
Virtualization Architecture
• OS assumes complete control of the underlying
hardware.
• Virtualization architecture provides this illusion through a
hypervisor/VMM.
• Hypervisor/VMM is a software layer which:
• Allows multiple Guest OS (Virtual Machines) to run
simultaneously on a single physical host
• Provides hardware abstraction to the running Guest
OSs and efficiently multiplexes underlying hardware
resources
BITS Pilani
Hypervisor
BITS Pilani
Hypervisor Design Goals
• Isolation
• Security isolation
• Fault isolation
• Resource isolation
• Reliability
• Minimal code base
• Strictly layered design
• Not extensible
• Scalability
• Scale to large number of cores
• Large memory systems
5
BITS Pilani
How Hypervisor goals are achieved?
• Partitioning Kernel
▪ “Partition” is isolation boundary
▪ Few virtualization functions; relies on virtualization stack
• Very thin layer of software
▪ Microkernel
▪ Highly reliable
▪ Basis for smaller Trusted Computing Base (TCB)
• No device drivers
▪ Drivers run in a partition
• Well-defined interface
▪ Allow others to create support for their OSes as guests
BITS Pilani
Hypervisor
Monolithic versus Microkernelized
• Monolithic hypervisor • Microkernelized hypervisor
• Simpler than a modern ▪ Simple partitioning functionality
kernel, but still complex ▪ Increase reliability and minimize
lowest level of the TCB
• Contains its own drivers
▪ No third-party code
model
▪ Drivers run within guests
BITS Pilani
CPU Sharing
BITS Pilani
Memory Sharing
10
BITS Pilani
IO Sharing
11
BITS Pilani
Approaches for Virtualization
BITS Pilani
Full Virtualization
❑ Full virtualization
• In its basic form known as “full virtualization” the
hypervisor provides a fully emulated machine in which an
operating system can run. VMWare is a good example.
• The biggest advantage to this approach is its flexibility:
one could run a RISC-based OS as a guest on an Intel-
based host.
• While this is an obvious approach, there are significant
performance problems in trying to emulate a complete set
of hardware in software.
BITS Pilani
ParaVirtualization
❑ Paravirtualization
• “Paravirtualization,” found in the XenSource, open source Xen
product, attempts to reconcile these two approaches. Instead of
emulating hardware, paravirtualization uses slightly altered
versions of the operating system which allows access to the
hardware resources directly as managed by the hypervisor.
• This is known as hardware-assisted virtualization, and improves
performance significantly.
• In order to retain flexibility, the guest OS is not tied to its host OS.
Drastically different operating systems can be running in a
hypervisor at the same time, just as they can under full
virtualization.
• In this way, paravirtualization can be thought of as a low-
overhead full virtualization
5
BITS Pilani
SKI Virtualization
BITS Pilani
x86 Hardware Virtualization
• For Industry-standard x86 systems, the two approaches typically
used with software-based partitioning are
• hosted and
• hypervisor architectures
• A hosted approach provides partitioning services on top of a
standard operating system and supports the broadest range of
hardware configurations.
• In contrast, a hypervisor architecture is the layer of software
installed on a clean x86-based system (hence it is often referred to
as a “bare metal” approach). Since it has direct access to the
hardware resources, a hypervisor is more efficient than hosted
architectures, enabling greater scalability, robustness and
performance
BITS Pilani
x86 Hardware Virtualization
BITS Pilani
Advantages of Virtualization
11
BITS Pilani
Issues to be aware of
• Software licensing
One of the most significant virtualization-related issues to be aware of is software
licensing. Virtualization makes it easy to create new servers, but each VM requires its
own separate software license. Organizations using expensive licensed applications
could end up paying large amounts in license fees if they do not control their server
sprawl.
• IT training
IT staff used to dealing with physical systems will need a certain amount of training in
virtualization. Such training is essential to enable the staff to debug and troubleshoot
issues in the virtual environment, to secure and manage VMs, and to effectively plan
for capacity.
• Hardware investment
Server virtualization is most effective when powerful physical machines are used to
host several VMs. This means that organizations that have existing not-so-powerful
hardware might still need to make upfront investments in acquiring new physical
servers to harvest the benefits of virtualization
16
BITS Pilani
Issues to be aware of
17
BITS Pilani
BITS Pilani
Current Problem the Industry is facing
BITS Pilani
BITS Pilani
Dockers
• All applications have their own dependencies, which
include both software and hardware resources.
• Docker is a mechanism that helps in isolating the
dependencies per each application by packing them into
containers.
• In terms of technology, it provides cloud portability by
running the same applications in different virtual
environments.
• Containers are scalable and safer to use and deploy as
compared to regular approaches.
BITS Pilani
Virtual Machines
• Virtual machines are used extensively in cloud
computing.
• Isolation and resource control have continually been
achieved through the use of virtual machines.
• Virtual machine loads a full OS with its own memory
management and enable applications to be more efficient
and secure while ensuring their high availability.
App App App
Hardware Hardware
BITS Pilani
How are Docker Containers different from a
Virtual Machine?
BITS Pilani
Docker Container Lifecycle ……
• The Life of a Container
– Conception
• BUILD an Image from a Dockerfile
– Birth
• RUN (create+start) a container
– Reproduction
• COMMIT (persist) a container to a new
image
• RUN a new container from an image
– Sleep
• KILL a running container
– Wake
• START a stopped container
– Death
• RM (delete) a stopped container
• Extinction
– RMI a container image (delete image)
BITS Pilani
Dockerfile ……
• Like a Makefile (shell script with keywords)
• Extends from a Base Image
• Results in a new Docker Image
• Imperative, not Declarative
• A Docker file lists the steps needed to build an images
• docker build is used to run a Docker file
• Can define default command for docker run, ports to expose, etc
BITS Pilani
https://docs.docker.com/engine/installation/windows/
Thank you
BITS Pilani
IaaS
BITS Pilani
heard of 3 models of Cloud
Computing?
Yes, Yes, IaaS, PaaS and SaaS
BITS Pilani
Key concepts of IaaS
• Cloudbursting: The process of off-loading tasks to the cloud during times
when the most compute resources are needed
• Multi-tenant computing
BITS Pilani
Two primary facets that make
IaaS special
Elasticity:
Wikipedia: “In cloud computing,
elasticity is defined as the degree
to which a system (or a particular
cloud layer) autonomously adapts
its capacity to workload over time”
OR simply put “Ability of a system to
expand or contract its dedicated
resources to meet the demand”
&
Virtualization
BITS Pilani
4 considerations:
• http://www.ibm.com/developerworks/cloud/library/cl-cloudservices1iaas/
BITS Pilani
IaaS
BITS Pilani
Amazon Web Services
BITS Pilani
AWS infrastructure services
BITS Pilani
Examples
BITS Pilani
IaaS for you
BITS Pilani
heard of 3 models of Cloud
Computing?
Yes, Yes, IaaS, PaaS and SaaS
BITS Pilani
Openstack overview
OpenStack is a collection of open source technologies
delivering a massively scalable cloud operating system.
BITS Pilani
Openstack Components
BITS Pilani
OpenStack conceptual architecture
BITS Pilani
Virtual Machine Provisioning and Manageability Life
Cycle
• The cycle starts by a request delivered to the IT
department, stating the requirement for creating
a new server for a particular service.
• This request is being processed by the IT
administration to start seeing the servers’ Virtual Machine Life Cycle
resource pool, matching these resources with
requirements
•Starting the provision of the needed virtual
machine.
• Once it provisioned and started, it is ready to
provide the required service according to an
SLA(Service Level agreement ).
3
• Virtual is being released; and free resources.
BITS Pilani
VM Provisioning Process
Steps to Provision VM -
• Select a server from a pool of available servers along with the appropriate OS template
you need to provision the virtual machine.
• Load the appropriate software.
• Customize and configure the machine (e.g., IP address, Gateway) to an associated
network and storage resources.
• Finally, the virtual server is ready to start with its newly loaded S/W.
BITS Pilani
VM Provisioning
• Server provisioning is defining server’s configuration based on the organization
requirements, a H/W, and S/W component (processor, RAM, storage, networking,
operating system, applications, etc.).
BITS Pilani
VM Provisioning using templates
BITS Pilani
Virtual Machine Migration Services
Migration service -
The process of moving a virtual machine from one host server or storage location to
another;
There are different techniques of VM migration-
- Hot/live migration,
- Cold/regular migration, and
- Live storage migration of a virtual machine.
In this process, all key machines’ components, such as CPU, storage disks,
networking, and memory, are completely virtualized, thereby facilitating the entire state
of a virtual machine to be captured by a set of easily moved data files.
BITS Pilani
Cold/regular migration
Cold migration is the migration of a powered-off virtual machine and is done in
the following tasks:
• If the option to move to a different datastore was chosen, the configuration
files, including the NVRAM file (BIOS settings), and log files are moved from
the source host to the destination host’s associated storage area. If you
chose to move the virtual machine's disks, these are also moved.
• The virtual machine is registered with the new host.
• After the migration is completed, the old version of the virtual machine is
deleted from the source host if the option to move to a different datastore
was chosen.
BITS Pilani
Live Migration Technique
Pre-assumption :
– We assume that all storage resources are
separated from computing resources.
– Storage devices of VMs are attached from
network :
BITS Pilani
Live Migration Technique
Challenges of live migration :
– VMs have lots of state in memory
– Some VMs have soft real-time
requirements :
BITS Pilani
Live Migration Technique
BITS Pilani
Live Migration Technique
Live migration process :
Host A Host B
BITS Pilani
Live Migration Technique
Live migration process :
Host A Host B
BITS Pilani
Live Migration Technique
Live migration process :
Host A Host B
BITS Pilani
Live Migration Demo
BITS Pilani
Dependency on IaaS and PaaS
3
BITS Pilani
Introduction to PaaS
BITS Pilani
Building blocks of PaaS
BITS Pilani
Characteristics of PAAS
• Services to develop, test, deploy, host and maintain applications in the same
integrated development environment. All the varying services needed to fulfill the
application development process
• Web based user interface creation tools help to create, modify, test and deploy
different UI scenarios
BITS Pilani
Characteristics of PAAS
PaaS, which is similar in many ways to Infrastructure as a
Service, is differentiated from IaaS by the addition of value
added services and comes in two distinct flavours;
1. A collaborative platform for software development, focused on
workflow management regardless of the data source being
used for the application. An example of this approach would
be Heroku, a PaaS that utilizes the Ruby on Rails
development language.
2. A platform that allows for the creation of software utilizing
proprietary data from an application. This sort of PaaS can be
seen as a method to create applications with a common data
form or type. An example of this sort of platform would be the
Force.com. PaaS from Salesforce.com which is used almost
exclusively to develop applications that work with the
Salesforce.com CRM
BITS Pilani
Advantages and Risks
Advantages
• Users don’t have to invest in physical infrastructure
• PaaS allows developers to frequently change or upgrade
operating system features. It also helps development teams
collaborate on projects.
• Makes development possible for ‘non-experts’
• Teams in various locations can work together
• Security is provided, including data security and backup and
recovery.
• Adaptability; Features can be changed if circumstances dictate
that they should.
• Flexibility; customers can have control over the tools that are
installed within their platforms and can create a platform that suits
their specific requirements. They can ‘pick and choose’ the
features they feel are necessary.
BITS Pilani
Advantages and Risks
Risks
• Since users rely on a provider's infrastructure and
software, vendor lock-in can be an issue in PaaS
environments.
• Other risks associated with PaaS are provider downtime
or a provider changing its development roadmap.
• If a provider stops supporting a certain programming
language, users may be forced to change their
programming language, or the provider itself. Both are
difficult and disruptive steps.
BITS Pilani
Paas Example
• PaaS does not typically replace a business' entire
infrastructure. Instead, a business relies on PaaS providers for
key services, such as Java development or application
hosting.
• For example:
Deploying a typical business tool locally might require an IT
team to buy and install hardware, operating systems,
middleware (such as databases, Web servers and so on) the
actual application, define user access or security, and then
add the application to existing systems management or
application performance monitoring (APM) tools. IT teams
must then maintain all of these resources over time.
Paas solution: A PaaS provider, however, supports all the
underlying computing and software; users only need to log in
and start using the platform – usually through a Web browser
interface.
BITS Pilani
Paas Example: Windows Azure
BITS Pilani
Paas Example: Windows Azure
BITS Pilani
Windows Azure Runtime Environment
• The Windows Azure runtime environment provides a
scalable compute and storage hosting environment along
with management capabilities. It has three major
components: Compute, Storage and the Fabric Controller
BITS Pilani
Windows Azure Runtime Environment
• The hosting environment of Azure is called the Fabric Controller.
It has a pool of individual systems connected on a network and
automatically manages resources by load balancing and geo-
replication. It manages the application lifecycle without requiring
the hosted apps to explicitly deal with the scalability and
availability requirements. Each physical machine hosts an Azure
agent that manages the machine.
• The Azure Compute Service provides a Windows-based
environment to run applications written in the various languages
and technologies supported on the Windows platform.
• The Windows Azure storage service provides scalable storage
for applications running on the Windows Azure in multiple forms.
It enables storage for binary and text data, messages and
structured data through support for features called Blobs,Tables,
Queues and Drives.
BITS Pilani
BITS Pilani
Server Rack 1 Server Rack 2
BITS Pilani
BITS Pilani
BITS Pilani
BITS Pilani
BITS Pilani
Paas Vendors
BITS Pilani
Dependency on IaaS and PaaS
BITS Pilani
What is SaaS?
• Software as a service is a software distribution model in which
applications are hosted by a vendor or service provider and made
available to customers over a network, typically the Internet.
BITS Pilani
Problems in traditional Model
BITS Pilani
Problems in traditional Model
Traditional Software On-Demand Utility
BITS Pilani
SaaS – How is it delivered
• The web as a platform is the center point. The web as a platform is
the center point
• Network-based access to, and management of, commercially
available (i.e., not custom) software application delivery that typically
is closer to a one-to-many model (single instance, multi-tenant
architecture) than to a one-to-one model, including architecture,
pricing, partnering, and management characteristics
BITS Pilani
SaaS – Architecture
• Run by
• Bandwidth technologies
• The cost of a PC has been reduced
significantly with more powerful computing but
the cost of application software has not
followed
• Timely and expensive setup and maintenance
costs
• Licensing issues for business are contributing
significantly to the use of illegal software and
piracy. 3
BITS Pilani
SaaS Application Architecture
• Scalable
• Multitenant efficient
• Configurable
BITS Pilani
SaaS Application Architecture
BITS Pilani
SaaS Application Architecture
• Configurable - a single application instance on a single
server has to accommodate users from several different
companies at once
• To customize the application for one customer will change
the application for other customers as well.
• Traditionally customizing an application would mean code
changes
• Each customer uses metadata to configure the way the
application appears and behaves for its users.
• Customers configuring applications must be simple and easy
without incurring extra development or operation costs
BITS Pilani
SaaS Models
BITS Pilani
Business Model comparisons
Traditional packaged software Software as a service
BITS Pilani
Business Model comparisons
Traditional packaged Software Software as a serivce
Hidden Cost
BITS Pilani
SaaS Advantages
BITS Pilani
BITS Pilani
Applicability – Scenario 1
Single-User software application
– Organize personal information
– Run on users’ own local computer
– Serve only one user at a time
– Inapplicable to Saas model
• Data security issue
• Network performance issue
– Example: Microsoft office suite
12
BITS Pilani
Applicability – Scenario 2
Infrastructure software
– Serve as the foundation for most other
enterprise software application
– Inapplicable to Saas model
• Installation locally is required
• Form the basis to run other application
– Example: Window XP, Oracle database
13
BITS Pilani
Applicability – Scenario 3
Embedded Software
– Software component for embedded system
– Support the functionality of the hardware device
– Inapplicable to Saas model
• Embedded software and hardware is
combined together and is inseparable
– Example: software embedded in ATM
machines, cell phones, routers, medical
equipment, etc
14
BITS Pilani
Applicability – Scenario 4
Enterprise Software Application
– Perform business functions
– Organize internal and external information
– Share data among internal and external users
– The most standard type of software applicable
to Saas model
– Example: Saleforce.com CRM application,
Siebel On-demand application
15
BITS Pilani
Cloud ? That looks easy!!!
Is it So?????
BITS Pilani
Introduction
BITS Pilani
Introduction
Ok, ok got to know what to manage…..
Is it so………..????
BITS Pilani
• OMG!!!!
BITS Pilani
Need of the hour???
BITS Pilani
Why a Virtual Infrastructure Manager?
VMs are great!!...but something more is needed
Where did/do I put my VM? (scheduling & monitoring)
How do I provision a new cluster node? (clone)
What IP addresses are available? (networking)
Provide a uniform view of the resource pool
Life-cycle management and monitoring of VM
The VIM should integrate Image, Network and
Virtualization
VM VM VM VM
OpenNebula (VIM)
hypervisor hypervisor hypervisor hypervisor
BITS Pilani
Extending the Benefits of Virtualization to Clusters
BITS Pilani
What is OpenNebula?
BITS Pilani
What is OpenNebula?
Enabling Technology to Build your Cloud
• Private Cloud to simplify and optimize internal operations
• Hybrid Cloud to supplement the capacity of the Private Cloud
• Public Cloud to expose your Private to external users
BITS Pilani
The Benefits of OpenNebula
For the Infrastructure Manager
• Centralized management of VM workload and distributed
infrastructures
• Support for VM placement policies: balance of workload, server
consolidation…
• Dynamic resizing of the infrastructure
• Dynamic partition and isolation of clusters
• Dynamic scaling of private infrastructure to meet fluctuating
demands
• Lower infrastructure expenses combining local and remote Cloud
resources
For the Infrastructure User
• Faster delivery and scalability of services
• Support for heterogeneous execution environments
• Full control of the lifecycle of virtualized services management
BITS Pilani
Interoperability from the Cloud Provider
perspective
Interoperable (platform independent), innovative (feature-rich) and
proven (mature to run in production).
BITS Pilani
The main features of OpenNebula
Feature Function
Internal Interface • Unix-like CLI for fully management of VM life-cycle and physical boxes
• XML-RPC API and libvirt virtualization API
Scheduler • Requirement/rank matchmaker allowing the definition of workload and resource-aware allocation
policies
• Support for advance reservation of capacity through Haizea
Service Management and • Support for multi-tier services consisting of groups of inter-connected VMs, and their auto-
Contextualization configuration at boot time
Scalability • Tested in the management of medium scale infrastructures with hundreds of servers and VMs (no
scalability issues has been reported)
Flexibility and • Open, flexible and extensible architecture, interfaces and components, allowing its integration with
Extensibility any product or tool
BITS Pilani
Inside OpenNebula
BITS Pilani
OpenNebula Architecture
Tools
Command Line
Scheduler Other Tools
Interface
Request Manager
SQL Pool
(XML-RPC)
Core
VM Host VN
Manager Manager Manager
Drivers
BITS Pilani
The Core
• Request manager: Provides a XML-RPC interface to manage
and get information about ONE entities.
• SQL Pool: Database that holds the state of ONE entities.
• VM Manager (virtual machine): Takes care of the VM life cycle.
• Host Manager: Holds handling information about hosts.
• VN Manager (virtual network): This component is in charge of
generating MAC and IP addresses.
Tools
Command Line
Scheduler Other Tools
Interface
Request Manager
SQL Pool
(XML-RPC)
Core
VM Host VN
Manager Manager Manager
Drivers
BITS Pilani
The drivers layer
Transfer Driver: Takes care of the images.
– cloning, deleting, creating swap image…
Virtual Machine Driver: Manager of the lifecycle of a virtual
machine
– deploy, shutdown, poll, migrate…
Information Driver: Executes scripts in physical hosts to
gather information about them
– total memory, free memory,
Tools
Command Line
Scheduler Other Tools
Interface
BITS Pilani
Process separation
Scheduler CLI
XML-RPC Interface
OpenNebula Core
Unix Pipes (diver message protocol)
BITS Pilani
System Overview
Executes the OpenNebula Services
Usually acts as a classical cluster front-end
Repository of VM images
Multiple backends (LVM, iSCSI..)
Modular components to
interact with the cluster
services
Types: storage,
monitoring, virtualization
and network
BITS Pilani
Storage
BITS Pilani
Network
BITS Pilani
Virtual machines
BITS Pilani
VMs
VM Description
Option Description
NAME • Name that the VM will get for description purposes.
CPU • Percentage of CPU divided by 100 required for the Virtual
Machine.
OS (KERNEL, INITRD) • Path of the kernel and initrd files to boot from.
DISK (SOURCE, • Description of a disk image to attach to the VM.
TARGET, CLONE, TYPE)
BITS Pilani
VMs
VM States overview
HOLD MIGRATE
SUSPENDED STOPPED
BITS Pilani
VMs
Pending state
After submitting a VM description to ONE it is added to the
database and its state is set to PENDING.
In this state IP and MAC addresses are also chosen if they
are not explicitly defined.
The scheduler awakes every 30 seconds and looks for VM
descriptions in PENDING state and searches for a
physical node that meets its requirements. Then a deploy
XML-RPC message is sent to oned to make it run in the
selected node.
Deployment can be also made manually using the
Command Line Interface:
⇒ onevm deploy <vmid> <hostid>
BITS Pilani
VMs
Prolog state
In PROLOG state the Transfer Driver prepares the images
to be used by the VM.
Transfer actions:
– CLONE: Makes a copy of a disk image file to be used by the
VM. If Clone option for that file is set to false and the Transfer
Driver is configured for NFS then a symbolic link is created.
– MKSWAP: Creates a swap disk image on the fly to be used by
the VM if it is specified in the VM description.
BITS Pilani
VMs
Boot state
In this state a deployment file specific for the virtualization
technology configured for the physical host is generated
using the information provided in the VM description file.
Then Virtual Machine Driver sends deploy command to
the virtual host to start the VM.
The VM will be in this state until deployment finishes or fails.
BITS Pilani
VMs
Contextualization
The ISO image has the contextualization for that VM:
– context.sh: contains configuration variables
– init.sh: script called by VM at start to configure
specific services
– certificates: directory that contains certificates for
some service
– service.conf: service configuration
BITS Pilani
VMs
BITS Pilani
VMs
Epilog state
In EPILOG state the Transfer Manager Driver is called
again to perform this actions:
– Copy back the images that have SAVE=yes option.
– Delete images that were cloned or generated by MKSWAP.
BITS Pilani
Hybrid cloud
BITS Pilani
Overview
BITS Pilani
Making an Amazon EC2 hybrid
Amazon EC2 cloud is managed by OpenNebula as any
other cluster node
– You can use several accounts by adding a driver for
each account (use the arguments attribute, -k and -c
options). Then create a host that uses the driver
– You can use multiple EC2 zones, add a driver for
each zone (use the arguments attribute, -u option),
and a host that uses that driver
– You can limit the use of EC2 instances by modifying
the IM file
BITS Pilani
Using an EC2 hybrid cloud
Virtual Machines can be instantiated locally or in EC2
The VM template must provide a description for both
instantiation methods.
The EC2 counterpart of your VM (AMI_ID) must be
available for the driver account
The EC2 VM template attribute should describe not only the
VM’s properties but the contact details of the external
cloud provider
BITS Pilani
Hybrid cloud Use Case
On-demand Scaling of Computing Clusters
• On-demand Scaling of Web Servers
• Elastic execution of the NGinx web
server
• The capacity of the elastic web
application can be dynamically
increased or decreased by adding
or removing NGinx instances
BITS Pilani
High Availability
BITS Pilani
High Availability
BITS Pilani
High Availability
BITS Pilani
Key aspects of SLA
In the early days of web-application deployment,
performance of the application at peak load was
a single important criterion for provisioning server
resources.
BITS Pilani
Key aspects of SLA
Due to the increasing complexity of managing the hugh
Data centres, enterprises started outsourcing the
application hosting to the infrastructure providers. They
would procure the hardware and make it available for
application hosting.
It necessitated the enterprises to enter into a legal
agreement with the infrastructure service providers to
guarantee a minimum quality of service (QoS).
Typically, the QoS parameters are related to the availability
of the system CPU, data storage, and network for
efficient execution of the application at peak loads.
This legal agreement is known as the service-level
agreement (SLA)
BITS Pilani
Key aspects of SLA
For example, one SLA may state that the application’s
server machine will be available for 99.9% of the key
business hours of the application’s end users, also called
core time, and 85% of the non-core time.
Another SLA may state that the service provider would
respond to a reported issue in less than 10 minutes
during the core time, but would respond in one hour
during non-core time.
These SLAs are known as the infrastructure SLAs, and the
infrastructure service providers are known as
Application Service Providers (ASPs)
BITS Pilani
Key aspects of SLA
The dedicated hosting practice resulted in massive
redundancies within the ASP’s data centers due to the
underutilization of many of their servers. This is
because the applications were not fully utilizing their
servers’ capacity at nonpeak loads.
To reduce the redundancies and increase the server
utilization in data centers, ASPs started co-hosting
applications with complementary workload patterns.
Co-hosting of applications means deploying more than
one application on a single server. This led to further
cost advantage for both the ASPs and enterprises.
BITS Pilani
Key aspects of SLA
However, newer challenges such as application
performance isolation and security guarantees emerged
and needed to be addressed. Performance isolation
implies that one application should not steal the
resources being utilized by other co-located applications.
Hence, appropriate measures are needed to guarantee
security and performance isolation. These challenges
prevented ASPs from fully realizing the benefits of co-
hosting.
Virtualization technologies have been proposed to
overcome the above challenges. The ASPs could exploit
the containerization features of virtualization technologies
to provide performance isolation and guarantee data
security to different co-hosted applications
BITS Pilani
Key aspects of SLA
Adoption of virtualization technologies required ASPs to get
more detailed insight into the application runtime
characteristics with high accuracy. Based on these
characteristics, ASPs can allocate system resources
more efficiently to these applications on-demand, so
that application-level metrics can be monitored and met
effectively.
These metrics are request rates and response times.
Therefore, different SLAs than the infrastructure SLAs are
required. These SLAs are called application SLAs. These
service providers are known as Managed Service
Providers (MSP) because the service providers were
responsible for managing the application availability too.
BITS Pilani
Key aspects of SLA
To fulfill the SLOs mentioned in the application SLA and
also make their IT infrastructure elastic, an in-depth
understanding of the application’s behavior is required for
the MSPs. Elasticity implies progressively scaling up the
IT infrastructure to take the increasing load of an
application. The customer is billed based on their
application usage of infrastructure resources for a given
period only. The infrastructure can be augmented by
procuring resources dynamically from multiple sources,
including other MSPs, if resources are scarce at their
data centers. This kind of new hosting infrastructure is
called cloud platform.
BITS Pilani
Key aspects of SLA
Traditionally, load balancing techniques and admission
control mechanisms have been used to provide
guaranteed quality of service (QoS) for hosted web
applications. These mechanisms can be viewed as the
first attempt towards managing the SLOs.
Now it is also possible for a customer and the service
provider to mutually agree upon a set of SLAs with
different performance and cost structure rather than a
single SLA. The customer has the flexibility to choose
any of the agreed SLAs from the available offerings. At
runtime, the customer can switch between the different
SLAs.
BITS Pilani
Key aspects of SLA
Key Components of a Service-Level Agreement
Service Level Parameter
Describes an observable property of a service whose value is
measurable. Metrics These are definitions of values of service
properties that are measured from a service providing system
or computed from other metrics and constants.
Metrics are the key instrument to describe exactly what SLA
parameters mean by specifying how to measure or compute
the parameter values.
Function A function specifies how to compute a metric’s value
from the values of other metrics and constants. Functions are
central to describing exactly how SLA parameters are
computed from resource metrics.
Measurement directives These specify how to measure a metric.
BITS Pilani
Key aspects of SLA
Key Contractual Elements of an Infrastructural SLA Hardware
availability 99% uptime in a calendar month Power availability
99.99% of the time in a calendar month
Data center network availability 99.99% of the time in a
calendar month
Backbone network availability 99.999% of the time in a
calendar month
Service credit for unavailability Refund of service credit
prorated on downtime period
Outage notification guarantee Notification of customer within 1
hr of complete downtime
Internet latency guarantee When latency is measured at 5 min
intervals to an upstream provider, the average doesn’t exceed
60 msec
Packet loss guarantee Shall not exceed 1% in a calendar
month BITS Pilani
Key aspects of SLA
Key contractual components of an application SLA
Service level parameter metric Web site response time (e.g.,
max of 3.5 sec per user request)
Latency of web server (WS) (e.g., max of 0.2 sec per request)
Latency of DB (e.g., max of 0.5 sec per query)Function
Average latency of WS (latency of web server 1+latency of web
server 2 ) /2
Web site response time Average latency of web server+ latency
of database Measurement directive
DB latency available via http://mgmtserver/em/latency WS
latency available via http://mgmtserver/ws/instanceno/ latency
Service level objective Service assurance
web site latency , 1 sec when concurrent connection , 1000
Penalty 1000 USD for every minute while the SLO was breached
BITS Pilani
Key aspects of SLA
Each SLA goes through a sequence of steps starting from
identification of terms and conditions, activation and
monitoring of the stated terms and conditions, and
eventual termination of contract once the hosting
relationship ceases to exist.
Such a sequence of steps is called SLA life cycle and
consists of the following five phases:
1. Contract definition
2. Publishing and discovery
3. Negotiation
4. Operationalization
5. De-commissioning
BITS Pilani
Key aspects of SLA
.Some of the parameters
The SLA class (Platinum, Gold, Silver, etc.) to which the
application belongs to.
The amount of penalty associated with SLA breach.
Whether the application is at the threshold of breaching
the SLA.
Whether the application has already breached the SLA.
The number of applications belonging to the same
customer that has breached SLA.
The number of applications belonging to the same
customer about to breach SLA
. The type of action to be performed to rectify the situation.
BITS Pilani
Multitenancy – What is it?
BITS Pilani
Pros and Cons
House Apartment
Effective use of land - +
Privacy + -
Infrastructure sharing - +
Maintenance cost sharing - +
Freedom + -
BITS Pilani
Traditional Deployment Model
BITS Pilani
Multitenancy – Introduction
• Multi-tenancy is an architecture in which a single instance of a software
application serves multiple customers. Each customer is called a
tenant. Tenants may be given the ability to customize some parts of the
application, such as color of the user interface (UI) or business rules,
but they cannot customize the application's code.
• A software-as-a-service (SaaS) provider, for example, can run one
instance of its application on one instance of a database and provide
web access to multiple customers. In such a scenario, each tenant's
data is isolated and remains invisible to other tenants.
BITS Pilani
Multitenancy – Introduction
BITS Pilani
Multitenancy – key aspects
BITS Pilani
Multi-tenants Deployment Modes
for Application Server
Fully isolated Application server Application Server
Each tenant accesses an application Tenant A
server running on a dedicated servers.
Application server
Tenant B
Virtualized Application Server Application server Virtual
Each tenant accesses a dedicated Tenant A machine
application running on a separate virtual Virtual
machine. Tenant B machine
Application server
Shared Virtual Server
Each tenant accesses a dedicated Tenant A
Virtual
application server running on a shared machine
virtual machine.
Tenant B
Regularity Controls
Infrastructure
Networking and 10
Database Storage Computer
Communications
BITS Pilani
Introduction to cloud security
• The cloud acts as a big black box, nothing inside the cloud is
visible to the clients
• Clients have no idea or control over what happens inside a
cloud
• Even if the cloud provider is honest, it can have malicious
system admins who can tamper with the VMs and violate
confidentiality and integrity
• Clouds are still subject to traditional data confidentiality,
integrity, availability, and privacy issues, plus some
additional attacks 2
BITS Pilani
Companies are still afraid to use clouds
BITS Pilani
Cloud Security Issues
• Most security problems stem from:
– Loss of Control
• Take back control
– Data and apps may still need to be on the cloud
– But can they be managed in some way by the consumer?
– Lack of trust
• Increase trust (mechanisms)
– Technology
– Policy, regulation
– Contracts (incentives): topic of a future talk
– Multi-tenancy
• Private cloud
– Takes away the reasons to use a cloud in the first place
• VPC: its still not a separate system
• Strong separation
• These problems exist mainly in 3rd party management models
– Self-managed clouds still have security issues, but not related to
above 4
BITS Pilani
Loss of Control in the Cloud
BITS Pilani
Multi-tenancy Issues in the
Cloud
• Conflict between tenants’ opposing goals
– Tenants share a pool of resources and have opposing goals
• How does multi-tenancy deal with conflict of interest?
– Can tenants get along together and ‘play nicely’ ?
– If they can’t, can we isolate them?
• How to provide separation between tenants?
• Cloud Computing brings new threats
Multiple independent users share the same physical infrastructure
Thus an attacker can legitimately be in the same physical machine
as the target
BITS Pilani
Taxonomy of Fear
• Confidentiality
– Fear of loss of control over data
• Will the sensitive data stored on a cloud remain
confidential?
• Will cloud compromises leak confidential client data
– Will the cloud provider itself be honest and won’t peek
into the data?
• Integrity
– How do I know that the cloud provider is doing the
computations correctly?
– How do I ensure that the cloud provider really stored
my data without tampering with it?
7
BITS Pilani
Taxonomy of Fear
Availability
• Will critical systems go down at the client, if the
provider is attacked in a Denial of Service attack?
• What happens if cloud provider goes out of
business?
• Would cloud scale well-enough?
• Often-voiced concern
– Although cloud providers argue their downtime
compares well with cloud user’s own data centers
BITS Pilani
Taxonomy of Fear
BITS Pilani
Taxonomy of Fear
10
BITS Pilani
Threat Model
11
BITS Pilani
Threat Model
• Basic components
– Attacker modelling
• Choose what attacker to consider
–insider vs. outsider?
–single vs. collaborator?
• Attacker motivation and capabilities
– Attacker goals
– Vulnerabilities / threats
12
BITS Pilani
Thank you
13
BITS Pilani
Hadoop
BITS Pilani
Or have u thought of the
following?
• How do “big bazaar/more/D’Mart” target promotions
guaranteed to make you buy?
BITS Pilani
Wow, that’s so much of DATA
to process!!!
BITS Pilani
One of the research in the year 2012, Hadoop held the
world record for the fastest system to sort large data (500 GB
of data in59 sec and 100 terabytes of data in 68 seconds)
Designed to answer the question: “How to process big
data with reasonable cost and time?”
BITS Pilani
Hadoop Features
BITS Pilani
Hadoop Framework Tools
BITS Pilani
Hadoop
BITS Pilani
Hadoop common Component
BITS Pilani
MapReduce (Data Processing
Framework)
MapReduce
Software Processes Using large
In a reliable
Framework large clusters Nodes of
and fault-
for easily amount of having commodity
tolerant
running data in thousands hardware
manner
applications parallel of nodes
BITS Pilani
MapReduce Processing flow
Logical flow:
Two phases
Example:
BITS Pilani
Architecture Overview
blog.raremile.com
BITS Pilani
Architecture (cont.)
NameNode/ Master Node:
• Stores metadata for the files, like the directory structure of a typical FS.
• The server holding the NameNode instance is quite crucial, as there is only
one.
BITS Pilani
Architecture (cont.)
BITS Pilani
Distributed Word Count
BITS Pilani
Example: Word Count
def mapper(line):
foreach word in line.split():
output(word, 1)
BITS Pilani
Word Count Execution
BITS Pilani
An Optimization: The
Combiner
• Local reduce function for repeated keys produced by
same map
• Decreases amount of intermediate data
BITS Pilani
Word Count with Combiner
BITS Pilani
Snapshot of MarketRatings
example and Program demo
BITS Pilani
MapReduce Execution Details
BITS Pilani
Fault Tolerance in MapReduce
1. If a task crashes:
– Retry on another node
• OK for a map because it had no dependencies
• OK for reduce because map outputs are on disk
– If the same task repeatedly fails, fail the job or ignore that
input block
2. If a node crashes:
– Relaunch its current tasks on other nodes
– Relaunch any maps the node previously ran
• Necessary because their output files were lost along
with the crashed node
BITS Pilani
Fault Tolerance in MapReduce
BITS Pilani
Challenges of Cloud
Environment
Cheap nodes fail, especially when you have many
– Mean time between failures for 1 node = 3 years
– MTBF for 1000 nodes = 1 day
– Solution: Build fault tolerance into system
Thanks Hadoop
BITS Pilani