Microservices: Up and Running: A Step-by-Step Guide to Building a Microservices Architecture

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Microservices architectures offer faster change speeds, better scalability, and cleaner, evolvable system designs. But implementing your first microservices architecture is difficult. How do you make myriad choices, educate your team on all the technical details, and navigate the organization to a successful execution to maximize your chance of success? With this book, authors Ronnie Mitra and Irakli Nadareishvili provide step-by-step guidance for building an effective microservices architecture. Architects and engineers will follow an implementation journey based on techniques and architectures that have proven to work for microservices systems. You'll build an operating model, a microservices design, an infrastructure foundation, and two working microservices, then put those pieces together as a single implementation. For anyone tasked with building microservices or a microservices architecture, this guide is invaluable. • Learn an effective and explicit end-to-end microservices system design • Define teams, their responsibilities, and guidelines for working together • Understand how to slice a big application into a collection of microservices • Examine how to isolate and embed data into corresponding microservices • Build a simple yet powerful CI/CD pipeline for infrastructure changes • Write code for sample microservices • Deploy a working microservices application on Amazon Web Services

Author(s): Ronnie Mitra, Irakli Nadareishvili
Edition: 1
Publisher: O'Reilly Media
Year: 2020

Language: English
Commentary: Vector PDF
Pages: 318
City: Sebastopol, CA
Tags: DevOps; Amazon Web Services; MySQL; Microservices; Apache Cassandra; Docker; Redis; GitHub; Continuous Delivery; Kubernetes; Continuous Integration; Software Architecture; Terraform; Infrastructure as Code; Teamwork; Domain-Driven Design; GitOps

Copyright
Table of Contents
Preface
Who Should Read This Book
What You’ll Need
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
Chapter 1. Toward a Microservices Architecture
What Are Microservices?
Reducing Coordination Costs
The Coordination Cost Problem
The Hard Parts
Learning by Doing
The “Up and Running” Microservices Model
Decisions, Decisions…
Writing a Lightweight Architectural Decision Record
Summary
Chapter 2. Designing a Microservices Operating Model
Why Teams and People Matter
Team Size
Team Skills
Interteam Coordination
Introducing Team Topologies
Team Types
Interaction Modes
Designing a Microservices Team Topology
Establish a System Design Team
Building a Microservices Team Template
Platform Teams
Enabling and Complicated-Subsystem Teams
Consumer Teams
Summary
Chapter 3. Designing Microservices: The SEED(S) Process
Introducing the Seven Essential Evolutions of Design for Services: The SEED(S) Method
Identifying Actors
Example Actors in Our Sample Project
Identifying Jobs That Actors Have to Do
Using Job Story Format to Capture JTBDs
Example JTBDs in Our Sample Project
Discovering Interaction Patterns with Sequence Diagrams
Deriving Actions and Queries from JTBDs
Example Queries and Actions for Our Sample Project
Describing Each Query and Action as a Specification with an Open Standard
Example OAS for an Action in Our Sample Project
Getting Feedback on the API Specification
Implementing Microservices
Microservices Versus APIs
Summary
Chapter 4. Rightsizing Your Microservices: Finding Service Boundaries
Why Boundaries Matter, When They Matter, and How to Find Them
Domain-Driven Design and Microservice Boundaries
Context Mapping
Synchronous Versus Asynchronous Integrations
A DDD Aggregate
Introduction to Event Storming
The Event-Storming Process
Introducing the Universal Sizing Formula
The Universal Sizing Formula
Summary
Chapter 5. Dealing with the Data
Independent Deployability and Data Sharing
Microservices Embed Their Data
Embedding Data Should Not Lead to an Explosion in the Number of Database Clusters
Data Embedding and the Data Delegate Pattern
Using Data Duplication to Solve for Independence
Distributed Transactions and Surviving Failures
Event Sourcing and CQRS
Event Sourcing
Improving Performance with Rolling Snapshots
Event Store
Command Query Responsibility Segregation
Event Sourcing and CQRS Beyond Microservices
Summary
Chapter 6. Building an Infrastructure Pipeline
DevOps Principles and Practices
Immutable Infrastructure
Infrastructure as Code
Continuous Integration and Continuous Delivery
Setting Up the IaC Environment
Set Up GitHub
Install Terraform
Configuring Amazon Web Services
Setting Up an AWS Operations Account
Configure the AWS CLI
Setting Up AWS Permissions
Creating an S3 Backend for Terraform
Building an IaC Pipeline
Creating the Sandbox Repository
Understanding Terraform
Writing the Code for the Sandbox Environment
Building the Pipeline
Testing the Pipeline
Summary
Chapter 7. Building a Microservices Infrastructure
Infrastructure Components
The Network
The Kubernetes Service
The GitOps Deployment Server
Implementing the Infrastructure
Installing kubectl
Setting Up the Module Repositories
The Network Module
The Kubernetes Module
Setting Up Argo CD
Testing the Environment
Cleaning Up the Infrastructure
Summary
Chapter 8. Developer Workspace
Coding Standards and the Developer’s Setup
10 Workspace Guidelines for a Superior Developer Experience
Setting Up a Containerized Environment Locally
Installing Multipass
Entering the Container and Mapping Folders
Installing Docker
Testing Docker
Advanced Local Docker Usage: Installing Cassandra
Installing Kubernetes
Summary
Chapter 9. Developing Microservices
Designing Microservice Endpoints
Flights Microservice
Reservations Microservice
Designing an OpenAPI Specification
Implementing the Data for a Microservice
Redis for the Reservations Data Model
MySQL Data Model for the Flights Microservice
Implementing Code for a Microservice
The Code Behind the Flights Microservice
Health Checks
Introducing a Second Microservice to the Project
Hooking Services Up with an Umbrella Project
Summary
Chapter 10. Releasing Microservices
Setting Up the Staging Environment
The Ingress Module
The Database Module
Forking the Staging Infrastructure Project
Configuring the Staging Workflow
Editing the Staging Infrastructure Code
Shipping the Flight Information Container
Introducing Docker Hub
Configuring Docker Hub
Configuring the Pipeline
Deploying the Flights Service Container
Understanding Kubernetes Deployments
Creating a Helm Chart
Creating the Microservices Deployment Repository
Argo CD for GitOps Deployment
Clean Up
Summary
Chapter 11. Managing Change
Changes in a Microservices System
Be Data-Oriented
The Impact of Changes
Three Deployment Patterns
Considerations for Our Architecture
Infrastructure Changes
Microservices Changes
Data Changes
Summary
Chapter 12. A Journey’s End (and a New Beginning)
On Complexity and Simplification Using Microservices
Microservices Quadrant
Measuring the Progress of a Microservices Transformation
Summary
Index
About the Authors
Colophon