ASSIGNMENT - 1
Q. Briefly explain the cloud application, exploring the cloud computing stack,
which includes the properties of composability, infrastructure, platform, and
communication protocols.
Answer:-
The cloud creates a system where resources can be pooled and allocated as needed. Cloud
architecture combines software running on virtualized hardware in multiple locations to
provide an on-demand service to user-facing hardware and software. This unique
combination of abstraction and metered service distinguishes the architectural requirements
of cloud computing systems from the general description of an n-tiered Internet application.
Cloud computing is often described in terms of two architectural layers:
• A client as the front end
• The "cloud" as the back end
Composability
Applications built in the cloud often possess the characteristic of being composed of a
collection of components, a feature known as composability. A composable system uses
components to assemble services tailored for a specific purpose using standard parts. A
composable component must be:
• Modular: A self-contained and independent unit that is cooperative, reusable, and
replaceable.
• Stateless: A transaction executed independently of other transactions or requests.
Although cloud computing doesn’t require hardware and software to be composable, it is a
highly desirable characteristic from a developer’s or user’s standpoint because it simplifies
system design and makes solutions more portable and interoperable.
Infrastructure
Most large Infrastructure as a Service (IaaS) providers rely on virtual machine technology to
deliver servers that can run applications. Virtual servers, described in terms of a machine
image or instance, often have characteristics comparable to real servers, delivering a certain
number of microprocessor (CPU) cycles, memory access, and network bandwidth to
customers.
Virtual machines are containers assigned specific resources. The software running within
these virtual machines defines the utility and functionality of the cloud computing system.
The Virtual Machine Monitor (VMM), also called a hypervisor, is low-level software that
allows different operating systems to run in their own memory space and manages I/O for
the virtual machines.
Platforms
A platform in the cloud is a software layer used to create higher levels of service. Many
different Platform as a Service (PaaS) providers offer services that provide developers with
various capabilities, such as:
• Salesforce.com's Force.com Platform
• Windows Azure Platform
• Google Apps and the Google App Engine
These services offer all the hosted hardware and software needed to build and deploy web
applications or services custom-built by the developer within the context and range of
capabilities the platform allows. Platforms represent nearly the full cloud software stack,
missing only the presentation layer that serves as the user interface.
Virtual Appliances
Applications such as a web server or database server that can run on a virtual machine
image are referred to as virtual appliances. Virtual appliances are installed on virtual servers
as application modules intended for a machine instance.
A virtual appliance is a common deployment object in the cloud, and it is one area where
there is considerable activity and innovation. One major advantage of a virtual appliance is
that it can be used as the basis for assembling more complex services, serving as one of the
standardized components. However, virtual appliances are also much larger than the
applications themselves because they are usually bundled with the operating system on
which they are meant to run.
Communication Protocols
Cloud computing arises from services available over the Internet communicating using the
standard Internet protocol suite, underpinned by the HTTP and HTTPS transfer protocols.
Other protocols and standards that expose compute and data resources in the cloud either
format data or communications in packets sent over these transport protocols.
To engage in interprocess communication (IPC), many client/server protocols have been
applied to distributed networking over the years. Various forms of Remote Procedure Call
(RPC) implementations attempt to solve the problem of engaging services and managing
transactions over a stateless network. The first truly Web-centric RPC technology was XML-
RPC, which uses platform-independent XML data to encode program calls transported over
HTTP.
As Internet computing became more established, several efforts began to better define
methods for describing and discovering services and resources. The most widely used
message-passing standard today is the Simple Object Access Protocol (SOAP), which replaces
XML-RPC. SOAP uses XML for its messages and employs RPC and HTTP for message passing.
SOAP forms the basis for most Web services stacks in use today.
Several standards have emerged to allow the discovery and description of Web-based
resources. The most commonly used model for discovery and description with SOAP
messaging is the Web Services Description Language (WSDL), a World Wide Web Consortium
Internet standard. WSDL lets a Web service advertise itself in terms of a collection of
endpoints or ports associated with a specific network address (URL) that can be addressed
using XML messages to provide a service.
Application
Although the cloud computing stack encompasses many details that describe how clouds are
constructed, it is not a perfect vehicle for expressing all the considerations that must be
accounted for in any deployment. An important gap arises from the nature of distributed
Web applications and the design of Internet protocols as a stateless service. The Internet
was designed to treat each request made to a server as an independent transaction.
Therefore, the standard HTTP commands are all atomic in nature: GET to read data, PUT to
write data, and so on.
ASSIGNMENT - 2
Q. How to define cloud capacity by defining baselines and matrices
Answer:-
Capacity Planning
• Capacity planning in cloud computing refers to the process of determining the
amount of resources, such as computing power, storage, and network bandwidth,
needed to meet the demands of an application or workload in a cloud environment.
• It involves predicting the future usage patterns of an application or service and
ensuring that there are enough resources available to handle the anticipated
workload.
• In simple words, capacity planning is like predicting how much food you'll need for a
party, so you can make sure you have enough food to feed all your guests without
running out or wasting too much.
• Let's take an example of a company that provides an online streaming service for
movies and TV shows. The company needs to plan the capacity of their cloud
infrastructure to handle the expected traffic during peak hours, such as on weekends
or holidays.
• The capacity planning process involves analysing the historical usage patterns of the
service, identifying peak usage periods, and estimating the future growth of the
service. Based on this analysis, the company can allocate the necessary resources to
meet the demands of the service during peak periods.
• Overall, capacity planning is a crucial aspect of cloud computing that helps ensure
that cloud infrastructure can handle the demands of an application or service,
provide optimal performance, and avoid downtime or service disruptions.
Capacity Planning Steps
i. Determine the distinctiveness of the present system.
ii. Determine the working load for different resources in the system such as CPU, RAM,
network, etc.
iii. Load the system until it gets overloaded; & state what's requiring to uphold
acceptable performance.
iv. Predict the future based on older statistical reports & other factors.
v. Deploy resources to meet the predictions & calculations.
vi. Repeat step (i) through (v) as a loop.
Benefits
• Helps organisations optimise resource utilisation and avoid overprovisioning, which
can result in unnecessary costs.
• Enables organisations to plan for growth and scale their systems and applications as
needed.
• Reduces the risk of downtime or performance degradation due to inadequate
capacity.
• Improves the user experience by ensuring that the system or application can handle
expected workloads.
• Helps organisations meet SLAs and other performance requirements.
Limitations
• Capacity planning requires accurate data and assumptions about future demand,
which can be difficult to obtain or predict.
• Capacity planning can be time-consuming and resource-intensive, requiring
specialised expertise and tools.
• Capacity planning is an ongoing process, and capacity planners must continuously
monitor and adjust the capacity plan based on changing demand patterns and other
factors.
• Overprovisioning can still occur if the capacity plan is too conservative or if there are
unexpected spikes in demand that were not anticipated.
• Capacity planning is not a guarantee of performance or availability, and other factors,
such as network congestion or software bugs, can still impact system performance.
Introduction Baseline Measurements
• A baseline is a starting point or a reference point that is used to measure the
performance or capacity of an application or system in a cloud computing
environment.
• Baseline measurements provide a snapshot of the current state of the system and
serve as a reference point for future capacity planning activities.
• In simple words, a baseline is like taking a picture of a room before you start
redecorating, so you can compare the before and after pictures to see how much the
room has changed.
• Baseline measurements may include various performance metrics, such as CPU
utilisation, memory usage, disk I/O, network throughput, response time, and error
rate.
• These metrics are collected over a period of time, such as a week or a month, to
capture the variability in the system or application behaviour over different time
periods.
• For example, a baseline measurement of a web server may include the average
number of requests per second, the average response time, and the CPU and
memory usage during peak hours. This baseline measurement can then be used to
determine the required capacity to handle anticipated increases in traffic, such as
during a holiday season or a promotional campaign.
Types of Baseline Measurements:
1. Static Baseline: A static baseline is a set of measurements that is collected once and
used as a reference point for future capacity planning activities. This type of baseline
is useful for systems or applications that have predictable usage patterns and do not
experience significant changes over time.
2. Dynamic Baseline: A dynamic baseline is a set of measurements that is continuously
updated over time to reflect changes in the system or application behaviour. This
type of baseline is useful for systems or applications that experience significant
fluctuations in usage patterns and require frequent adjustments to capacity.
Introduction Metrics Baseline Measurements
• In capacity planning, a metrics baseline is a set of performance metrics that are used
to measure the performance of a system or application over time.
• The metrics baseline provides a historical record of how the system or application
has performed under various load conditions and helps to identify trends and
patterns in system behaviour.
• The metrics baseline includes various performance metrics, such as CPU utilisation,
memory usage, disk I/O, network throughput, response time, and error rate.
• These metrics are collected at regular intervals, such as every minute or every hour,
to provide a detailed picture of the system or application behaviour over time.
• For example, if we consider a web application, the metrics baseline may include the
average response time, the number of requests per second, the number of
concurrent users, and the server's CPU and memory usage.
Types of Metrics Baseline Measurements:
• Performance Baseline: A performance baseline is a set of metrics that measure
the performance of a system or application under normal operating conditions.
This baseline is used to determine the minimum and maximum resource
requirements needed to meet performance requirements.
• Capacity Baseline: A capacity baseline is a set of metrics that measure the
capacity of a system or application to handle a specific workload. This baseline is
used to determine the maximum load that a system or application can handle
without impacting performance.
• Growth Baseline: A growth baseline is a set of metrics that measure the growth
of a system or application over time. This baseline is used to predict future
resource requirements and plan for future growth.
System Metrics
• System metrics are quantitative measurements used to assess the performance of a
system or application in a cloud computing environment. These metrics provide
information on various aspects of the system, such as resource utilisation, response
time, and error rates.
• In simple words, system metrics are like the vital signs of a human body, providing
information on the health and performance of the system
The system metrics can be broadly classified into the following categories:
1. CPU Utilisation: This metric measures the percentage of time that the CPU is
busy processing instructions. High CPU utilisation can indicate that the system
is experiencing a heavy workload or that a process or application is
consuming a lot of resources.
2. Memory Usage: This metric measures the amount of memory used by the
system or an application. High memory usage can indicate that the system is
running low on available memory, which can lead to performance
degradation or crashes.
3. Disk I/O: This metric measures the read and write operations performed on
the disk. High disk I/O can indicate that the system is experiencing heavy disk
usage or that an application is performing a lot of file operations.
4. Network Bandwidth: This metric measures the amount of data transmitted
and received over a network interface. High network bandwidth usage can
indicate that the system is experiencing heavy network traffic or that an
application is consuming a lot of bandwidth.
5. Response Time: This metric measures the time taken by the system to
respond to a request. High response time can indicate that the system is
under heavy load or that an application is taking too long to process requests.
6. Error Rate: This metric measures the number of errors that occur in the
system or an application. High error rates can indicate that the system or
application is experiencing issues or that there are bugs in the software.
• For example, if we consider a database system, some of the system metrics that may
be monitored include CPU utilisation, memory usage, disk I/O, and response time. By
monitoring these metrics over time, capacity planners can identify trends and
patterns in system behaviour, which can help in optimising system performance and
planning for future resource requirements.
• These system metrics can be used to establish a baseline measurement of the
application's performance, as explained in the previous question. They can also be
used to identify performance bottlenecks and areas that need improvement.
Load Testing
• Load testing is a type of performance testing used in capacity planning to evaluate
how well a system or application can handle a specific workload. It involves
simulating a high volume of user traffic to the system or application and measuring
the system's response under heavy load conditions.
• The purpose of load testing is to identify the performance bottlenecks and capacity
constraints of a system or application.
• By conducting load testing, capacity planners can estimate the maximum number of
users or transactions that the system can handle and identify the resources required
to meet the expected workload.
• Load testing involves creating a test environment that simulates the expected real-
world workload.
• This can be done by using specialised software tools that generate a large number of
requests to the system or application under test.
• The load testing tool monitors the system's response time, throughput, and error
rate during the test, and generates reports that can be used to identify performance
issues.
• For example, a capacity planner may conduct load testing on a web application that
is expected to receive a high volume of traffic during a sale event. The load testing
tool would simulate a large number of concurrent users accessing the web
application and measure the response time, throughput, and error rate of the system
under the heavy load. Based on the results of the load testing, the capacity planner
can identify the resources required to meet the expected workload and optimise the
system's performance to handle the expected traffic.
• Load testing can also help in identifying the scalability of the system. It can provide
insights into how the system behaves when the workload is increased beyond the
current capacity.
• This information can be used to plan for future resource requirements and to ensure
that the system can handle the expected growth in user traffic.
Resource Ceilings
• Resource ceilings in capacity planning refer to the maximum amount of resources
that can be allocated to a system or application in a cloud computing environment.
• These ceilings are set to ensure that the system does not exceed its allocated
resources and impact the performance of other systems in the environment.
• In simple words, resource ceilings are like setting a limit on how much water can flow
through a pipe to prevent it from bursting.
• Let's consider an example of a company that provides an online booking service for
hotels. The company has a cloud computing environment with multiple systems and
applications running on it. To ensure that each system gets its fair share of resources,
resource ceilings are set for each system, limiting the maximum amount of resources
that can be allocated to it.
• For instance, the booking system may be allocated a maximum of 20% of the
available CPU capacity, 30% of the available memory, and 25% of the available
network bandwidth. This ensures that the booking system does not consume too
many resources, causing other systems to slow down or become unresponsive.
• Resource ceilings are typically set based on the capacity planning requirements and
the performance needs of the system or application. For example, if the booking
system experiences increased usage during peak periods, such as holidays or
weekends, the resource ceilings may need to be adjusted to ensure that the system
has enough resources to handle the increased workload.
• In addition to setting resource ceilings, it is also important to monitor the usage of
resources to ensure that systems are not exceeding their allocated resources.
• If a system exceeds its resource ceiling, it may impact the performance of other
systems in the environment, leading to service disruptions and downtime.
• Overall, resource ceilings are an important aspect of capacity planning, ensuring that
systems and applications in a cloud computing environment have the necessary
resources to operate efficiently while preventing resource contention and
performance issues.
Server and Instance Types: Network Capacity and Scaling
Server Types
• A server type refers to the physical server hardware that is used to run applications
or services. Server types can vary in terms of processing power, memory capacity,
storage capacity, and other factors.
• The choice of server type depends on the specific needs of the application or service
that will be running on it.
• For example, a web application that requires a high amount of processing power and
memory capacity may require a server type with multiple CPUs and large amounts of
RAM. On the other hand, a file server that requires a high storage capacity may
require a server type with multiple hard drives or solid-state drives (SSDs).
Instance Types
• An instance type refers to a virtual server that is created within a cloud computing
environment.
• Cloud service providers, such as AWS or Microsoft Azure, offer a variety of instance
types to meet different application requirements.
• Each instance type has a specific configuration of processing power, memory,
storage, and network capacity.
• For example, an AWS EC2 instance type optimised for compute-intensive workloads
may have a high number of CPUs and large amounts of RAM, while an instance type
optimised for memory-intensive workloads may have a large amount of RAM and
lower CPU counts.
Network Capacity
• Network capacity refers to the amount of bandwidth available to a server or
instance.
• Bandwidth is the amount of data that can be transmitted over a network connection
in a given amount of time.
• Network capacity is important for applications that require high-speed data transfer,
such as web applications or video streaming services.
• For example, a video streaming service may require a high amount of network
capacity to deliver high-quality video content to users. In this case, a server or
instance type with high network capacity would be necessary to ensure a smooth
viewing experience for users.
Scaling
• Scaling refers to the ability of a system to increase or decrease the amount of
computing resources allocated to it in response to changes in demand. Scaling can be
done vertically or horizontally.
• Vertical scaling involves adding more resources to a single server or instance, such as
adding more CPUs or memory.
• This can be useful for applications that have a high amount of processing power or
memory requirements.
• Horizontal scaling involves adding more servers or instances to a system, such as
creating a cluster of web servers.
• This can be useful for applications that have a high amount of network traffic or
require high availability.
• In summary, server and instance types, network capacity, and scaling are important
considerations in capacity planning and cloud computing.
• The choice of server or instance type depends on the specific needs of the
application or service that will be running on it, while network capacity and scaling
are important factors in ensuring optimal performance and scalability.