Book description
Develop microservice-based enterprise applications with expert guidance to avoid failures and technological debt with the help of real-world examples
Key Features
- Implement the right microservices adoption strategy to transition from monoliths to microservices
- Explore real-world use cases that explain anti-patterns and alternative practices in microservices development
- Discover proven recommendations for avoiding architectural mistakes when designing microservices
Book Description
Microservices have been widely adopted for designing distributed enterprise apps that are flexible, robust, and fine-grained into services that are independent of each other. There has been a paradigm shift where organizations are now either building new apps on microservices or transforming existing monolithic apps into microservices-based architecture.
This book explores the importance of anti-patterns and the need to address flaws in them with alternative practices and patterns. You'll identify common mistakes caused by a lack of understanding when implementing microservices and cover topics such as organizational readiness to adopt microservices, domain-driven design, and resiliency and scalability of microservices. The book further demonstrates the anti-patterns involved in re-platforming brownfield apps and designing distributed data architecture. You’ll also focus on how to avoid communication and deployment pitfalls and understand cross-cutting concerns such as logging, monitoring, and security. Finally, you’ll explore testing pitfalls and establish a framework to address isolation, autonomy, and standardization.
By the end of this book, you'll have understood critical mistakes to avoid while building microservices and the right practices to adopt early in the product life cycle to ensure the success of a microservices initiative.
What you will learn
- Discover the responsibilities of different individuals involved in a microservices initiative
- Avoid the common mistakes in architecting microservices for scalability and resiliency
- Understand the importance of domain-driven design when developing microservices
- Identify the common pitfalls involved in migrating monolithic applications to microservices
- Explore communication strategies, along with their potential drawbacks and alternatives
- Discover the importance of adopting governance, security, and monitoring
- Understand the role of CI/CD and testing
Who this book is for
This practical microservices book is for software architects, solution architects, and developers involved in designing microservices architecture and its development, who want to gain insights into avoiding pitfalls and drawbacks in distributed applications, and save time and money that might otherwise get wasted if microservices designs fail. Working knowledge of microservices is assumed to get the most out of this book.
Table of contents
- Embracing Microservices Design
- Foreword
- Contributors
- About the authors
- About the reviewers
- Preface
- Section 1: Overview of Microservices, Design, and Architecture Pitfalls
-
Chapter 1: Setting Up Your Mindset for a Microservices Endeavor
- Philosophy of microservices
- Microservice design principles
- Building teams to deliver business value faster
- Benefits of microservices
- Challenges of microservices
- Microservice architecture components
- Reviewing leadership responsibilities
- Defining core priorities for a business
- Using the twelve-factor app methodology
- Additional factors for modern cloud-native apps
- Summary
- Questions
- Further reading
-
Chapter 2: Failing to Understand the Role of DDD
- What are microservices and how do they align with DDD?
- Benefits and challenges of microservices as compared to DDD
- Lack of team alignment
- Lack of governance
- The whole is greater than the sum of its parts
- Microservices are based on science
-
Complex or not complex – that is the question
- Obvious contexts – "the domain of best practice"
- Snowden's complicated contexts – "the domain of experts"
- Snowden's complex contexts – "the domain of emergence"
- A thin line between complicated and complex
- Snowden's chaotic context – "the domain of novel solutions"
- Snowden's disorder contexts – "the space in the middle"
- Our path is clear
- Event storming
- DDD
- A lack of awareness of stakeholder needs
- Bounded contexts
- Summary
- Questions
- Further reading
-
Chapter 3: Microservices Architecture Pitfalls
- Layered architecture and its challenges
- Over-architecting microservices
- Overusing frameworks and technologies
- Not abstracting common microservice tasks
- Lack of knowledge about the microservice platform
- Neutralizing the benefits of microservices by adopting a frontend monolithic architecture
- Summary
- Questions
- Further reading
- Chapter 4: Keeping the Replatforming Brownfield Applications Trivial
- Section 2: Overview of Data Design Pitfalls, Communication, and Cross-Cutting Concerns
- Chapter 5: Data Design Pitfalls
-
Chapter 6: Communication Pitfalls and Prevention
- The fundamentals of microservices communication
- Different architectures and their communication styles
- Direct client-to-microservice communication
- The overly complicated API gateway
- Request timeout
- Long chains of synchronous calls – the retry storm
- The dark side of event-driven microservices
- Avoiding service versioning
- Service meshes
- Dapr versus service meshes
- Summary
- Questions
- Further reading
-
Chapter 7: Cross-Cutting Concerns
- Microservices chassis patterns
-
Cross-cutting pitfalls
- Embedding security handling inside microservices
- Not considering resiliency when building microservices
- Not considering idempotency when building microservices
- Embedding protocol translation inside microservices
- Message transformation coupling with microservices
- Directly exposing microservices to consumers
- Keeping configuration inside microservices
- Undiscoverable microservices
- Not maintaining a service template or framework
- Not paying attention to logging and monitoring
- Summary
- Questions
- Section 3: Testing Pitfalls and Evaluating Microservices Architecture
-
Chapter 8: Deployment Pitfalls
- Failing to establish a deployment strategy
- Using outdated tools and technologies
- Failing to obtain cooperation from all teams
- Not considering Infrastructure as Code (IaC) for environment setup
- Not knowing the core principles of DevOps
- Deployment stamps pattern
- Deployment rings
- Geode pattern
- Summary
- Questions
- Chapter 9: Skipping Testing
-
Chapter 10: Evaluating Microservices Architecture
- Identifying the core priorities of a business
- Managing architectural decisions
- Team structure
- Choosing the right methodology
- Decomposition strategy
- Evaluating the DevOps capability
- Understanding which part of the business is going to change more rapidly
- Infrastructure readiness
- Release cycles
- Communication protocol across services
- Exposing services to clients
- Distributed transaction handling
- Service development
- Capabilities of the hosting platform
- Deployment strategy
- Monitoring services
- Assigning a correlation token to each service request
- Defining a microservices chassis framework
- Shift-left approach for testing and security
- Summary
-
Assessments
- Chapter 1: Setting Up Your Mindset for Microservices Endeavor
- Chapter 2: Failing to Understand the Role of DDD
- Chapter 3: Microservices Architecture Pitfalls
- Chapter 4: Keeping the Re-Platforming of Brownfield Applications Trivial
- Chapter 5: Data Design Pitfalls
- Chapter 6: Communication Pitfalls and Prevention
- Chapter 7: Cross-Cutting Concerns
- Chapter 8: Deployment Pitfalls
- Chapter 9: Skipping Testing
- Why subscribe?
- Other Books You May Enjoy
Product information
- Title: Embracing Microservices Design
- Author(s):
- Release date: October 2021
- Publisher(s): Packt Publishing
- ISBN: 9781801818384
You might also like
book
Microservices Development Cookbook
Quickly learn and employ practical methods for developing microservices Key Features Get to grips with microservice …
book
Microservices: Flexible Software Architecture
The Most Complete, Practical, and Actionable Guide to Microservices Going beyond mere theory and marketing hype, …
book
Building Microservices with Micronaut®
Explore different aspects of building modular microservices such as development, testing, maintenance, and deployment using the …
book
Microservices in Action
Microservices in Action is a practical book about building and deploying microservice-based applications. Written for developers …