A pattern catalog matters when it helps teams choose fewer solutions, not accumulate more abstractions.
In real design work, the chapter connects decomposition, tools, internal service patterns, composition, resilience, testing, security, and deployment into one practical operating loop.
In interviews and engineering discussions, it helps talk not only about CQRS and Event Sourcing, but also about the technical conditions that keep a pattern from becoming the next problem.
Practical value of this chapter
Design in practice
Use the pattern catalog as a decision map: from service boundaries and tools to tests, security, and releases.
Decision quality
Select patterns by system symptoms: coupling, latency, throughput, partial-failure risk, and operating cost.
Interview articulation
Show where CQRS, Event Sourcing, Saga, composition, or Circuit Breaker help, and where they add unnecessary complexity.
Failure framing
Track signals such as over-orchestration, event chaos, hidden synchronous dependencies, and missing observability.
Source
Brief overview in Russian
My book review on Tell Me About Tech
Microservice Patterns and Best Practices
Authors: Vinicius Feitosa Pacheco
Publisher: Packt Publishing, 2018
Length: 366 pages
Vinicius Feitosa Pacheco's book on microservice patterns: tools, internal service patterns, composition, CQRS, Event Sourcing, Saga, API Gateway, Circuit Breaker, testing, security, monitoring, and deployment.
Related topic
Monolith to Microservices
Detailed migration patterns from Sam Newman
From monolith to microservices
The book starts with the evolution of architecture styles. A monolith is often the right beginning: it is easier to build, deploy, and debug. As the team and product grow, the same success starts putting pressure on releases, scaling, and support.
Evolution of architectural patterns
Book topic map
Why monolith, SOA, and microservices differ not only by code size, but by who owns change.
Benefits of microservices
Tools and technical foundation
The book does not treat tools as a parade of trendy choices. They matter because a service has to be built, verified, packaged, released, and observed independently from its neighbors.
Language, framework, and contract
Python/nameko, Go/gRPC, and Protocol Buffers show that stack choice should support service contracts, development speed, and a clear interaction model, not just team preference.
Containers and delivery
Docker and CI/CD make a microservice an independently delivered unit that can be versioned, tested, and released without a shared product-wide release window.
Data contracts
Message schemas, event formats, and API contracts matter as much as code: without them, services break each other through incompatible changes.
Operational minimum
Logs, metrics, tracing, readiness checks, and release policy should arrive with the service, otherwise patterns remain diagrams without operational support.
Internal service patterns
Internal patterns keep business logic from being mixed with transport, storage, and infrastructure. This matters even for small services because bad dependencies harden quickly.
Domain boundary
A service should contain a clear model, not just handlers wired directly to a database and a broker.
Ports and adapters
Transport, database, queue, and external APIs connect through adapters so business rules can be tested separately.
Versions and errors
Input validation, explicit errors, and contract versioning protect clients from accidental implementation changes.
Related book
Building Microservices
Sam Newman's seminal work on microservices
Key patterns from the book
The author presents patterns as responses to concrete symptoms: slow releases, cascading failures, unclear contracts, and the rising cost of distributed systems.
CQRS
Separate command and query models for different needs
Event Sourcing
Rebuild state from an event history
Event-driven integration
Asynchronous communication through domain events
Circuit Breaker
Stop calls to unstable dependencies
API Gateway
A single external entry point for client APIs
Saga
Long-running business flow through steps and compensations
Bulkhead
Limit the blast radius of dependency failures
Shared Data
Use a shared data model carefully when speed beats autonomy
Aggregator
Compose responses from multiple services
Proxy
Hide the internal routing path from clients
Chained
Run a scenario through sequential service calls
Branch
Split one request into parallel execution branches
Asynchronous messaging
Move work through queues and event streams
Composition patterns: data, aggregator, proxy, chained, and branch
One service rarely completes an entire user scenario. The book explains how to compose several services into one response or process without turning the composition layer into a new monolith.
Shared Data
Shared Data can connect services quickly through one model, but it raises the risk of hidden coupling and difficult migrations.
Aggregator
Aggregator collects data from several services and returns one coherent response, but it needs an explicit latency budget.
Proxy
Proxy hides the internal call topology and simplifies the client, but can easily accumulate too much business logic.
Chained and Branch
Chained calls are easy to reason about, but accumulate latency. Branch speeds up scenarios through parallelism, but makes partial failure handling harder.
CQRS and Event Sourcing
CQRS (Command Query Responsibility Segregation)
CQRS separates commands that change state from queries that read it. The write model and the read model can evolve independently instead of forcing one data shape to serve every scenario.
- Different data models for reading and writing
- Independent read/write scaling
- Optimization for specific use cases
Event Sourcing
Instead of storing only the current state, the system records the events that can rebuild it. That history helps explain past decisions, recalculate projections, and understand why an object reached its current state.
- Full audit log out of the box
- Ability to replay events
- Temporal queries (state at any point in time)
Key idea: CQRS and Event Sourcing are often used together, but they remain independent choices. You can separate reads and writes without an event log, and you can store state as events without a separate read model.
Integration Patterns
Enterprise Integration Patterns
Classic integration patterns for messaging, routing, and transformation.
Service communication
Synchronous communication
REST and gRPC: the calling service waits for a response here and now.
Asynchronous communication
Message queues and event streaming move work into a broker or event stream.
Ecosystem, resilience, and fault tolerance
The book is clear that microservice architecture needs an ecosystem around each service. It is not enough to make calls; teams also need ways to contain failures, survive load, and recover.
Bulkhead
Bulkheads separate resources for critical flows so one slow path does not stop the whole service.
Circuit Breaker
Circuit Breaker stops call storms against a failing dependency and gives the system time to recover.
Client-side throttling
Client-side throttling reduces pressure before the dependency starts failing.
Testing microservices
In a distributed system, tests have to cover not only service code, but also contracts, integration, degradation, and behavior under an unstable environment.
Contract and signature
Signature tests catch incompatible API or message changes before release.
Random failures
Monkey tests show how the service behaves under unexpected failures and strange inputs.
Chaos engineering
Chaos engineering checks whether real defensive mechanisms survive latency, network loss, and dependency failures.
Security, monitoring, and deployment
The final topics move patterns from design into operation: who may call a service, how teams see failures, and how they release a new version without a large blast radius.
Security
JWT, SSO, and access policies should be part of the service contract, not a late add-on.
Monitoring
Metrics, structured logs, and tracing connect technical failures to user-facing scenarios.
Deployment
Blue/green and incremental releases reduce release risk and make rollback simpler.
Practical examples from the book
The book does not stop at theory: its examples show how the same set of patterns looks across different technology stacks.
Python + nameko
A Python microservice framework with remote procedure calls and event-driven integration.
Go + gRPC
High-performance services with gRPC and Protocol Buffers.
Event Streaming
Kafka and RabbitMQ for asynchronous messaging and event streaming.
Main takeaways
Related chapters
- Building Microservices (short summary) - Core decomposition, autonomy, and platform operations principles that this book’s pattern set builds on.
- Learning Domain-Driven Design (short summary) - DDD foundations for service boundaries, domain language, and team-level contracts in microservice systems.
- Monolith to Microservices (short summary) - A practical migration playbook for incremental transition from monolith to services with controlled risk.
- Event-Driven Architecture: Event Sourcing, CQRS, Saga - A deeper dive into async integration and core patterns that this book introduces as critical building blocks.
- Inter-service communication patterns - Synchronous and asynchronous interaction trade-offs, retries, and backpressure for reliable service communication.
- Why microservices and integration are needed - System-level framing of boundaries and integration trade-offs before selecting specific architecture patterns.
- Software Architecture: The Hard Parts (short summary) - Distributed-system trade-offs and governance practices for operating mature microservice platforms.
