Hands-On Serverless Computing with Google Cloud
eBook - ePub

Hands-On Serverless Computing with Google Cloud

Build, deploy, and containerize apps using Cloud Functions, Cloud Run, and cloud-native technologies

  1. 320 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Hands-On Serverless Computing with Google Cloud

Build, deploy, and containerize apps using Cloud Functions, Cloud Run, and cloud-native technologies

Book details
Book preview
Table of contents
Citations

About This Book

Effectively deploy fully managed workloads using Google Cloud's serverless services

Key Features

  • Use real-world use cases to understand the core functionalities of Functions as a Service
  • Explore the potential of Cloud Run, Knative, Cloud Build, Google Kubernetes Engine, and Cloud Storage
  • Get to grips with architectural decisions, seamless deployments, containerization, and serverless solutions

Book Description

Google Cloud's serverless platform allows organizations to scale fully managed solutions without worrying about the underlying infrastructure. With this book, you will learn how to design, develop, and deploy full stack serverless apps on Google Cloud.

The book starts with a quick overview of the Google Cloud console, its features, user interface (UI), and capabilities. After getting to grips with the Google Cloud interface and its features, you will explore the core aspects of serverless products such as Cloud Run, Cloud Functions and App Engine. You will also learn essential features such as version control, containerization, and identity and access management with the help of real-world use cases. Later, you will understand how to incorporate continuous integration and continuous deployment (CI/CD) techniques for serverless applications. Toward the concluding chapters, you will get to grips with how key technologies such as Knative enable Cloud Run to be hosted on multiple platforms including Kubernetes and VMware.

By the end of this book, you will have become proficient in confidently developing, managing, and deploying containerized applications on Google Cloud.

What you will learn

  • Explore the various options for deploying serverless workloads on Google Cloud
  • Determine the appropriate serverless product for your application use case
  • Integrate multiple lightweight functions to build scalable and resilient services
  • Increase productivity through build process automation
  • Understand how to secure serverless workloads using service accounts
  • Build a scalable architecture with Google Cloud Functions and Cloud Run

Who this book is for

If you are a cloud administrator, architect, or developer who wants to build scalable systems and deploy serverless workloads on Google Cloud, then this book is for you. To get the most out of this book, a basic understanding of the serverless ecosystem and cloud computing will be beneficial.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Hands-On Serverless Computing with Google Cloud by Richard Rose in PDF and/or ePUB format, as well as other popular books in Informatique & Architecture des systèmes. We have over one million books available in our catalogue for you to explore.

Information

Year
2020
ISBN
9781838826840

Section 1: App Engine

In this section, you will learn about App Engine and the features that make it such a compelling product for scalable web applications. The initial discussion will provide an introduction to the product and highlight the key features, for example, the differences between App Engine Standard and App Engine Flex, what actions task queues perform, and how App Engine seamlessly handles application versioning.
This section comprises the following chapters:
  • Chapter 1, Introducing App Engine
  • Chapter 2, Developing with App Engine

Introducing App Engine

In this first chapter, we will discuss the main properties of Google App Engine (GAE) and its Platform-as-a-Service (PaaS) approach. Available since 2008, GAE provides a serverless environment in which to deploy HTTP/web-based applications.
Throughout this chapter, we will explore GAE's framework and structure to see how highly scalable applications are made possible on this platform. As part of this, we will consider how to integrate standard web primitives such as traffic splitting and API management on GAE. By the end of this chapter, you should have a solid foundation to help you build web-based applications using GAE quickly.
In a nutshell, we will cover the following topics in this chapter:
  • Introducing GAE
  • Understanding the GAE framework
  • Defining App Engine components
  • Understanding GAE's features

Introducing GAE

When it comes to software engineering innovation, it is clear that Google has a rich history. This innovation has been evident across many successful projects, including several billion-user products brought to market, such as Google Search, Android, and YouTube. Google Cloud and its vibrant ecosystem of services provide tools built to serve these critical projects, and now you can host your application on the same platform.
GAE is designed to host web-based applications and elegantly handle request/response communications. Understanding how to achieve this on Google Cloud will be central to building consistent and efficient applications that can delight end users with their responsiveness.
Before delving into the details of GAE, let's spend some time discussing the rationale behind the application platform. For the following paragraphs, we will outline the main elements of GAE, which will provide us with sufficient knowledge to make intelligent decisions around what types of application would benefit from being run on GAE and, conversely, what applications would not.
To begin our journey, let's commence by answering the following questions to build a shared understanding of what the GAE application platform provides:
  • Why go serverless with App Engine?
  • What is the underlying App Engine framework?
  • How does App Engine handle auto-scaling?
  • Who is the target audience?

Why go serverless with App Engine?

Making a service available on the internet requires a lot of thought to minimize the potential for system compromise and associated security risks. All application traffic to App Engine is propagated via the Google Front End (GFE) service to mitigate access protocol compromise.
GFE provides a Transport Layer Security (TLS) termination for all GAE-registered routed web traffic. Acting as a protection layer, GFE is capable of performing several essential security services for a Google Cloud project. From a security perspective, it provides the public IP hosting of a public DNS name and Denial of Service (DoS) protection. Besides, GFE can also be used by internal services as a scalable reverse proxy.
When working on Google Cloud, a term commonly mentioned is security in depth. An approach such as this provides multiple concurrent safeguards for your environment that work against bad actors wishing to misuse your service. Many of these security safeguards are built into the platform, so no additional effort is required on the part of the developer.
GAE provides a fully managed application platform that enables developers to only concern themselves with building their application. Concerns regarding the management of lower-level infrastructures, such as compute and storage, are automatically managed by the service. In this respect, serverless solutions such as GAE offer the ability to devote focus to the development process and leave operational matters to the provider of the service.
GAE enables developers to take advantage of a simplified serverless environment that addresses hosting the web application and API services on Google Cloud. By providing a significantly simplified environment, the intent is to increase the adoption of the cloud platform by bringing more developers to the cloud. In most instances, when a developer uses such a system, they can immediately see the vast potential for efficiency to be gained by working within an environment such as this.
In the following diagram, we outline a logical view of the typical workflow of an environment based on GAE. From the illustration, we can see that all external communication is performed using the HTTP(S) protocol and is routed via Cloud Load Balancer (provided by GFE). In this scenario, the frontend device exposes a single service name that encapsulates the application resource deployed. The service enables GAE to direct traffic received to multiple backend resource components dynamically. GAE maintains responsibility for establishing which role these components performed and ensures that each of them remains distinct for the purposes of identification:
Backend service communication use the HTTP/HTTPS protocol, which means that GAE assumes an internet-based environment (that is, it assumes that you have access to a public-facing internet connection). Application request processing is performed by the default instance that's deployed, and this instance is subject to autoscaling based on system workload thresholds.
Taking the described approach enables workloads to be seamlessly load balanced across application instances, again without any additional configuration needed from the developer. Standard workload operational activities such as TLS termination and DNS resolution require no further user configuration. The addition of these activities provides a significant benefit to the developer. Application workloads being subject to isolated instances means the application is also capable of massive scale without any substantive work.
In addition to standard protection, the addition of GFE also provides seamless compatibility with secure delivery protocols such as gRPC (https://grpc.io/blog/principles/). The gRPC protocol uses the RPC framework to provide layer isolation when forwarding requests for the service. Also, communication remains encrypted by default to avoid the nuisance of communication eavesdropping or device compromise when performing inter-service communication.
The more recent adoption by the industry has seen broader adoption of gRPC developing more extensive compatibility across a range of services. The RPC security protocol is used extensively at Google, for example, to secure API access. When working with communication protocols across the internet, many standards exist. Having all service-related traffic routed through GFE means an incredibly flexible and scalable frontend is available without any additional work.
There are two versions of the App Engine available:
  • App Engine Standard
  • App Engine Flex
Both versions share many commonalities, and the majority of what's outlined in this chapter will apply to both equally. However, there are some key attributes to call out when thinking about the two environments, highlighted in the following diagram:
One of the main things to call out in the preceding diagram is that App Engine Standard scales down to zero. However, an App Engine Flex environment scales down to a minimum of one instance. Therefore, if your primary consideration is cost, use App Engine Standard...

Table of contents

  1. Title Page
  2. Copyright and Credits
  3. About Packt
  4. Contributors
  5. Preface
  6. Section 1: App Engine
  7. Introducing App Engine
  8. Developing with App Engine
  9. Section 2: Google Cloud Functions
  10. Introducing Lightweight Functions
  11. Developing Cloud Functions
  12. Exploring Functions as a Service
  13. Cloud Functions Labs
  14. Section 3: Google Cloud Run
  15. Introducing Cloud Run
  16. Developing with Cloud Run
  17. Developing with Cloud Run for Anthos
  18. Cloud Run Labs
  19. Section 4: Building a Serverless Workload
  20. Building a PDF Conversion Service
  21. Consuming Third-Party Data via a REST API
  22. Assessments
  23. Other Books You May Enjoy