UNIT V: APP IMPLEMENTATION IN CLOUD
Cloud providers Overview
Cloud providers are companies that offer cloud computing services, which enable users to store,
process, and manage their data and applications on remote servers over the internet. Here's an
overview of some of the major cloud providers:
1. Amazon Web Services (AWS): AWS is the largest cloud provider, offering a wide range of services,
including compute, storage, database, and networking. Some of their popular services include EC2, S3,
RDS, and Lambda.
2. Microsoft Azure: Azure is the second-largest cloud provider and is heavily focused on enterprise
customers. They offer a broad range of services, including compute, storage, database, networking, and
AI/ML. Popular services include VMs, Blob Storage, and Azure SQL Database.
3. Google Cloud Platform (GCP): GCP is Google's cloud offering and is known for its strength in AI/ML
services, as well as big data and analytics. Some of their popular services include Compute Engine, Cloud
Storage, and BigQuery.
4. IBM Cloud: IBM Cloud offers a broad range of services, including compute, storage, database, and
networking. They are known for their focus on enterprise customers and their expertise in AI/ML,
blockchain, and quantum computing.
5. Oracle Cloud Infrastructure (OCI): OCI is Oracle's cloud offering and is focused on providing enterprise
customers with high-performance computing services. They offer a wide range of services, including
compute, storage, database, and networking.
6. Alibaba Cloud: Alibaba Cloud is the largest cloud provider in China and is rapidly expanding globally.
They offer a wide range of services, including compute, storage, database, and networking, and are
focused on serving enterprise customers.
These are just a few of the major cloud providers available, and each has its strengths and weaknesses.
When choosing a cloud provider, it's important to consider factors such as cost, performance, reliability,
security, and the specific services you need.
Virtual Private Cloud
A Virtual Private Cloud (VPC) is a virtual network environment that allows you to create a private,
isolated section of a public cloud provider's infrastructure. With a VPC, you can control the virtual
networking environment, including IP address ranges, subnets, routing tables, and security settings.
A virtual private cloud (VPC) is a secure, isolated private cloud hosted within a public cloud. VPC
customers can run code, store data, host websites, and do anything else they could do in an ordinary
private cloud, but the private cloud is hosted remotely by a public cloud provider. VPCs combine the
scalability and convenience of public cloud computing with the data isolation of private cloud
computing. A virtual private cloud (VPC) is a private cloud within a public cloud; no one else shares the
VPC with the VPC customer.
Here are some of the benefits of using a VPC:
1. Security: With a VPC, you have complete control over the network security. You can set up your own
firewall rules, security groups, and access control lists to protect your resources.
2. Isolation: A VPC is an isolated environment that can't be accessed by other customers or the public
internet. This means that you have complete control over who can access your resources.
3. Customization: You can customize your VPC to suit your specific needs. You can choose your own IP
address range, configure your own subnets, and set up your own routing tables.
4. Scalability: A VPC is highly scalable, which means you can easily add or remove resources as needed.
5. Cost savings: By using a VPC, you can save money by avoiding the costs of setting up and maintaining
your own physical network infrastructure.
Some examples of VPC services offered by cloud providers include Amazon VPC, Azure Virtual Network,
and Google Cloud VPC.
Scaling (Horizontal and Vertical)
Scalability refers to the ability of a system to handle increasing amounts of workload or requests without
sacrificing performance or incurring excessive costs.
Scaling is the process of adding or removing computing resources to meet changing demand for an
application or service. There are two main types of scaling: horizontal scaling and vertical scaling.
1. Horizontal Scaling: Also known as "scaling out," horizontal scaling involves adding more instances of
a resource, such as servers or containers, to distribute the workload across multiple machines. This can
improve performance and increase availability.
For example, if a web application is receiving more traffic than a single server can handle, horizontal
scaling can be used to add more servers to handle the traffic. Horizontal scaling is usually achieved by
using load balancers to distribute traffic across the instances.
2. Vertical Scaling: Also known as "scaling up," vertical scaling involves increasing the resources, such
as CPU, memory, or storage, of a single instance to handle increased demand. This can be done by
upgrading the hardware specifications of the instance or by using cloud services that allow for dynamic
scaling. For example, if a database server is running out of memory, vertical scaling can be used to
increase the memory of the server.
Both horizontal and vertical scaling have their pros and cons.
Horizontal scaling can be more cost-effective, as it allows for better utilization of resources and can
handle sudden spikes in demand. However, it may require more effort to set up and manage.
Vertical scaling, on the other hand, is simpler to set up and manage, but may be more expensive and
less flexible.
Many cloud providers offer tools and services to facilitate horizontal and vertical scaling, such as load
balancers, auto-scaling groups, and dynamic resource allocation.
Virtual Machines, Ethernet and Switches
Virtual Machines (VMs), Ethernet, and Switches are all components of a network infrastructure.
1. Virtual Machines: A VM is a software emulation of a physical machine, running an operating system
and applications. VMs can run on a physical server or on a cloud platform, allowing multiple VMs to run
on a single physical machine. VMs provide flexibility and scalability for deploying and managing
applications.
2. Ethernet: Ethernet is a widely used technology for local area networks (LANs). It is a set of protocols
and standards for transmitting data packets between devices on a network. Ethernet is used for
connecting computers, servers, switches, and other network devices.
3. Switches: A switch is a network device that connects multiple devices on a network, allowing them to
communicate with each other. Switches use Ethernet to transmit data between devices on a network.
They are used to create LANs and can also be used to connect LANs together to create larger networks.
When a VM is running on a physical server, it can use Ethernet to communicate with other devices on
the network. In a cloud environment, VMs are usually connected to a virtual network, which is created
and managed by the cloud provider. The virtual network is typically connected to a virtual switch, which
is used to connect the VMs to each other and to other services in the cloud platform.
Overall, VMs, Ethernet, and Switches are essential components of modern network infrastructure,
providing flexibility, scalability, and connectivity for applications and services.
Docker Container
Docker is a popular open-source platform for developing, packaging, and running applications in
containers. A container is a lightweight, standalone executable package that contains everything needed
to run an application, including code, runtime, system tools, libraries, and settings. Docker containers
can be easily deployed and run on any system that supports Docker, including laptops, servers, virtual
machines, and cloud platforms.
Here are some of the key features and benefits of Docker containers:
1. Portability: Docker containers are portable across different environments, allowing you to build, test,
and deploy applications consistently across development, testing, and production environments.
2. Efficiency: Containers are lightweight and use fewer resources than traditional virtual machines,
making them more efficient to deploy and run.
3. Isolation: Docker containers provide a high level of application isolation, which helps to prevent
conflicts between applications and reduce security risks.
4. Modularity: Containers are modular, making it easy to build and manage complex applications as a set
of microservices.
5. Automation: Docker containers can be easily integrated into a continuous integration and delivery
(CI/CD) pipeline, allowing you to automate the build, test, and deployment of applications.
To use Docker, you need to create a Dockerfile, which is a text file that defines the application and its
dependencies, and then build a Docker image from the Dockerfile. The Docker image can then be used
to create Docker containers, which can be run on any Docker-supported platform.
Kubernetes
Kubernetes is an open-source container orchestration platform that automates the deployment, scaling,
and management of containerized applications. It was originally developed by Google and is now
maintained by the Cloud Native Computing Foundation (CNCF).
Control plane
The control plane is the component of Kubernetes that controls and manages the state and
configuration of the cluster. It consists of several components that communicate with each other
through the API server. The control plane components are:
API server: The central hub that exposes the Kubernetes API and processes all requests from clients and
other components.
etcd: A distributed key-value store that stores the cluster data in a consistent and reliable way.
scheduler: Responsible for assigning pods to nodes based on various factors such as resource
requirements, affinity rules, etc.
controller manager: Runs various controllers that handle different aspects of the cluster such as node
lifecycle, replication, service endpoints, etc.
cloud controller manager: Interacts with the underlying cloud provider to manage cloud-specific
resources such as load balancers, storage volumes, etc.
The control plane components can run on a single node or multiple nodes for high availability and fault
tolerance. The control plane node is also called the master node.
Kubernetes provides a set of abstractions and APIs for managing containerized applications, including:
1. Pods: The smallest deployable unit in Kubernetes, consisting of one or more containers that share
network and storage resources.
2. Services: A set of Pods that work together to provide a network service, such as a web application.
3. Deployments: A higher-level abstraction that manages the scaling and updating of a set of Pods.
4. ConfigMaps and Secrets: Resources for storing configuration data and sensitive information,
respectively.
Kubernetes provides several key benefits for deploying and managing containerized applications:
1. Scalability: Kubernetes provides automatic scaling of application instances based on resource usage
and demand.
2. Resilience: Kubernetes provides high availability by automatically restarting failed application
instances and redistributing workloads in case of hardware or software failures.
3. Portability: Kubernetes provides a consistent platform for deploying and managing containerized
applications across different cloud and on-premises environments.
4. Flexibility: Kubernetes supports a wide range of container runtimes, including Docker, rkt, and CRI-O,
and can run on a variety of operating systems and hardware architectures.
5. Automation: Kubernetes provides a powerful API and command-line tools for automating common
tasks such as deployment, scaling, and upgrades.
To use Kubernetes, you need to define the desired state of your application using configuration files and
apply them to a Kubernetes cluster. The Kubernetes control plane then takes care of managing the
application based on the desired state. Kubernetes can be deployed on a variety of cloud and on-
premises environments, including public clouds like AWS, Azure, and Google Cloud, as well as private
data centers