Agce Unit 1 Notes
Agce Unit 1 Notes
Agce Unit 1 Notes
4NM20IS088
UNIT 1
CHAPTER 1
1.What are the Five fundamental characteristics of cloud computing?
1. On-demand self-service: Cloud computing allows users to instantly access and manage computing
resources, such as virtual machines or storage, without requiring manual intervention from the cloud
service provider. Users have the freedom to provision resources on their own, as needed, without
relying on traditional IT processes.
2. Broad network access: Cloud services are accessible over the network, typically the internet, from
various devices. Users can access cloud applications and data anytime, anywhere, using different
devices like laptops, smartphones, or tablets. This characteristic enables remote access and flexibility
in terms of accessing cloud resources.
3. Resource pooling: Cloud computing providers combine and allocate their computing resources to
serve multiple users simultaneously. This pooling of resources allows for efficient utilization and
optimization, as multiple users share the same underlying infrastructure while maintaining isolation
and security.
4. Rapid elasticity: Cloud computing enables users to quickly scale their resources up or down based
on demand. This characteristic allows for the seamless allocation of additional computing resources
during peak usage periods and the release of those resources when they are no longer required. Users
can dynamically adjust their resource allocation to match their needs, ensuring scalability and cost
optimization.
5. Measured service: Cloud computing providers measure and monitor resource usage to enable
transparent billing and pricing models. Users are billed based on the actual consumption of resources,
such as computing power, storage, network bandwidth, and data transfer. This characteristic provides
cost transparency, allowing users to understand and optimize their resource usage and costs.
1. Foundation: Just as a city infrastructure requires a solid foundation of roads, bridges, and utilities,
an IT infrastructure needs a robust foundation of hardware, network infrastructure, and data centers
to support the flow of information.
2. Connectivity: In a city, roads and transportation systems connect different areas and enable the
movement of people and goods. Similarly, in an IT infrastructure, networks and communication
channels connect devices, servers, and systems, allowing the flow of data and information.
3. Services: A city infrastructure provides various services such as electricity, water supply, and waste
management to meet the needs of its residents. Similarly, an IT infrastructure delivers services such
as storage, computing power, and network connectivity to support applications, data processing, and
user interactions.
4. Scalability: City infrastructure is designed to accommodate the growth and changing needs of its
population. Similarly, an IT infrastructure should be scalable, allowing for the addition of new
hardware, expansion of network capacity, and allocation of resources to meet increasing demands.
5. Security and Resilience: Both city infrastructure and IT infrastructure require measures to ensure
security and resilience. In a city, security measures, such as surveillance systems and emergency
services, protect residents and infrastructure. In an IT infrastructure, security protocols, firewalls, and
data backup mechanisms safeguard data and systems from threats.
These three models represent different levels of abstraction and responsibility in the cloud computing
stack. IaaS provides the most flexibility and control over infrastructure, PaaS simplifies application
development and deployment, and SaaS offers ready-to-use applications without infrastructure or
platform management overheads. Organizations can choose the appropriate model based on their
specific needs, resources, and level of control they require.
Google Cloud Architecture refers to the infrastructure, services, and design principles provided by
Google Cloud Platform (GCP) for building and deploying applications and services in the cloud. Here
are some key aspects of Google Cloud Architecture:
1. Global Infrastructure: Google Cloud offers a global network of data centers located in various
regions worldwide. This infrastructure allows for high availability, low-latency networking, and data
redundancy across different geographic locations.
2. Compute Services: Google Cloud provides various compute services, including Compute Engine
for virtual machines, Kubernetes Engine for containerized applications, and App Engine for scalable
web applications. These services enable flexible and scalable computing power for running
applications.
3. Storage and Database Services: Google Cloud offers a range of storage options, such as Cloud
Storage for object storage, Cloud SQL for managed relational databases, and Cloud Spanner for
horizontally scalable, globally consistent databases. These services provide reliable and scalable
storage solutions for data management.
4. Networking and Load Balancing: Google Cloud provides robust networking capabilities, including
Virtual Private Cloud (VPC) for creating isolated networks, Cloud Load Balancing for distributing
traffic across instances, and Cloud CDN for content delivery. These features ensure efficient network
management, scalability, and performance.
5. Big Data and Analytics: Google Cloud offers services like BigQuery for serverless data
warehousing and analytics, Dataflow for data processing pipelines, and Pub/Sub for real-time
messaging. These services enable the processing, analysis, and visualization of large-scale data.
6. AI and Machine Learning: Google Cloud provides various AI and machine learning services,
including AutoML for custom machine learning models, AI Platform for model development and
deployment, and Vision API for image recognition. These services allow developers to leverage
Google's AI capabilities in their applications.
Google Cloud Architecture provides a comprehensive suite of services and features that enable
organizations to build, deploy, and scale their applications and services in a flexible, secure, and
efficient manner.
7. What is the purpose of Google Cloud regions and zones, and how do they contribute to the
reliability and availability of applications deployed on Google Cloud Platform?
Google Cloud divides its global infrastructure into regions and zones to ensure high availability, fault
tolerance, and low-latency networking. Here's an explanation of Google Cloud regions and zones:
1. Regions: Google Cloud regions are geographic areas that contain one or more data centers. Each
region is independent and isolated, providing redundancy and resilience. Regions are identified by
unique names and are designed to provide coverage and proximity to users and applications.
2. Zones: Zones are isolated data centers within a region. Each zone within a region is independent
and has its own power, cooling, and networking infrastructure. Zones are designed to be physically
and logically separate, ensuring fault tolerance and availability. Zones within a region are connected
through low-latency, high-bandwidth network links.
The combination of regions and zones allows users to deploy applications and resources across
multiple geographical locations for redundancy and resilience. By distributing workloads across
different zones within a region, users can achieve high availability and protect against failures in a
single zone.
Account or Subscription Level: Resources are organized into separate accounts or subscriptions for
administrative purposes, including billing and access controls.
Region Level: Regions represent geographical locations where cloud resources are deployed,
providing options for proximity, compliance, and redundancy.
Availability Zone Level: Availability zones are physically separate data centers within a region,
ensuring fault tolerance and high availability by isolating resources.
Resource Group or Project Level: Resources are grouped together within a project or resource group
for efficient management, organization, and control, with separate permissions and policies.
Resource Level: Individual resources such as virtual machines, storage, databases, or networking
components, each with their own configurations, settings, and access controls.
CHAPTER -2
1.What are the four different methods available for interacting with Google Cloud Platform
(GCP)?
1. Google Cloud Console: The Google Cloud Console is a web-based graphical user interface (GUI)
that allows users to manage and interact with Google Cloud Platform (GCP) resources. It provides a
user-friendly interface for tasks such as creating and managing virtual machines, configuring
networking, monitoring usage, and deploying applications.
• Centralized console for all project data.
• Execute common tasks using simple mouse clicks.
• Manage and create projects.
• Access developer tools:
o Cloud Source Repositories
o Cloud SDK
o Cloud Shell
• Access to product APIs
2. Cloud SDK and Cloud Shell: The Cloud SDK is a set of command-line tools and libraries that
enables developers to interact with GCP from their local machine. It includes tools for deploying
applications, managing resources, and running administrative tasks. Cloud Shell, on the other hand,
provides an interactive shell environment directly within the Google Cloud Console, allowing users
to execute commands and access the Cloud SDK without requiring local installations.
3. REST-based API: GCP exposes a set of REST-based APIs that developers can utilize to
programmatically interact with GCP services. These APIs allow users to perform operations such as
creating and managing resources, retrieving data, and configuring services. By leveraging the REST-
based APIs, developers can integrate GCP services into their own applications and systems.
4. Cloud Console Mobile App: The Cloud Console mobile app allows users to access and manage
their GCP resources directly from their mobile devices. It provides a simplified interface for
monitoring and managing resources on the go, enabling users to check service status, receive
notifications, and perform basic administrative tasks from their mobile devices.
- Pay-as-you-go: With the pay-as-you-go model, you are billed only for the resources you use,
such as compute instances, storage, networking, and API requests. The pricing is typically based on
usage duration, data transfer volume, storage capacity, and specific service usage.
- Committed Use Discounts: GCP offers discounts for committing to use specific resources, such
as virtual machines or BigQuery slots, for a certain duration (1 or 3 years). These commitments can
result in significant cost savings.
2. Pricing Calculator: GCP provides a pricing calculator on its website. This tool allows you to
estimate the cost of using different services and resources based on your projected usage patterns. It
helps in understanding the potential costs and optimizing resource selection.
3. Billing Account: To use GCP services, you need to create a billing account. The billing account is
linked to a payment method, such as a credit card or bank account, and serves as the billing entity
for all the projects associated with it.
4. Billing Cycle: GCP operates on a monthly billing cycle. At the end of each month, GCP generates
an invoice for the usage incurred during that period. The invoice includes detailed information about
the services used and their associated costs.
5. Budgets and Alerts: GCP allows you to set budget limits and receive alerts when your usage or
costs approach or exceed the defined thresholds. This helps in controlling expenses and avoiding
unexpected charges.
6. Cost Monitoring and Reporting: GCP provides various tools and features to monitor and analyze
your costs. The Google Cloud Console offers cost management features, including budget tracking,
spending alerts, and usage reports. Additionally, you can leverage tools like Cloud Monitoring,
Cloud Logging, and Cloud Trace to gain insights into resource usage and optimize costs.
7. Support and Billing Assistance: GCP provides various support options, including billing support,
to help address any billing-related queries or issues. You can reach out to the GCP support team for
assistance with billing inquiries.
3. What are the three identifying attributes of projects in Google Cloud Platform, and how do
they contribute to organizing and managing resources within GCP?
Cloud Shell is used alongside the Cloud Console to enhance the user experience and provide a more
flexible and interactive environment for managing resources in Google Cloud Platform (GCP).
1. Command-Line Interface: Cloud Shell provides a built-in command-line interface (CLI) within the
Cloud Console for executing commands and interacting with GCP resources.
2. Accessibility: Cloud Shell is accessible from any web browser, eliminating the need for local
installations and making it convenient across devices and operating systems.
3. Pre-installed Tools and Libraries: Cloud Shell comes with pre-installed tools, utilities, and
programming language runtimes for managing GCP resources.
4. Persistent Home Directory: Cloud Shell provides a persistent storage space to store files and
configurations across sessions, ensuring easy access to project-specific resources.
5. Integration with Cloud Console: Cloud Shell seamlessly integrates with the Cloud Console,
allowing users to switch between graphical and command-line interfaces without losing context.
6. Collaboration and Sharing: Cloud Shell enables collaboration and sharing by allowing users to
share their sessions with team members for troubleshooting or code reviews.
7. Resource Management: Cloud Shell provides direct access to GCP resources and services, enabling
users to manage and interact with projects and resources from the command line.
In the context of Google Cloud Platform (GCP), APIs play a crucial role in enabling developers to
interact with GCP services and resources.
2. RESTful APIs:
GCP APIs are typically RESTful, following the principles of Representational State Transfer
(REST). RESTful APIs use HTTP methods like GET, POST, PUT, and DELETE to perform actions
on resources. Developers can make HTTP requests to these APIs, passing parameters and receiving
responses in standard data formats such as JSON or XML.
3. Authentication and Authorization:
GCP APIs employ authentication and authorization mechanisms to ensure secure access.
Developers need to authenticate their requests using authentication credentials, such as API keys,
service accounts, or OAuth tokens. Authorization is managed through IAM (Identity and Access
Management) policies, allowing fine-grained control over which users or services have access to
specific APIs and resources.
4. Client Libraries:
GCP offers client libraries for various programming languages, which provide pre-built functions
and classes to simplify API integration. These client libraries handle low-level details of API
communication, making it easier for developers to interact with GCP services. The libraries also
provide language-specific idioms and conventions, improving the developer experience.
APIs in GCP enable developers to interact with GCP services, access resources, and perform
operations. They follow RESTful principles, require authentication and authorization, and are
documented comprehensively. GCP also offers client libraries and API management features to
facilitate API integration and management.
Client server architecture: RESTful APIs are built with a client-server architecture, meaning that the
client sends a request to the server and the server sends back a response.
Stateless: RESTful APIs are stateless, meaning that each request made by the client to the server
contains all the information necessary for the server to fulfill the request, without relying on any
previous requests or server-side storage. This is why every authenticated REST request has to carry
an authentication token in the request headers.
Cacheability: It is important to utilize methods to reduce the load on the server. Therefore, RESTful
APIs implement some sort of caching. This means that the API responses can be cached by the client,
allowing for faster response times in subsequent requests for the same resource. This reduces the load
on the server and improves performance, as the server does not need to generate the same response
for each request.
Layered System: Future-proof APIs should be modular and each module should be updatable or
swappable transparently. Hence, REST requires the APIs to be designed as a layered system, where
the client interacts with the server through a single endpoint, while the server can interact with
multiple backend systems.
Code-On-Demand: This is an optional characteristic as it can lead to unintended side effects and
exploits. This characteristic means that the server can send back code to be executed by the client
instead of data. This can help extend the functionality of the client and lead to more dynamic and
customizable interactions.
Uniform Interface: This means that the API uses a common set of methods, such as GET, POST, PUT,
and DELETE, to access resources, and a standard format, such as JSON or XML, for requests and
responses. This makes it easier for clients to understand and interact with the API, as all resources are
accessed in a consistent manner
7. How can client libraries be used to create and manage resources in Google Cloud Platform?
Client libraries in Google Cloud Platform (GCP) provide convenient and efficient ways to create and
manage resources within various GCP services. By leveraging these libraries, developers can interact
with GCP services using programming languages of their choice without dealing with low-level API
details. Here's how client libraries can be used for resource management.
CHAPTER 3
4. Cloud Functions: Cloud Functions is a serverless compute platform that allows you to write and
deploy code in response to events. You can execute code in a serverless environment without
provisioning or managing any infrastructure. Cloud Functions scales automatically based on the
incoming requests.
These services offer a range of compute options on Google Cloud, from managing virtual machines
and deploying applications to running serverless functions and managing containerized workloads
using Kubernetes.
To configure elastic apps with autoscaling, we can leverage the capabilities of Google Cloud's App
Engine and its automatic scaling features
1. Define Autoscaling Policies: Set up rules and conditions that determine when scaling actions should
be triggered based on metrics such as CPU utilization or request rate thresholds.
2. Create an Instance Group: Group virtual machine instances together to manage them as a single
entity, specifying characteristics like machine type and network configuration.
3. Configure Autoscaling Parameters: Define the minimum and maximum number of instances in the
group and specify scaling policies and metrics to monitor.
4. Monitoring Metrics: Continuously track metrics related to instances, such as CPU utilization or
request rate, to assess workload and resource utilization.
5. Scaling Triggers: When monitored metrics cross predefined thresholds, scaling actions are
triggered, such as adding or removing instances from the group.
6. Scaling Actions: The Autoscaler interacts with the Instance Group to perform scaling actions,
automatically adding or removing instances as needed.
7. Data and Storage: If your application relies on Cloud Storage, autoscaled instances can interact
with it for data storage and retrieval purposes.
8. Continuous Monitoring and Adjustment: The Autoscaler continuously monitors metrics, reassesses
resource requirements, and adjusts the number of instances in the group to adapt to changing
workloads while maintaining performance and resource efficiency.
Scale-Out Policy Decision: Determine the conditions under which your application should scale out
by adding more instances. Consider factors such as increased request rate, high CPU utilization, or
other relevant metrics. Decide on the thresholds and rules that trigger scale-out actions to
accommodate increased demand.
Scale-In Policy Decision: Determine the conditions under which your application should scale in by
reducing the number of instances. Consider factors such as decreased request rate, low CPU
utilization, or other relevant metrics. Decide on the thresholds and rules that trigger scale-in actions
to optimize resource utilization.
Google App Engine offers two different environments for hosting and running applications: the
Standard Environment and the Flexible Environment.
1. App Engine Standard Environment: It is a fully managed and serverless environment designed
to run applications that follow certain constraints and restrictions. The standard environment provides
automatic scaling, load balancing, and high availability for applications. It supports multiple
programming languages, including Python, Java, PHP, and Go. However, the standard environment
has some limitations in terms of the libraries and runtime environments that can be used, and it does
not allow writing to the local file system.
2. App Engine Flexible Environment: It provides a more flexible and customizable environment
compared to the standard environment. It allows you to run applications in containers using Docker,
giving you more control over the runtime environment. You can use custom runtime environments
and install additional software packages or libraries. The flexible environment supports a broader
range of programming languages and frameworks. It also provides automatic scaling, load balancing,
and high availability, but at a slightly higher cost compared to the standard environment.
App Engine addresses the key needs of developers
Google App Engine provides multiple storage options, automatic scaling, load balancing, app
versioning, monitoring and logging, and security features.
1. Multiple storage options: App Engine offers Google Cloud Datastore and Google Cloud Storage
for flexible and scalable data storage.
2. Automatic scaling: App Engine dynamically adjusts resources to handle varying levels of traffic
without manual intervention.
3. Load balancing: Built-in load balancing evenly distributes traffic across multiple instances of the
application for improved performance.
4. App versioning: Multiple versions of the application can be managed, allowing for easy
deployment of updates and control over traffic splitting.
5. Monitoring and logging: App Engine provides built-in monitoring and logging capabilities for
tracking performance metrics and capturing application events and errors.
6. Security: App Engine includes features such as SSL/TLS encryption, access controls, and request
filtering to ensure the security of applications and data.
1. Connect and Extend Cloud Services: Cloud Functions allows you to connect and extend other cloud
services within your application ecosystem. You can integrate with various Google Cloud services,
such as Cloud Storage, Firestore, Pub/Sub, and BigQuery, as well as external services through HTTP
requests and APIs.
2. Events and Triggers: Cloud Functions are triggered by events from different sources and services.
These events can include HTTP requests, changes in cloud storage, messages from Pub/Sub, database
updates, or even scheduled cron jobs. Triggers provide the mechanism to initiate the execution of
functions based on these events.
3. Serverless: Cloud Functions follows a serverless computing model, where you focus solely on
writing the function code without having to worry about managing servers or infrastructure. Google
Cloud takes care of automatically provisioning and scaling the necessary resources to run the
functions based on demand. This serverless approach eliminates the need for capacity planning and
allows for efficient resource utilization.
Infrastructure as a Service (IaaS) virtualizes the hardware layer, providing virtualized resources
to users over the internet. In an IaaS model, the underlying physical infrastructure, including
servers, storage, and networking, is abstracted and made available as virtual resources.
Here's how IaaS virtualizes the hardware:
1. Virtual Machines (VMs): IaaS providers offer virtual machines that emulate the functionality of
physical servers. These VMs run on the provider's infrastructure but appear as independent, isolated
instances to users. Each VM includes a virtualized CPU, memory, storage, and network interfaces.
2. Hypervisor: The hypervisor is a software layer that allows multiple VMs to run on a single
physical server. It abstracts the physical hardware resources and manages the allocation and sharing
of those resources among the VMs. The hypervisor ensures that each VM operates in its own
isolated environment.
3. Storage Virtualization: IaaS providers offer virtualized storage resources that can be allocated and
managed by users. Virtual disks or block storage are created and attached to VMs, providing
persistent storage for applications and data. Storage virtualization enables scalability, data
redundancy, and snapshot-based backups.
4. Network Virtualization: IaaS platforms virtualize the networking infrastructure, allowing users to
define virtual networks, subnets, and security groups. Users can configure network settings and
establish connectivity between VMs and other resources. Network virtualization provides isolation,
security, and flexibility in networking configurations.
By virtualizing the hardware layer, IaaS abstracts the complexities of physical infrastructure
management. Users can provision and manage virtual resources as needed, without the need to
invest in and maintain physical hardware. This allows for greater flexibility, scalability, and cost-
efficiency in deploying and managing IT infrastructure.
CHAPTER 4
Cloud Storage:
Cloud storage refers to a service that allows you to store, manage, and retrieve data over the internet
using remote servers maintained by a cloud service provider. Instead of storing data on local
physical storage devices, cloud storage enables you to store and access data from anywhere, at any
time, using the internet.
Cloud Storage files are organized into buckets
Globally unique name
Location (region, dual-region, or multi-region)
Storage class
Cloud SQL and Cloud Spanner are both Google Cloud database services, but they differ in terms
of their data models, scalability, and use cases. Here's a comparison between Cloud SQL and Cloud
Spanner:
Cloud SQL:
- Data Model: Cloud SQL is a fully managed relational database service that supports popular
relational database management systems (RDBMS) like MySQL, PostgreSQL, and SQL Server. It
provides a familiar SQL-based data model with tables, rows, and columns.
- Scalability: Cloud SQL offers vertical scalability, allowing you to scale the resources (CPU, RAM,
storage) of your database instance based on demand. It supports automatic backups, replication, and
failover for high availability but has some limitations in terms of scalability and distributed
transactions.
- Use Cases: Cloud SQL is suitable for traditional relational database workloads and applications
where the data model is well-defined and follows relational principles. It is a good choice for
applications that require ACID (Atomicity, Consistency, Isolation, Durability) transactions and have
lower scalability requirements.
Cloud Spanner:
- Data Model: Cloud Spanner is a globally distributed, horizontally scalable, and strongly consistent
relational database service. It provides a globally consistent, ACID-compliant data model, but with a
more complex architecture compared to traditional RDBMS. Cloud Spanner combines the
scalability of NoSQL databases with the relational data model.
- Scalability: Cloud Spanner offers horizontal scalability, allowing you to scale your database
globally across multiple regions and maintain strong consistency. It automatically handles data
replication, sharding, and distributed transactions. Cloud Spanner is designed to scale to massive
workloads and provides high availability, durability, and low-latency reads and writes across
geographically distributed regions.
- Use Cases: Cloud Spanner is suitable for globally distributed applications with complex data
models that require strong consistency, high scalability, and low-latency access. It is well-suited for
use cases such as financial systems, inventory management, reservation systems, and globally
distributed applications that require ACID transactions and real-time data replication.
Cloud Datastore:
1. NoSQL Document Database: Cloud Datastore is a NoSQL document database that allows flexible
and schemaless data storage.
2. Scalable and Fully Managed: It is designed for scalability, automatically handling high
workloads, and is a fully managed service by Google Cloud.
3. Entity-Based Data Model: Datastore uses an entity-based data model, where data is represented
as collections of properties, forming a hierarchical structure.
4. Powerful Querying Capabilities: Datastore supports querying entities based on property values,
with filtering, sorting, and projections, allowing for efficient data retrieval.
5. Strong and Eventual Consistency: It offers strong consistency within entity groups and eventual
consistency across groups, balancing data consistency and query performance.
Cloud Bigtable:
1. Distributed NoSQL Database: Cloud Bigtable is a distributed NoSQL database designed for
massive scalability and high-performance applications.
2. Fully Managed: It is a fully managed service by Google Cloud, taking care of infrastructure
provisioning, scaling, and maintenance.
3. Wide Column Store: Bigtable follows a wide column store data model, allowing flexible schema
design and handling large amounts of structured and semi-structured data.
4. High Throughput and Low Latency: Bigtable is optimized for high throughput and low-latency
operations, making it suitable for real-time and high-volume workloads.
5. Integrated with Hadoop and BigQuery: Bigtable integrates seamlessly with other Google Cloud
services like Hadoop and BigQuery, enabling efficient data processing and analysis pipelines.
BigQuery is a fully managed, serverless data warehouse provided by Google Cloud. It offers a
powerful platform for storing, querying, and analyzing large datasets in a fast and cost-effective
manner. BigQuery supports standard SQL queries, making it accessible to users familiar with SQL
syntax for data retrieval and analysis.