0%

Book Description

Microservices architectures offer great benefits: faster change speeds, better scalability and cleaner, evolvable architectures. But, implementing your first Microservices architecture to get those rewards is difficult. How do you quickly educate your team on all the technical details of execution to maximize your chances of success? How do you survive the first year of bringing your microservices implementation to life? How do you improve your execution?

Making the right implementation decisions is difficult and you don't have the luxury of time to find out if the decisions you are making are the right ones. This book offers a prescriptive guide for building a Microservices architecture to combat that uncertainty. Inside, you will find a step-by-step implementation journey mapped out based on the techniques and architectures that have been proven to work for Microservices systems.

This book solves the following problems for users:

  • What does a "good" microservices project look like?
  • Are the decisions you're making for your project the "right" ones?
  • How do you come up with a good microservices design that fits your own context as quickly as possible?
  • Where should you spend time thinking/designing and where should you just implement "best practices"?

Table of Contents

  1. 1. Towards a Microservices Architecture
    1. What are Microservices?
    2. Why Microservices?
      1. The Microservices Way: Speed, Safety & Scale
    3. Building A Microservices Architecture
      1. Microservices Guiding Principles
      2. Introducing the “Up and Running” Microservices Model
    4. Summary
  2. 2. Five Principles
    1. Why Principles Matter
    2. Goals and Principles
    3. People-First Design
    4. Rightsized Services
    5. Build-Services-Only
    6. Single-Cloud Architecture
    7. 12 Factor Development
      1. 1. “One codebase tracked in revision control, many deploys”
      2. 2. “Explicitly declare and isolate dependencies”
      3. 3. “Store config in the environment”
      4. 4. “Treat backing services as attached resources”
      5. 5. “Strictly separate build and run stages”
      6. 6. “Execute the app as one or more stateless processes”
      7. 7. “Export services via port binding”
      8. 8. “Scale out via the process model”
      9. 9. “Maximise robustness with fast startup and graceful shutdown”
      10. 10. “Keep development, staging, and production as similar as possible”
      11. 11. “Treat logs as event streams”
      12. 12. “Run admin/management tasks as one-off processes”
    8. Summary
  3. 3. Designing Your Microservices Operating Model
    1. Your Microservices Operating Model
    2. The Architectural Decision Record
    3. Designing Microservice Teams
      1. The Responsibilities of the Microservice Team
      2. Team Size
      3. Team Design Templates
      4. ACTION: Assemble Your Team
    4. Shared Components and Platform Teams
      1. The Distributed Monolith
      2. The Platform Team
    5. Governance, Guardrails and Choice Architecture
    6. Our Operating Model
      1. The Up and Running Teams
    7. Summary
  4. 4. Infrastructure Pipeline
    1. DevOps Principles and Practices
      1. Immutable Infrastructure
      2. Infrastructure as Code
      3. Continuous Integration and Continuous Delivery
    2. Setting up the Infrastructure as Code Environment
      1. Set up Github
      2. Install Terraform
    3. Configure Amazon Web Services
      1. Set up an AWS Operations Account
      2. Configure The AWS CLI
      3. Setup AWS Permissions
      4. Create an S3 Backend for Terraform
    4. Build an Infrastructure as Code Pipeline
      1. Create the Sandbox Repository
      2. Understanding Terraform
      3. Writing the Sandbox Code
      4. Build the Pipeline
      5. Test the Pipeline
    5. Architecture Decision Record: Infrastructure Pipeline
    6. Summary
  5. 5. Building a Microservice Infrastructure
    1. Infrastructure Components
      1. The Network
      2. The Kubernetes Service
      3. Service Mesh
      4. Continuous Delivery Server
    2. Implementing The Infrastructure
      1. Getting Your Workspace Ready
      2. Setting Up The Module Repositories
      3. The Network Module
      4. The Kubernetes and Istio Module
      5. Setting up Argo CD
      6. Testing the Environment
      7. Clean Up the Infrastructure
    3. Summary
  6. 6. Designing Microservices: The SEED(S) Process
    1. Introducing the Seven Essential Evolutions of Design for Services - SEED(S) Method
    2. Identifying Actors
      1. Example Actors In Our Sample Project
    3. Identifying Jobs to Be Done (JTBDs)
      1. Using Job Story Format to Capture JTBDs
      2. Example JTBDs In Our Sample Project
    4. Designing queryable and actionable 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 Spec, With An Open Standard
      1. Example Open API Spec for an Action In Our Sample Project
    7. Getting Feedback on the API spec
    8. Implementing Microservices
    9. Microservices vs. APIs
    10. Summary
  7. 7. 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. Basic Notions of Domain-Driven Design
      2. Context Mapping
      3. Synchronous vs. Asynchronous Relationships
      4. A DDD Aggregate
    3. Introduction to Event Storming
      1. Event-Storming Process
    4. The universal sizing formula
      1. The Universal Sizing Formula
    5. Summary
  8. 8. Dealing with the Data
    1. Design Considerations For Data Management in Microservices
    2. Microservices Embed Their data
      1. Important Nuances of Embedding Data with Microservices.
      2. Data Embedding Example For Our Sample Project
      3. Using Data Duplication To Solve For Independence
      4. Distributed Transactions and Surviving Failures
    3. Event Sourcing and CQRS
      1. Event Sourcing
      2. Event Store
      3. Command Query Responsibility Segregation (CQRS)
    4. ES/CQRS Beyond Microservices
    5. Summary
  9. 9. Developer Workspace
    1. Coding Standards and Developer’s Setup
      1. 10 Workspace Guidelines for a Superior Developer Experience
    2. Setting Up Containerized Environment Locally
      1. Installing Multipass
      2. Entering the container, and mapping folders.
    3. Installing Docker
      1. Testing Docker
    4. Installing Kubernetes
    5. Bonus: Installing Cassandra.
    6. Summary
  10. 10. Developing Microservices
    1. Designing Microservice Endpoints
      1. Flights Microservice
      2. Reservations Microservice
      3. Designing Open API Spec
    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
    4. Introducing a Second Microservice to the Project
    5. Hooking Services Up With an Umbrella Project
    6. Summary
  11. 11. Building your Microservice Pipeline: From Test to Release
    1. Setting up the Staging Environment
      1. The Nginx Ingress Module
      2. The Database Module
      3. Fork the Staging Infrastructure Project
      4. Configure the Staging Workflow
      5. Edit The Staging Infrastructure Code
    2. Microservices Continuous Integration
      1. Introducing Docker Hub as our Container Registry
      2. Configuring DockerHub
      3. Configuring the CI Workflow
    3. Deploying the Flights Service
      1. Understanding Kubernetes Deployments
      2. Creating a Helm Chart
      3. Create the Microservice Deployment Repository
      4. ArgoCD for GitOps Deployment
    4. Configuring the AWS API Gateway
      1. Setting up the API User
      2. Fork the API Gateway Repository
      3. Customise the API Gateway Terraform File
      4. Testing the API
    5. Clean Up
    6. Summary
3.143.9.115