Cloud Computing
Cloud Computing
Feature Function
Internal Interface • Unix-like CLI for fully management of VM life-cycle and physical boxes
• XML-RPC API and libvirt virtualization API
TIME
Node 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
N1 P5
N2 P1 P2
N3 P3 P5
e.g. If we have three nodes N1, N2 and N3 and five processes have to be scheduled with entry time
and duration of resources as follows – Best effort queue
Process Entry time Time required Node Start time
P1 9am 3 hours N2 9am Ended at 12pm
P2 10am 10 hours N2 12pm Ended at 8pm
P3 9.30am 4 hours N3 9.30am Ended at 1.30pm
P4 11am 5hours N3 1.30pm Ended at 6.30pm
P5 8am 15hours N1 8am Ended at 11pm
e.g. If we have three nodes N1, N2 and N3 and five processes have to be scheduled with start time and
duration with P2 and P5 being advanced reservation
Some Facts
• In the multi tenant architecture, the application is redesigned to handle the resource sharing
between the multiple tenants.
• For example, SalesForce.com (service provider) hosts the CRM application using their
infrastructure.
• A company who wants to use this hosted CRM application for their business is the customer and
the employees of the companies to whom the company provides privileges to access the CRM
application are the actual users of the application
• With this architecture, data, configuration, user management, tenant specific functionality etc
are shared between the tenants.
• MT contrasts with multi-instance architectures, where separate software instances operate on
behalf of different tenants.
• In virtualization, the user is given the illusion that he owns the complete infrastructure on which
application is running through concept of virtual machine.
• The hypervisor plays important role to achieve the separation between the multiple users.
Multi Tenant vs Multi Instance
IAAS – MT Model
In (IaaS), a single physical or virtual infrastructure is shared among multiple tenants. Each tenant is
provided with its own logical environment, which includes compute resources such as virtual machines
(VMs), storage, networking, and other infrastructure components. There are several ways to implement
a multi-tenant deployment model for IaaS:
1. Virtual machine isolation: In this model, each tenant is provided with a set of virtual machines
that are completely isolated from other tenants. This approach provides strong security and
isolation, but can be less efficient than other approaches.
2. Network isolation: In this model, each tenant is provided with its own virtual network that is
isolated from other tenants. This approach provides better performance and efficiency than
virtual machine isolation, but may require more complex network management.
3. Resource pool isolation: In this model, each tenant is provided with a dedicated set of compute
resources such as CPU, memory, and storage that are isolated from other tenants. This approach
provides good performance and resource allocation, but may be less secure than other
approaches.
4. Hybrid model: In this model, a combination of the above models is used to meet the specific
requirements of each tenant. For example, some tenants may require strong security and
isolation, while others may prioritize performance and efficiency.
PAAS – MT Model
1. Application-level isolation: In this model, each tenant's application is isolated from other
tenants' applications at the application level. This can be achieved through containerization or
virtualization, and may also involve isolating the application's data and configuration settings.
2. Tenant-level isolation: In this model, each tenant is provided with a dedicated instance of the
platform, which is isolated from other tenants. This approach provides strong security and
isolation, but can be less efficient than other approaches.
3. Resource pool isolation: In this model, each tenant is provided with a dedicated set of compute
resources such as CPU, memory, and storage that are isolated from other tenants. This approach
provides good performance and resource allocation, but may be less secure than other
approaches.
4. Hybrid model: In this model, a combination of the above models is used to meet the specific
requirements of each tenant. For example, some tenants may require strong security and
isolation, while others may prioritize performance and efficiency.
SAAS – MT Model
There are several ways to implement a multi-tenant deployment model for SaaS:
1. Database-level isolation: In this model, each tenant's data is stored in a separate database
schema, which provides complete isolation and security. This approach can be efficient and
scalable, but may require complex database management.
2. Application-level isolation: In this model, each tenant's data is kept separate at the application
level, which may involve partitioning data and configuration settings. This approach can be more
flexible and easier to manage than the database-level isolation model, but may be less secure.
3. Hybrid model: In this model, a combination of the above models is used to meet the specific
requirements of each tenant. For example, some tenants may require complete data isolation,
while others may be willing to share some components of the application.
Benefits
Cost Savings –
• An application instance usually incurs a certain amount of memory and processing overhead
which can be substantial when multiplied by many customers, especially if the customers are
small.
• As the single instance is shared between multiple tenants this cost overhead can be segregated
between multiple tenants.
Data aggregation–
• In non MT architecture, the data for different customers will be located in different database
schemas and pulling information from all of them can be a very cumbersome task.
• In MT architecture, instead of collecting data from multiple data sources, with potentially
different database schemas, all data for all customers is stored in a single database schema.
Thus, running queries across customers, mining data, and looking for trends is much simpler.
Release management –
• MT simplifies the release management process.
• In a traditional release management process, packages containing code and database changes
are distributed to client desktop and/or server machines.
• These packages then have to be installed on each individual machine.
• With the multitenant model, the package typically only needs to be installed on a single server.
This greatly simplifies the release management process.
Disadvantages
Complexity –
• Because of the additional customization complexity and the need to maintain per-tenant
metadata, multitenant applications require a larger development effort.
Risks-
• At the same time, multi-tenancy increases the risks and impacts inherent in applying a new
release version.
• As there is a single software instance serving multiple tenants, an update on this instance may
cause downtime for all tenants even if the update is requested and useful for only one tenant.
• Also, some bugs and issues resulted from applying the new release could manifest in other
tenants' personalized view of the application.
• Because of possible downtime, the moment of applying the release may be restricted depending
on time usage schedule of more than one tenant.
Characteristics of MT Architecture
Customization –
• Multi-tenant applications are typically required to provide a high degree of customization to
support each target organization's needs. Customization typically includes the following aspects:
1. Branding: allowing each organization to customize the look-and-feel of the application to match
their corporate branding (often referred to as a distinct "skin").
2. Workflow: accommodating differences in workflow to be used by a wide range of potential
customers.
3. Extensions to the data model: supporting an extensible data model to give customers the ability
to customize the data elements managed by the application to meet their specific needs.
4. Access control: letting each client organization independently customize access rights and
restrictions for each user.
Quality of service
• Multitenant applications are expected to provide adequate isolation of security, robustness and
performance between multiple tenants which is provided by the layers below the application in
case of multi-instance applications
MT- Different Levels
• Implementing the highest degree of resource sharing for all resources may be prohibitively
expensive in development effort and complexity of the system.
• A balanced approach, where there is fine grained sharing of resources only for important
resources, may be the optimum approach.
• The four levels of multi-tenancy are described in the following list for any given resource in a
cloud system, the appropriate level could be selected
• Custom instances
• Configurable instances
• Configurable, multi-tenant efficient instances
• Scalable, configurable, multi tenant efficient resources
Custom instances
Lowest level of MT
Each customer has own custom version of application
Different versions of application are running differently
Extremely difficult to manage as needs dedicated support for each customer
Configurable instances
Same version of application is shared between the customers with customizations
specific to each customer
Different instances of same application are running
Supports customization like logos on the screen, tailor made workflows
Managing application is better that custom instances approach as only one copy needs
to be managed
Upgrades are simple and seamless
Configurable, multi-tenant efficient instances
Same version of application is shared between the customers through a single instance
of application
More efficient usage of the resources
Management is extremely simple
Scalable, configurable, multi tenant efficient resources
All features of level 3 are supported.
Application instances are installed on cluster of computers allowing it to scale as per
demand.
Maximum level of resource sharing is achieved.
Example, Gmail
Security in MT
• The key challenge in multi-tenancy is the secure sharing of resources. A very important
technology to ensure this is authentication.
• Clearly each tenant would like to specify the users who can log in to the cloud system. Unlike
traditional computer systems, the tenant would specify the valid users, but authentication still
has to be done by the cloud service provider.
• Two basic approaches can be used: a centralized authentication system or a decentralized
authentication system .
• In the centralized system, all authentication is performed using a centralized user data base.
The cloud administrator gives the tenant’s administrator rights to manage user accounts for that
tenant. When the user signs in, they are authenticated against the centralized database.
• In the decentralized system, each tenant maintains their own user data base, and the tenant
needs to deploy a federation service that interfaces between the tenant’s authentication
framework and the cloud system’s authentication service.
• Decentralized authentication is useful if single sign-on is important, since centralized
authentication systems will require the user to sign on to the central authentication system in
addition to signing on to the tenant’s authentication system.
• However, decentralized authentication systems have the disadvantage that they need a trust
relationship between the tenant’s authentication system and the cloud provider’s
authentication system. Given the self-service nature of the cloud (i.e., it is unlikely that the
cloud provider would have the resources to investigate each tenant, and ensure that their
authentication infrastructure is secure), centralized authentication seems to be more generally
applicable.
Name-Value Pairs:
• The major problem with the pre-allocated columns technique is that there could be a lot of
wasted space.
• If the number of columns is too low, then users will feel constrained in their customizations.
• However, if the number is too big, there will be a lot of space wastage.
Name-Value Pairs
• A metadata table for tenant is maintained
• A data table is specified with standard common columns and has extra column at end to point to
another name value pair table
• Name value pair table (aka pivot table) actually includes the custom fields for this record.
• The actual custom fields are stored with data type and other metadata information.
• Space efficient as compared to pre allocated columns method
• Joins are involved to fetch tenant specific data
• Let’s consider Tenants have following table structure that needs to be mapped to the Name-
Value pair table structure.
• Each tenant table has:
• standard common fields and
• few custom fields having varying data type
Sample MT Architecture
Multi Tenancy: Resource Sharing
Did You Know ?
Here are some interesting facts about multi-tenancy in the cloud:
1. Multi-tenancy is one of the key features of cloud computing that makes it so attractive to
businesses. It allows multiple customers to share the same infrastructure and services, which
can lead to cost savings and improved efficiency.
2. One of the biggest challenges of multi-tenancy is ensuring that each tenant's data is kept
separate and secure. This requires careful planning and implementation of security measures to
prevent data leakage and unauthorized access.
3. Multi-tenancy can be implemented at different levels in the cloud, including infrastructure,
platform, and software. Each level requires different techniques and technologies to ensure
proper isolation and security.
4. In the public cloud model, multi-tenancy is typically implemented using virtualization and
resource sharing. Each tenant is assigned their own virtual resources, which are isolated from
other tenants.
Did You Know ?
Here are some interesting facts about multi-tenancy in the cloud:
1. Multi-tenancy is one of the key features of cloud computing that makes it so attractive to
businesses. It allows multiple customers to share the same infrastructure and services, which
can lead to cost savings and improved efficiency.
2. One of the biggest challenges of multi-tenancy is ensuring that each tenant's data is kept
separate and secure. This requires careful planning and implementation of security measures to
prevent data leakage and unauthorized access.
3. Multi-tenancy can be implemented at different levels in the cloud, including infrastructure,
platform, and software. Each level requires different techniques and technologies to ensure
proper isolation and security.
4. In the public cloud model, multi-tenancy is typically implemented using virtualization and
resource sharing. Each tenant is assigned their own virtual resources, which are isolated from
other tenants.
Did You Know ?
1. In the private cloud model, multi-tenancy can be implemented using virtualization or
containerization, and is typically achieved through strict access controls and resource
partitioning.
2. Hybrid cloud environments can offer the benefits of both public and private cloud models, but
can also add complexity and require careful management to ensure proper isolation and
security.
3. Multi-tenancy can offer significant cost savings for businesses, as they only pay for the resources
they use. This can also lead to better resource utilization and scalability, as resources are shared
among multiple tenants.
4. Multi-tenancy is not suitable for all types of applications, and some applications may require
dedicated resources and environments. It is important to carefully evaluate the requirements of
each application and choose the appropriate deployment model.
Overall, multi-tenancy is a key feature of cloud computing that can offer significant benefits to
businesses, but it requires careful planning and implementation to ensure proper isolation and security.
SLA Management
What is SLA or Service Level Agreement
• Describes a set of non functional requirements of the service.
• Example : RTO time – Return to Operation Time if case of failure
• SLO – Service Level Objective. That is, the objective to be achieved.
• KPI – Key Performance Indicators
• Service Level Objective:
• Objective of service quality that has to be achieved.
• Set of measurable KPIs with thresholds to decide if the objective is fulfilled or not.
• Attainable
• Repeatable
• Measurable
• Understandable
• Meaningful
• Controllable
• Affordable
• Mutually acceptable
SLA Role in High Availability
• What is High Availability
• Driven by SLA (Service Level Agreement)
• High Availability must conform to SLA. Goal here is to meet promised quality
• Examples: Service is available 99.95%.
• Net Banking : Guarantees banking 24 x7 . There are published down times called “ SYSTEM
MAINTENANCE” window
• Duronto Express : Promises point to point service with only Service halts
SLA Role in High Availability
What deters HA
• Service outage which was unplanned because of Server or Human Error
• Service Disruption by Planned Maintenance windows (Downtime)
• Service Performance degradation due to lack of infrastructure or failure of critical components
during peak load time
• Bottom Line : Need effective Capacity Planning to meet promised QoS or in other words
maintain HA thus adhering to the SLA’s
Steps for HA
Steps to achieve high availability
• Build for server failure
• Have redundant servers which can be made online
• Build for zone failure
• Having DR sites in case of failure to switch over to backup site
• Build for Cloud failure
• Plan for your Cloud setup to be robust and contained. Errors should not cascade, having
fire door policy to contain threats or errors which affect the ecosystem
• Automating and testing
• Test & Test again, low manual interference
The 3 Initialisms
SLA vs SLO
The SLA is the entire agreement that specifies
o what service is to be provided,
o how it is supported,
o times,
o locations,
o costs,
o performance, and
o responsibilities of the parties involved.
SLOs are specific measurable characteristics of the SLA such as
• availability,
• throughput,
• frequency,
• response time, or quality.
SLIs are actual measure of the SLO and serves as a benchmark to compare against the promised SLO
• availability,
• throughput,
• frequency,
• response time, or quality.
The 3 Initialisms
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.
• Provisioning in those days involved deciding hardware configuration, determining the number of
physical machines, and acquiring them upfront so that the overall business objectives could be
achieved.
• The web applications were hosted on these dedicated individual servers within enterprises’ own
server rooms. These web applications were used to provide different kinds of e-services to
various clients.
• Due to the increasing complexity of managing the huge 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)
Co-Hosting Application
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 work load 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.
SLA Types
Infrastructure SLA – Infrastructure provider manages and offers guarantees on availability of the
infrastructure, namely server machine, power, network connectivity and so on. Enterprises manage their
applications that are deployed on these server machines. The machines are leased to customers and are
isolated from machines of other customers.
For example, SLAs can be
Hardware availability – 99% uptime in a calendar month
Power availability – 99.99% of the time in calendar month
Data center network availability – 99.99% of the time in calendar month
Application SLA – In application co-hosting model, the server capacity is available to the applications
based solely on their resource demands. Hence the service providers are flexible in allocating and de-
allocating computing resources among the co-located applications. Therefore the service providers are
also responsible for ensuring to meet their customers application SLOs.
For example, SLAs can be
Web site response time (max of 3.5 sec per user request), Latency of web server (max of 0.2 sec per
request), Latency of DB (max of 0.5 sec per query)
Infrastructure SLA
Thus, to deploy a service on a cloud, a service provider orders suitable virtual hardware and installs its
application software on it.
From the IaaS provider, a given service configuration is a virtual resource array of black box resources,
which correspond to the number of instances of resource type.
For example, a typical three-tier application may contain ten general-purpose small instances to run
Web front-ends, three large instances to run an application server cluster with load balancing and
redundancy, and two large instances to run a replicated database.
A risk mitigation mechanism to protect user experience in the IaaS model is offered by infrastructure
SLAs (i.e., the SLAs formalizing capacity availability) signed between service provider and IaaS
provider.
There is no universal approach to infrastructure SLAs. As the IaaS field matures and more experience is
being gained, some methodologies may become more popular than others. Also some methods may be
more suitable for specific workloads than other. There are three main approaches as follows.
No SLAs. This approach is based on two premises:
(a) Cloud always has spare capacity to provide on demand, and
(b) services are not QoS sensitive and can withstand moderate performance degradation. This
methodology is best suited for the best effort workloads.
Probabilistic SLAs. (Epistemic) These SLAs allow us to trade capacity availability for cost of
consumption. Probabilistic SLAs specify clauses that determine availability percentile for contracted
resources computed over the SLA evaluation period. The lower the availability percentile, the cheaper
the cost of resource consumption. This type of SLA is suitable for small and medium businesses and for
many enterprise grade applications.
Deterministic SLAs. (Ontic) These are, in fact, probabilistic SLAs where resource availability percentile is
100%. These SLAs are most stringent and difficult to guarantee. From the provider’s point of view, they
do not admit capacity multiplexing. Therefore this is the most costly option for service providers, which
may be applied for critical services.
On-boarding of Application:
Once the customer and the MSP agree in principle to host the application based on the findings of the
feasibility study, the application is moved from the customer servers to the hosting platform.
Moving an application to the MSP’s hosting platform is called on-boarding.
As part of the on-boarding activity, the MSP understands the application runtime characteristics using
runtime profilers*.
* Profiling is a method of gathering performance data in any development or deployment
scenario. This is for developers and system administrators who want to gather information about
application performance
On-boarding :
The application is executed on a virtualized platform and the application performance characteristics
are noted again. Important performance characteristics like the application’s ability to scale (out and
up) and performance bounds (minimum and maximum performance) are noted.
Based on the measured performance characteristics, different possible SLAs are identified. The
resources required and the costs involved for each SLA are also computed.
Once the customer agrees to the set of SLAs and the cost, the MSP starts creating different policies
required by the data center for automated management of the application. This implies that the
management system should automatically infer the amount of system resources that should be
allocated/de-allocated to/from appropriate components of the application when the load on the system
increases/decreases.
Pre-Production
Once the determination of policies is completed as discussed in previous phase, the application is
hosted in a simulated production environment.
It facilitates the customer to verify and validate the MSP’s findings on application’s runtime
characteristics and agree on the defined SLA. Once both parties agree on the cost and the terms and
conditions of the SLA, the customer sign-off is obtained. On successful completion of this phase the
MSP allows the application to go on-live.
Production
In this phase, the application is made accessible to its end users under the agreed SLA.
However, there could be situations when the managed application tends to behave differently in a
production environment compared to the preproduction environment.
This in turn may cause sustained breach of the terms and conditions mentioned in the SLA. Additionally,
customer may request the MSP for inclusion of new terms and conditions in the SLA.
If the application SLA is breached frequently or if the customer requests for a new non-agreed SLA, the
on-boarding process is performed again. In the case of the former, on-boarding activity is repeated to
analyze the application and its policies with respect to SLA fulfillment. In case of the latter, a new set of
policies are formulated to meet the fresh terms and conditions of the SLA.
Termination
When the customer wishes to withdraw the hosted application and does not wish to continue to avail
the services of the MSP for managing the hosting of its application, the termination activity is initiated.
On initiation of termination, all data related to the application are transferred to the customer and only
the essential information is retained for legal compliance. This ends the hosting relationship between the
two parties for that application, and the customer sign-off is obtained.
Goal:
• Provide common view of centralized file provide common view of centralized file
system, but distributed implementation.
• Ability to open & update any file on any machine on file on any machine on network
• All of synchronization issues and capabilities of shared local files local files
Files on GFS
• A single file can contain many objects (e.g. Web documents)
• Files are divided into fixed size chunks (64MB) with unique 64 bit identifiers
• IDs assigned by GFS master at chunk creation time
• Chunk servers store chunks on local disk as “normal” Linux files
• Reading & writing of data specified by the tuple (chunk_handle, byte_range)
GFS Master
• Files are replicated (by default 3 times) across all chunk servers
• Master maintains all file system metadata!
• Namespace, access control information, mapping from file to chunks, chunk locations, garbage
collection of orphaned chunks, chunk migration, …
• Heartbeat messages between master and chunk servers
• Is the chunk server still alive? What chunks are stored at the chunkserver?!
• To read/write data: client communicates with master (metadata operations) and chunk servers
(data)
CHUNKS
Chunks - Fixed size of 64MB ¨
Advantages
• Size of meta data is reduced
• Involvement of Master is reduced
• Network overhead is reduced
• Lazy space allocation avoids internal fragmentation
Disadvantages
• Hot spots
Solutions: increase the replication factor and stagger application start times; allow clients to read data
from other clients
YARN
Apache YARN (Yet Another Resource Negotiator) is Hadoop’s cluster resource management system.
YARN was introduced in Hadoop 2 to improve the MapReduce implementation, but it is general enough
to support other distributed computing paradigms as well.
YARN provides APIs for requesting and working with cluster resources, but these APIs are not typically
used directly by user code. Instead, users write to higher-level APIs provided by distributed computing
frameworks, which themselves are built on YARN and hide the resource management details from the
user.