Home Page Icon
Home Page
Table of Contents for
Cover
Close
Cover
by Sam Newman
Building Microservices, 2nd Edition
1. What Are Microservices?
Microservices at a Glance
Key Concepts of Microservices
Independently Deployability
Modelled Around a Business Domain
Owning Their Own State
Size
Flexibility
Alignment of Architecture and Organization
The Monolith
The Single-Process Monolith
The Modular Monolith
The Distributed Monolith
Monoliths and Delivery Contention
Advantages of Monoliths
Enabling Technology
Log Aggregation and Distributed Tracing
Containers and Kubernetes
Streaming
Public Cloud and Serverless
Advantages of Microservices
Technology Heterogeneity
Robustness
Scaling
Ease of Deployment
Organizational Alignment
Composability
Microservice Pain Points
Developer Experience
Technology Overload
Reporting
Monitoring and Troubleshooting
Security
Testing
Latency
Data Consistency
Should I Use Microservices?
Who They Might Not Work For
Where They Work Well
Summary
2. How to Model Microservices
Introducing MusicCorp
What Makes a Good Microservice Boundary?
Information Hiding
Cohesion
Coupling
The Interplay of Coupling And Cohesion
Types Of Coupling
Domain Coupling
Pass Though Coupling
Common Coupling
Content Coupling
Alternatives to Domain-Oriented Decomposition
Volatility
Data
Technology
Organizational
Different Goals, Different Drivers
Mixing Models And Exceptions
Just Enough Domain-Driven Design
Ubiquitous Language
Aggregate
Bounded Context
Mapping Aggregates and Bounded Contexts to Microservices
Turtles All the Way Down
The Dangers Of Premature Decomposition
Communication in Terms of Business Concepts
Event-storming
Logistics
The Process
Summary
3. Microservice Communication Styles
From In-Process To Inter-Process
Performance
Changing Interfaces
Error handling
Technology for Inter-process Communication: So Many Choices
Styles of Microservice Communication
Pattern: Synchronous Blocking
Advantages
Disadvantages
Where To Use It
Pattern: Asynchronous Non-blocking
Advantages
Disadvantages
Where To Use It
Pattern: Communication Through Common Data
Implementation
Advantages
Disadvantages
Where To Use It
Pattern: Request-Response Communication
Implementation: Synchronous vs Asynchronous
Where To Use It
Pattern: Event-Driven Communication
Implementation
What’s In An Event?
Did It Work?
Summary
4. Implementing Microservice Communication
Make Backwards Compatibility Easy
Make Your Interface Explicit
Keep Your APIs Technology-Agnostic
Make Your Service Simple for Consumers
Hide Internal Implementation Detail
Remote Procedure Calls
Challenges
Where To Use It
REST
REST and HTTP
Hypermedia As the Engine of Application State
Challenges
Where To Use It
GraphQL
Challenges
Where To Use It
Message Brokers
Topics and Queues
Guaranteed Delivery
Trust
Other Characteristics
Choices
Kafka
Serialization Formats
Textual Formats
Binary Formats
Schemas
Structural vs Semantic Contract Breakages
Should You Use Schemas?
Handling Change Between Microservices
Avoiding Breaking Changes
Expansion Changes
Tolerant Reader
Right Technology
Explicit Interface
Catch Accidental Breaking Changes Early
Managing Breaking Changes
Lock-Step Deployment
Coexist Incompatible Microservice Versions
Emulate The Old Interface
Which Approach Do I Prefer?
The Social Contract
Tracking Usage
Extreme Measures
DRY and the Perils of Code Reuse in a Microservice World
Sharing Code Via Libraries
Summary
5. Build
A Brief Introduction to Continuous Integration
Are You Really Doing CI?
Branching Models
Build Pipelines and Continuous Delivery
Tooling
Tradeoffs and Environments
Artifact Creation
Mapping Source Code and Builds to Microservices
One Giant Repo, One Giant Build
Pattern: One Repository Per Microservice (aka Multi-Repo)
Pattern: Monorepo
Which Approach Would I Use?
Summary
6. Deployment
From Logical to Physical
Multiple Instances
The Database
Environments
Principles Of Microservice Deployment
Isolated Execution
Focus On Automation
Infrastructure As Code
Zero-downtime Deployment
Desired State Management
Deployment Options
Physical Machines
Virtual Machines
Containers
Application Containers
Platform As A Service (PAAS)
Function As A Service (FAAS)
Which Deployment Option Is Right For You?
Kubernetes & Container Orchestration
The Case For Container Orchestration
A Simplified View Of Kubernetes Concepts
Multi-Tenancy and Federation
The Cloud Native Computing Federation
Platforms and Portability
Helm, Operations and CRDs, oh my!
And Knative
The Future
Should You Use It?
Progressive Delivery
Separating Deployment From Release
On To Progressive Delivery
Feature Toggles
Canary Release
Parallel Run
Summary
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Next
Next Chapter
Building Microservices
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset