Microservices: Up and Running

Book description

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

Publisher resources

View/Submit Errata

Table of contents

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

Product information

  • Title: Microservices: Up and Running
  • Author(s): Ronnie Mitra, Irakli Nadareishvili
  • Release date: November 2020
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781492075455