1 option
Microservices with go : building scalable and reliable microservices with go / Alexander Shuiskov.
- Format:
- Book
- Author/Creator:
- Shuiskov, Alexander, author.
- Language:
- English
- Subjects (All):
- Application software--Development.
- Application software.
- Go (Computer program language).
- Physical Description:
- 1 online resource (329 pages)
- Edition:
- First edition.
- Place of Publication:
- [S.l.] : PACKT PUBLISHING LIMITED, 2022.
- Birmingham : Packt Publishing, [2022]
- Summary:
- Build, scale, and maintain microservices in Golang with ease. Key Features Create and organize well-structured Go microservices Learn industry best practices and gain insights into Go microservice development tools, patterns, and solutions Cover hands-on Golang examples in each chapter Book Description This book covers the key benefits and common issues of microservices, helping you understand the problems microservice architecture helps to solve, the issues it usually introduces, and the ways to tackle them. You'll start by learning about the importance of using the right principles and standards in order to achieve the key benefits of microservice architecture. The following chapters will explain why the Go programming language is one of the most popular languages for microservice development and lay down the foundations for the next chapters of the book. You'll explore the foundational aspects of Go microservice development including service scaffolding, service discovery, data serialization, synchronous and asynchronous communication, deployment, and testing. After covering the development aspects, you'll progress to maintenance and reliability topics. The last part focuses on more advanced topics of Go microservice development including system reliability, observability, maintainability, and scalability. In this part, you'll dive into the best practices and examples which illustrate how to apply the key ideas to existing applications, using the services scaffolded in the previous part as examples. By the end of this book, you'll have gained hands-on experience with everything you need to develop scalable, reliable and performant microservices using Go. What you will learn Get familiar with the industry's best practices and solutions in microservice development Understand service discovery in the microservices environment Explore reliability and observability principles Discover best practices for asynchronous communication Focus on how to write high-quality unit and integration tests in Go applications Understand how to profile Go microservices Who this book is for This book is for all types of developers, from people interested in learning how to write microservices in Go to seasoned professionals who want to take the next step in mastering the art of writing scalable and reliable microservice-based systems. A basic understanding of Go will come in handy.
- Contents:
- Cover
- Title Page
- Copyright and Credits
- Contributors
- Table of Contents
- Preface
- Part 1: Introduction
- Chapter 1: Introduction to Microservices
- What is a microservice?
- Motivation to use microservices
- Pros and cons of microservices
- Benefits of microservices
- Common issues of microservices
- When to use microservice architecture
- Role of Go in microservice development
- Summary
- Further reading
- Part 2: Foundation
- Chapter 2: Scaffolding a Go Microservice
- Technical requirements
- Go basics
- Core principles
- Writing idiomatic Go code
- Interfaces
- Tests
- Context
- Project structure
- Private packages
- Public packages
- Executable packages
- Other commonly used directories
- Common files
- Best practices
- Scaffolding an example application
- Movie application
- Application code structure
- Movie metadata service
- Movie service
- Chapter 3: Service Discovery
- Service discovery overview
- Registry
- Service discovery models
- Service health monitoring
- Service discovery solutions
- HashiCorp Consul
- Kubernetes
- Adopting service discovery
- Preparing the application
- Implementing the discovery logic
- Using the discovery logic
- Chapter 4: Serialization
- The basics of serialization
- Popular serialization formats
- Using Protocol Buffers
- Best practices for serialization
- Chapter 5: Synchronous Communication
- Introduction to synchronous communication
- Go RPC frameworks and libraries
- Defining a service API using Protocol Buffers
- Implementing gateways and clients
- Metadata service
- Rating service
- Further reading.
- Chapter 6: Asynchronous Communication
- Asynchronous communication basics
- Benefits and challenges of asynchronous communication
- Techniques and patterns of asynchronous communication
- Using Apache Kafka for messaging
- Adopting Kafka for our microservices
- Asynchronous communication best practices
- Versioning
- Leveraging partitioning
- Chapter 7: Storing Service Data
- Introduction to database
- Using MySQL to store our service data
- Chapter 8: Deployment with Kubernetes
- Preparing application code for deployments
- Deployment basics
- Application configuration
- Deploying via Kubernetes
- Introduction to Kubernetes
- Setting up our microservices for Kubernetes deployments
- Deployment best practices
- Automated rollbacks
- Canary deployments
- Replace with Continuous Deployment (CD)
- Chapter 9: Unit and Integration Testing
- Go testing overview
- Unit tests
- Mocking
- Implementing unit tests
- Integration tests
- Testing best practices
- Using helpful messages
- Avoiding the use of Fatal in your logs
- Making a comparison using a cmp library
- Part 3: Maintenance
- Chapter 10: Reliability Overview
- Reliability basics
- Achieving reliability through automation
- Communication error handling
- Graceful shutdown
- Achieving reliability through development processes and culture
- On-call process
- Incident management
- Reliability drills
- Chapter 11: Collecting Service Telemetry Data
- Telemetry overview
- Collecting service logs
- Choosing the logging library
- Using logging features.
- Storing microservice logs
- Logging best practices
- Collecting service metrics
- Storing metrics
- Popular Go metrics libraries
- Emitting service metrics
- Metrics best practices
- Tracing
- Tracing tools
- Collecting tracing data with the OpenTelemetry SDK
- Chapter 12: Setting Up Service Alerting
- Alerting basics
- Alerting use cases
- Introduction to Prometheus
- Setting up Prometheus alerting for our microservices
- Alerting best practices
- Chapter 13: Advanced Topics
- Profiling Go services
- Creating microservice dashboards
- Frameworks
- Storing microservice ownership data
- Securing microservice communication with JWT
- JWT basics
- Implementing authentication and authorization with JWTs
- Index
- Other Books You May Enjoy.
- Notes:
- Description based on publisher supplied metadata and other sources.
- Description based on print version record.
- Other Format:
- Print version: Shuiskov, Alexander Microservices with Go
- ISBN:
- 9781804618196
- 1804618195
- OCLC:
- 1351875211
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.