Foreword |
|
xiii | |
Preface |
|
xvii | |
|
|
1 | (12) |
|
|
1 | (4) |
|
A Simple Developer Experience |
|
|
2 | (1) |
|
Autoscalable Out of the Box |
|
|
3 | (1) |
|
|
4 | (1) |
|
Serverless Is Not Functions as a Service |
|
|
5 | (1) |
|
|
5 | (2) |
|
Serverless on Google Cloud |
|
|
7 | (1) |
|
|
8 | (2) |
|
|
8 | (1) |
|
|
8 | (1) |
|
Scalability and Self-Healing |
|
|
9 | (1) |
|
|
9 | (1) |
|
|
9 | (1) |
|
Identity, Authentication, and Access Management |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
10 | (1) |
|
|
10 | (1) |
|
Concerns About Serverless |
|
|
10 | (2) |
|
|
11 | (1) |
|
|
11 | (1) |
|
When Things Go Really Wrong |
|
|
11 | (1) |
|
Separation of Compute and Storage |
|
|
11 | (1) |
|
Open Source Compatibility |
|
|
12 | (1) |
|
|
12 | (1) |
|
2 Understanding Cloud Run |
|
|
13 | (20) |
|
Getting Started with Google Cloud |
|
|
13 | (3) |
|
|
14 | (1) |
|
Interacting with Google Cloud |
|
|
14 | (1) |
|
|
15 | (1) |
|
Installing and Authenticating the SDK |
|
|
15 | (1) |
|
Installing Beta Components |
|
|
16 | (1) |
|
Deploying Your First Service |
|
|
16 | (6) |
|
Deploying the Sample Container |
|
|
16 | (1) |
|
|
17 | (1) |
|
Structure of the HTTPS Endpoint |
|
|
18 | (1) |
|
Viewing Your Service in the Web Console |
|
|
18 | (1) |
|
|
19 | (1) |
|
|
20 | (2) |
|
|
22 | (7) |
|
|
22 | (2) |
|
|
24 | (1) |
|
Task Scheduling and Throttling |
|
|
24 | (1) |
|
Load Balancer and Autoscaler |
|
|
24 | (2) |
|
|
26 | (1) |
|
|
26 | (1) |
|
Tuning the Concurrency Setting |
|
|
27 | (1) |
|
|
27 | (1) |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
28 | (1) |
|
|
28 | (1) |
|
Choosing a Serverless Compute Product on Google Cloud |
|
|
29 | (3) |
|
Cloud Functions: Glue Code |
|
|
29 | (1) |
|
App Engine: Platform as a Service |
|
|
30 | (1) |
|
|
30 | (1) |
|
What Will the Future Look Like? |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
33 | (22) |
|
Containers: A Hands-On Exploration |
|
|
34 | (2) |
|
Running an Interactive Shell |
|
|
34 | (1) |
|
Overriding the Default Command |
|
|
35 | (1) |
|
|
35 | (1) |
|
Containers from First Principles |
|
|
36 | (8) |
|
|
36 | (1) |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
39 | (1) |
|
Building a Container with Docker |
|
|
40 | (1) |
|
|
41 | (1) |
|
Installing Additional Tooling |
|
|
42 | (1) |
|
Smaller Is Better When Deploying to Production |
|
|
43 | (1) |
|
Creating Small Containers with Distroless |
|
|
43 | (1) |
|
|
44 | (2) |
|
Building and Tagging the Container Image |
|
|
45 | (1) |
|
Authenticating and Pushing the Container Image |
|
|
46 | (1) |
|
Building a Container Without a Dockerfile |
|
|
46 | (4) |
|
|
47 | (2) |
|
|
49 | (1) |
|
|
49 | (1) |
|
|
50 | (4) |
|
|
51 | (1) |
|
|
51 | (2) |
|
Running Arbitrary Programs |
|
|
53 | (1) |
|
Connecting with Version Control |
|
|
53 | (1) |
|
|
54 | (1) |
|
|
54 | (1) |
|
4 Working with a Relational Database |
|
|
55 | (16) |
|
Introducing the Demo Application |
|
|
55 | (10) |
|
Creating the Cloud SQL Instance |
|
|
57 | (1) |
|
Understanding Cloud SQL Proxy |
|
|
58 | (1) |
|
Connecting and Loading the Schema |
|
|
59 | (1) |
|
Securing the Default User |
|
|
60 | (1) |
|
Connecting Cloud Run to Cloud SQL |
|
|
61 | (1) |
|
Disabling the Direct Connection |
|
|
62 | (1) |
|
Deploying the Demo Application |
|
|
63 | (1) |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
65 | (4) |
|
|
66 | (1) |
|
|
67 | (1) |
|
Scaling Boundaries and Connection Pooling |
|
|
67 | (1) |
|
|
68 | (1) |
|
|
69 | (1) |
|
|
69 | (1) |
|
|
69 | (1) |
|
Automatic Storage Increase |
|
|
69 | (1) |
|
|
69 | (1) |
|
Making Your Application Resilient Against Short Downtime |
|
|
70 | (1) |
|
|
70 | (1) |
|
|
70 | (1) |
|
5 Working with HTTP Sessions |
|
|
71 | (10) |
|
|
72 | (1) |
|
Storing Sessions in Memorystore: A Hands-On Exploration |
|
|
73 | (5) |
|
Creating a Memorystore Instance |
|
|
73 | (1) |
|
|
74 | (2) |
|
|
76 | (1) |
|
|
77 | (1) |
|
Alternative Session Stores |
|
|
78 | (1) |
|
|
79 | (1) |
|
|
79 | (1) |
|
Session Affinity Is Not for Session Data |
|
|
80 | (1) |
|
|
80 | (1) |
|
|
80 | (1) |
|
6 Service Identity and Authentication |
|
|
81 | (18) |
|
|
81 | (7) |
|
|
81 | (1) |
|
|
82 | (3) |
|
|
85 | (2) |
|
Creating and Using a New Service Account |
|
|
87 | (1) |
|
Sending Authenticated Requests to Cloud Run |
|
|
88 | (3) |
|
Deploying a Private Service |
|
|
89 | (1) |
|
Using an ID Token to Send Authenticated Requests |
|
|
90 | (1) |
|
When Is an ID Token Valid? |
|
|
91 | (1) |
|
Programmatically Calling Private Cloud Run Services |
|
|
91 | (2) |
|
|
92 | (1) |
|
A Story About Inter-Service Latency |
|
|
93 | (1) |
|
|
93 | (5) |
|
Embedded Read-Only SQL Database |
|
|
94 | (1) |
|
|
94 | (1) |
|
|
95 | (1) |
|
|
96 | (1) |
|
Update the Frontend Configuration |
|
|
97 | (1) |
|
Add Custom Service Accounts |
|
|
97 | (1) |
|
|
98 | (1) |
|
|
98 | (1) |
|
|
99 | (12) |
|
|
99 | (2) |
|
Hands-On Learning: A Demo Application |
|
|
101 | (5) |
|
Building the Container Images |
|
|
101 | (1) |
|
Creating a Cloud Tasks Queue |
|
|
102 | (1) |
|
Creating Service Accounts |
|
|
102 | (1) |
|
Deploying the Worker Service |
|
|
102 | (1) |
|
Deploying the Task App Service |
|
|
103 | (1) |
|
Connecting the Task Queue |
|
|
103 | (1) |
|
Scheduling a Task with the Cloud Tasks Client Library |
|
|
104 | (1) |
|
|
105 | (1) |
|
|
105 | (1) |
|
|
105 | (1) |
|
|
106 | (1) |
|
|
106 | (1) |
|
|
107 | (1) |
|
Viewing and Updating Queue Configuration |
|
|
107 | (1) |
|
|
107 | (2) |
|
Cloud Tasks Might Deliver Your Request Twice |
|
|
107 | (1) |
|
|
108 | (1) |
|
|
109 | (1) |
|
|
109 | (2) |
|
8 Infrastructure as Code Using Terraform |
|
|
111 | (18) |
|
What Is Infrastructure as Code? |
|
|
111 | (1) |
|
Why Infrastructure as Code? |
|
|
112 | (1) |
|
Serverless Infrastructure |
|
|
113 | (2) |
|
|
113 | (1) |
|
When Not to Use Infrastructure as Code |
|
|
114 | (1) |
|
|
115 | (7) |
|
|
115 | (1) |
|
Getting Started with a Minimal Example |
|
|
116 | (6) |
|
|
122 | (4) |
|
Change with Terraform: Adding the Access Policy |
|
|
124 | (1) |
|
Expressing Dependencies with References |
|
|
125 | (1) |
|
|
126 | (1) |
|
|
127 | (2) |
|
9 Structured Logging and Tracing |
|
|
129 | (18) |
|
|
129 | (3) |
|
Viewing Logs in the Web Console |
|
|
130 | (1) |
|
Viewing Logs in the Terminal |
|
|
130 | (1) |
|
|
131 | (1) |
|
Plain-Text Logs Leave You Wanting More |
|
|
132 | (1) |
|
|
132 | (1) |
|
|
132 | (5) |
|
|
134 | (1) |
|
Structured Logging in Other Languages |
|
|
134 | (1) |
|
|
134 | (1) |
|
|
135 | (2) |
|
|
137 | (1) |
|
|
137 | (2) |
|
|
139 | (4) |
|
|
139 | (2) |
|
Preparing All Incoming Requests with the Trace ID |
|
|
141 | (1) |
|
Passing Request Context to Outgoing Requests |
|
|
141 | (2) |
|
Viewing Trace Context in Cloud Logging |
|
|
143 | (1) |
|
Additional Resources About Tracing |
|
|
143 | (1) |
|
Log-Based Metrics with Cloud Monitoring |
|
|
143 | (1) |
|
|
144 | (3) |
|
10 Cloud Run and Knative Serving |
|
|
147 | (14) |
|
|
148 | (1) |
|
Cloud Run Is Not Managed Knative Serving |
|
|
148 | (1) |
|
Knative Serving on Google Cloud |
|
|
148 | (1) |
|
|
149 | (3) |
|
|
150 | (1) |
|
|
151 | (1) |
|
|
151 | (1) |
|
|
151 | (1) |
|
Adding Extensions to Kubernetes |
|
|
152 | (1) |
|
Running Knative Serving Locally |
|
|
152 | (7) |
|
Running a Local Kubernetes Cluster |
|
|
152 | (1) |
|
Installing Minikube and kubecti |
|
|
153 | (1) |
|
Starting Your Local Cluster |
|
|
153 | (1) |
|
Install the Knative Operator |
|
|
154 | (1) |
|
|
155 | (1) |
|
Installing an HTTP Load Balancer |
|
|
156 | (1) |
|
|
157 | (1) |
|
|
157 | (1) |
|
Deploying the Same Service to Cloud Run |
|
|
158 | (1) |
|
|
158 | (1) |
|
|
159 | (1) |
|
|
159 | (1) |
|
|
159 | (1) |
|
Moving from Kubernetes to Cloud Run Is Harder |
|
|
159 | (1) |
|
Service Identity and Authentication |
|
|
159 | (1) |
|
Proprietary Managed Services |
|
|
160 | (1) |
|
|
160 | (1) |
Index |
|
161 | |