liveBook · Manning

What you will learn in gRPC Microservices in Go

by Hüseyin Babal

Chapter by chapter

Chapter 1: Introduction to Go gRPC microservices

1.1 Benefits of gRPC microservices · 1.1.1 Performance · 1.1.2 Code generation and interoperability · 1.1.3 Fault tolerance · 1.1.4 Security · 1.1.5 Streaming · 1.2 REST vs. RPC · 1.3 When to use gRPC · 1.3.1 Who is this book for? · 1.4 Production-grade use cases · 1.4.1 Microservices · 1.4.2 Container runtime · 1.4.3 CI/CD pipeline · 1.4.4 Monitoring and observability · 1.4.5 Public access · 1.5 Summary

What you learn in chapter 1 →

Chapter 2: gRPC meets microservices

2.1 Monolithic architecture · 2.1.1 Development · 2.1.2 Deployment · 2.1.3 Scaling · 2.2 Scale cube · 2.2.1 X-axis scaling · 2.2.2 Z-axis scaling · 2.2.3 Y-axis scaling · 2.3 Microservice architecture · 2.3.1 Handling data consistency · 2.3.2 Saga pattern · 2.3.3 Choreography-based saga · 2.3.4 Orchestrator-based saga · 2.4 Service discovery · 2.5 Using gRPC for interservice communication · 2.5.1 Working with protocol buffers · 2.5.2 Generating Go source code · 2.5.3 Connecting wires · 2.6 Summary

What you learn in chapter 2 →

Chapter 3: Getting up and running with gRPC and Golang

3.1 Protocol buffers · 3.1.1 Defining message type · 3.1.2 Protocol buffer encoding · 3.2 Generating stubs · 3.2.1 Protocol buffer compiler installation · 3.2.2 Using the protocol buffer compiler · 3.3 Maintaining .proto files · 3.3.1 Proto project structure · 3.3.2 Automation for source code generation · 3.4 Backward and forward compatibility · 3.4.1 Adding new fields · 3.4.2 Upgrading the server but not the client · 3.4.3 Upgrading the client but not the server · 3.4.4 Adding/removing oneof fields · 3.4.5 Moving fields out of or into oneof fields · 3.5 Summary

What you learn in chapter 3 →

Chapter 4: Microservice project setup

4.1 Hexagonal architecture · 4.1.1 Application · 4.1.2 Actors · 4.1.3 Ports · 4.1.4 Adapters · 4.2 Order service implementation · 4.2.1 Project folders · 4.2.2 Initializing a Go project · 4.2.3 Implementing the application core · 4.2.4 Implementing ports · 4.2.5 Implementing adapters · 4.2.6 Implementing a gRPC adapter · 4.2.7 Dependency injection and running the application · 4.2.8 Calling a gRPC endpoint · 4.3 Summary

What you learn in chapter 4 →

Chapter 5: Interservice communication

5.1 gRPC service-to-service communication · 5.1.1 Server-side load balancing · 5.1.2 Client-side load balancing · 5.2 Depending on a module and implementing ports and adapters · 5.2.1 Payment port · 5.2.2 Payment adapter · 5.2.3 Implementing the payment port · 5.2.4 Implementing the payment adapter · 5.2.5 Client configuration for a payment stub · 5.2.6 Using a payment adapter in gRPC · 5.3 Error handling · 5.3.1 Status codes · 5.3.2 Returning an error code and message · 5.3.3 Errors with details · 5.3.4 Handling errors on the client side · 5.3.5 Running the Payment service · 5.4 Summary

What you learn in chapter 5 →

Chapter 6: Resilient communication

6.1 Resiliency patterns · 6.1.1 Timeout pattern · 6.1.2 Retry pattern · 6.1.3 Circuit breaker pattern · 6.2 Error handling · 6.2.1 gRPC error model · 6.2.2 gRPC error response · 6.3 Securing gRPC communication · 6.3.1 TLS handshake · 6.3.2 Certificate generation · 6.3.3 gRPC TLS credentials · 6.4 Summary

What you learn in chapter 6 →

Chapter 7: Testing microservices

7.1 Testing pyramid · 7.2 Testing with a unit test · 7.2.1 System under test · 7.2.2 Test workflow · 7.2.3 Working with mocks · 7.2.4 Implementing a mock · 7.2.5 Automatic mock generation · 7.3 Integration testing · 7.3.1 Test suite preparation · 7.3.2 Working with Testcontainers · 7.4 End-to-end tests · 7.4.1 Specifications · 7.4.2 Understanding Docker Compose service definitions · 7.4.3 End-to-end test folder structure · 7.4.4 Database layer · 7.4.5 The Payment service layer · 7.4.6 The Order service layer · 7.4.7 Running tests against the stack · 7.5 Test coverage · 7.5.1 Coverage information · 7.5.2 Testing in a CI pipeline · 7.6 Summary

What you learn in chapter 7 →

Chapter 8: Deployment

8.1 Docker · 8.1.1 Building images · 8.2 Kubernetes · 8.2.1 Kubernetes architecture · 8.2.2 Kubernetes resources · 8.2.3 Eagle view of microservices deployment · 8.2.4 Pod · 8.2.5 Deployment · 8.2.6 Service · 8.2.7 NGINX Ingress controller · 8.3 Certificate management · 8.3.1 Installation · 8.3.2 ClusterIssuer · 8.3.3 Certificate usage in Ingress · 8.3.4 Certificates on the client side · 8.4 Deployment strategies · 8.4.1 RollingUpdate · 8.4.2 Blue-Green Deployment · 8.4.3 Canary deployment · 8.4.4 Final thoughts on deployment · 8.5 Summary

What you learn in chapter 8 →

Chapter 9: Observability

9.1 Observability · 9.1.1 Traces · 9.1.2 Metrics · 9.1.3 Logs · 9.2 OpenTelemetry · 9.2.1 Instrumentation locations · 9.2.2 Instrumentation · 9.2.3 Metric backend · 9.2.4 Service performance monitoring · 9.3 Observability in Kubernetes · 9.3.1 Jaeger All in One · 9.3.2 OpenTelemetry Collector · 9.3.3 Prometheus · 9.3.4 Jaeger installation · 9.3.5 OpenTelemetry interceptor for the Order service · 9.3.6 Understanding the metrics of the Order service · 9.3.7 Application logging · 9.3.8 Logs collection · 9.3.9 Elasticsearch as a logging backend · 9.3.10 Kibana as a logging dashboard · 9.4 Summary

What you learn in chapter 9 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.