Learn how to build a serverless real-world application in the cloud that’s reliable, secure, maintainable, and can handle millions of users. If you have experience building traditional web applications, this practical guide shows you how to get started with serverless. Cloud engineer Wietse Venema takes you through the steps necessary to build serverless applications with Cloud Run, a container-based serverless platform on Google Cloud.
Through the course of the book, you’ll learn how to become productive with serverless technology. You will build and explore several example applications that highlight different parts of the serverless stack, using (light) frontend technology and Go on the back end. You can also follow the lessons in the book using your own project on Google Cloud Platform.
You’ll learn how to:
- Build a serverless application with Google’s Cloud Run and Firestore
- Approach testing and development
- Handle user management and authentication
- Combine serverless with a traditional relational database
- Run and monitor production services
- Integrate your application with external APIs
Table of Contents
1. The What and Why of Serverless
- Serverless Cloud Infrastructure
- Key Benefits of Serverless
- Concerns About Serverless
- What about Kubernetes?
- Why Go
- Why Google Cloud
2. Understanding Cloud Run
- Getting Started with Google Cloud
- Services and Functions are Different
- First Service with Cloud Run
- Understanding Cloud Run
- Choosing a Serverless Compute Product on Google Cloud
3. Building a Three-Tier App
- The Example App: a To-do List
- Hands-On Learning: Stand Up Your Own To-do Application
- Setting up Cloud SQL
- Backend: Java-Based REST API with Micronaut
- Deploy the Backend to Cloud Run
- Effects of Longer Startup Times
- Introducing Jib: Wait, Where is The Dockerfile?
- How To Develop On Your Local Machine
- SQL Database Performance
- Running Cloud SQL in Production
- Cleaning Up
4. Multiple Services Working Together
- Getting Started with the Example
- Product Service
- Frontend Service
- Private Cloud Run Services
- Sending Authenticated Requests from the Command Line
- Sending Authenticated Requests From a Local Service
- Resolving the URL of Another Cloud Run Service
- How to Deal with Tracing
- Is Service-to-Service Communication Secure?
- What About Latency?
- Are Microservices Required?
- Title: Mastering Serverless Applications with Google Cloud Run
- Release date: September 2020
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781492057093