Building Serverless Applications with Google Cloud Run - Helion
ISBN: 978-14-920-5704-8
stron: 202, Format: ebook
Data wydania: 2020-12-02
Księgarnia: Helion
Cena książki: 194,65 zł (poprzednio: 226,34 zł)
Oszczędzasz: 14% (-31,69 zł)
Learn how to build a real-world serverless application in the cloud that's reliable, secure, maintainable, and scalable. If you have experience building web applications on traditional infrastructure, this hands-on guide shows you how to get started with Cloud Run, a container-based serverless product on Google Cloud.
Through the course of this book, you'll learn how to deploy several example applications that highlight different parts of the serverless stack on Google Cloud. Combining practical examples with fundamentals, this book will appeal to developers who are early in their learning journey as well as experienced practitioners.
- Build a serverless application with Google Cloud Run
- Learn approaches for building containers with (and without) Docker
- Explore Google Cloud's managed relational database: Cloud SQL
- Use HTTP sessions to make every user's experience unique
- Explore identity and access management (IAM) on Cloud Run
- Provision Google Cloud resources using Terraform
- Learn how to handle background task scheduling on Cloud Run
- Move your service from Cloud Run to Knative Serving with little effort
Osoby które kupowały "Building Serverless Applications with Google Cloud Run", wybierały także:
- Microsoft Azure. Kurs video. Zostań administratorem systemów IT 169,00 zł, (76,05 zł -55%)
- Amazon Web Services (AWS). Kurs video. Zostań administratorem systemów IT 199,00 zł, (89,55 zł -55%)
- Flutter i Dart. Receptury. Tworzenie chmurowych aplikacji full stack 69,00 zł, (34,50 zł -50%)
- AWS dla architekt 139,00 zł, (69,50 zł -50%)
- Terraform w praktyce. Kurs video. Architektura serverless i us 169,00 zł, (84,50 zł -50%)
Spis treści
Building Serverless Applications with Google Cloud Run eBook -- spis treści
- Foreword
- Preface
- Why I Wrote This Book
- Who This Book Is For
- Why Use the Go Language?
- Navigating This Book
- Conventions Used in This Book
- Using Code Examples
- OReilly Online Learning
- How to Contact Us
- Acknowledgments
- 1. Introduction
- Serverless Applications
- A Simple Developer Experience
- Autoscalable Out of the Box
- A Different Cost Model
- Serverless Is Not Functions as a Service
- Google Cloud
- Serverless on Google Cloud
- Cloud Run
- Service
- Container Image
- Scalability and Self-Healing
- HTTPS Serving
- Microservices Support
- Identity, Authentication, and Access Management
- Monitoring and Logging
- Transparent Deployments
- Pay-Per-Use
- Concerns About Serverless
- Unpredictable Costs
- Hyper-Scalability
- When Things Go Really Wrong
- Separation of Compute and Storage
- Open Source Compatibility
- Summary
- Serverless Applications
- 2. Understanding Cloud Run
- Getting Started with Google Cloud
- Costs
- Interacting with Google Cloud
- Google Cloud Projects
- Installing and Authenticating the SDK
- Installing Beta Components
- Deploying Your First Service
- Deploying the Sample Container
- Region
- Structure of the HTTPS Endpoint
- Viewing Your Service in the Web Console
- Deploying a New Version
- Revision
- Understanding Cloud Run
- Container Life Cycle
- CPU Throttling
- Task Scheduling and Throttling
- Load Balancer and Autoscaler
- Concurrent Request Limit
- Autoscaler
- Tuning the Concurrency Setting
- Cold Starts
- Disposable Containers
- In-Memory Filesystem
- Ready for Requests
- Cloud Run Key Points
- Choosing a Serverless Compute Product on Google Cloud
- Cloud Functions: Glue Code
- App Engine: Platform as a Service
- Key Differences
- Source-based versus container-based
- Request- versus instance-oriented runtime
- What Will the Future Look Like?
- Summary
- Getting Started with Google Cloud
- 3. Building Containers
- Containers: A Hands-On Exploration
- Running an Interactive Shell
- Overriding the Default Command
- Running a Server
- Containers from First Principles
- Inside a Container Image
- The Linux Kernel
- Container Isolation
- Starting a Container
- Building a Container with Docker
- Dockerfile Instructions
- Installing Additional Tooling
- Smaller Is Better When Deploying to Production
- Creating Small Containers with Distroless
- Artifact Registry
- Building and Tagging the Container Image
- Authenticating and Pushing the Container Image
- Building a Container Without a Dockerfile
- Go Containers with ko
- Java Containers with Jib
- Cloud Native Buildpacks
- Cloud Build
- Remote Docker Build
- Advanced Builds
- Running Arbitrary Programs
- Connecting with Version Control
- Shutting Down
- Summary
- Containers: A Hands-On Exploration
- 4. Working with a Relational Database
- Introducing the Demo Application
- Creating the Cloud SQL Instance
- Understanding Cloud SQL Proxy
- Connecting and Loading the Schema
- Securing the Default User
- Connecting Cloud Run to Cloud SQL
- Disabling the Direct Connection
- Deploying the Demo Application
- Connection String
- Public and Private IP
- Limiting Concurrency
- Transaction Concurrency
- Resource Contention
- Scaling Boundaries and Connection Pooling
- External Connection Pool
- A Real-World Example
- Cloud SQL in Production
- Monitoring
- Automatic Storage Increase
- High Availability
- Making Your Application Resilient Against Short Downtime
- Shutting Down
- Summary
- Introducing the Demo Application
- 5. Working with HTTP Sessions
- How HTTP Sessions Work
- Storing Sessions in Memorystore: A Hands-On Exploration
- Creating a Memorystore Instance
- What Is a VPC Connector?
- Creating a VPC Connector
- Deploying the Demo App
- Alternative Session Stores
- Session Affinity
- Use Cases
- Session Affinity Is Not for Session Data
- Shutting Down
- Summary
- 6. Service Identity and Authentication
- Cloud IAM Fundamentals
- Roles
- Policy Binding
- Adding a policy binding to a project
- Adding a policy binding to a resource
- Service Accounts
- Avoiding the default service account
- A gripping demo
- Creating and Using a New Service Account
- Sending Authenticated Requests to Cloud Run
- Deploying a Private Service
- Using an ID Token to Send Authenticated Requests
- When Is an ID Token Valid?
- Programmatically Calling Private Cloud Run Services
- Google Frontend Server
- A Story About Inter-Service Latency
- Demo Application
- Embedded Read-Only SQL Database
- Running Locally
- Edit, Compile, Reload
- Deploying to Cloud Run
- Update the Frontend Configuration
- Add Custom Service Accounts
- Add IAM Policy Binding
- Summary
- Cloud IAM Fundamentals
- 7. Task Scheduling
- Cloud Tasks
- Hands-On Learning: A Demo Application
- Building the Container Images
- Creating a Cloud Tasks Queue
- Creating Service Accounts
- Deploying the Worker Service
- Deploying the Task App Service
- Connecting the Task Queue
- Scheduling a Task with the Cloud Tasks Client Library
- Automatic ID Token
- Connecting the Worker
- Test the App
- Queue Configuration
- Retry Configuration
- Rate Limiting
- Viewing and Updating Queue Configuration
- Considerations
- Cloud Tasks Might Deliver Your Request Twice
- Local Development
- Alternatives
- Summary
- 8. Infrastructure as Code Using Terraform
- What Is Infrastructure as Code?
- Why Infrastructure as Code?
- Serverless Infrastructure
- How It Works
- When Not to Use Infrastructure as Code
- Terraform
- Installing Terraform
- Getting Started with a Minimal Example
- Provider
- Variables are parameters
- Adding the first resource declaration
- Terraform configuration language
- Preparing to deploy the service: Creating a plan
- Saving input variables
- Deploying the service: Apply the plan
- Terraform state
- The Terraform Workflow
- Change with Terraform: Adding the Access Policy
- Expressing Dependencies with References
- Supplemental Resources
- Summary
- 9. Structured Logging and Tracing
- Logging on Cloud Run
- Viewing Logs in the Web Console
- Viewing Logs in the Terminal
- Finding Invisible Logs
- Plain-Text Logs Leave You Wanting More
- Demo Application
- Structured Logging
- Client Libraries
- Structured Logging in Other Languages
- How to Use Log Levels
- Capturing Panics
- Local Development
- Request Context
- Trace Context
- Forwarding Trace ID
- Preparing All Incoming Requests with the Trace ID
- Passing Request Context to Outgoing Requests
- Viewing Trace Context in Cloud Logging
- Additional Resources About Tracing
- Log-Based Metrics with Cloud Monitoring
- Summary
- Logging on Cloud Run
- 10. Cloud Run and Knative Serving
- What Is Knative Serving?
- Cloud Run Is Not Managed Knative Serving
- Knative Serving on Google Cloud
- Understanding Kubernetes
- API Server
- Kubernetes Resources
- Database
- Controllers
- Adding Extensions to Kubernetes
- Running Knative Serving Locally
- Running a Local Kubernetes Cluster
- Installing Minikube and kubectl
- Starting Your Local Cluster
- Install the Knative Operator
- Starting Minikube Tunnel
- Installing an HTTP Load Balancer
- Configuring DNS
- Deploying a Service
- Deploying the Same Service to Cloud Run
- Alternative API Clients
- Shutting Down
- Discussion
- Serving
- Moving from Kubernetes to Cloud Run Is Harder
- Service Identity and Authentication
- Proprietary Managed Services
- Summary
- What Is Knative Serving?
- Index