Don’t Build a Distributed Monolith - Jonathan "J." Tower - NDC London 2023
by NDC Conferences
📚 Main Topics
Introduction to Microservices
- Definition and advantages of microservices.
- Comparison with monolithic architecture.
Understanding Monoliths and Distributed Monoliths
- Characteristics of traditional monoliths.
- The concept of a distributed monolith and its pitfalls.
Common Mistakes in Microservices Implementation
- Ten pitfalls that lead to the creation of distributed monoliths.
Migration Strategies
- Approaches to transitioning from monolithic to microservices architecture.
Best Practices for Microservices
- Recommendations for designing and implementing microservices effectively.
✨ Key Takeaways
- Microservices vs. MonolithsMicroservices allow for independent deployment and scalability, while monoliths are easier to build and maintain in simpler applications.
- Distributed MonolithsOften arise from poor implementation of microservices, leading to tightly coupled services that perform worse than both monoliths and well-architected microservices.
- Common Pitfalls
- Assuming microservices are always better.
- Using shared data stores or models.
- Creating microservices that are too large or too small.
- Starting from scratch without leveraging existing systems.
- Coupling through cross-cutting concerns (e.g., logging).
- Using synchronous communication between services.
- Breaking changes to event contracts.
- Not automating builds and releases.
- Unencapsulated services leading to high coupling.
- Mismatched teams leading to monolithic structures.
🧠 Lessons Learned
- Evaluate the Need for MicroservicesNot every project requires a microservices architecture; assess the specific needs and scale of the application.
- Design for Loose CouplingEnsure that services are loosely coupled to avoid the pitfalls of a distributed monolith.
- Implement CI/CDAutomate builds and deployments to enhance the benefits of microservices.
- Use Event-Driven CommunicationFavor asynchronous communication to maintain service independence and improve performance.
- Understand Team DynamicsAlign team structures with service boundaries to prevent the re-emergence of monolithic designs.
📚 Further Reading
- Books by Sam Newman and Chris Richardson on microservices and domain-driven design.
- Resources on cloud-native architectures and the principles of microservices.
This summary encapsulates the key points discussed in the talk, providing a clear understanding of how to effectively implement microservices while avoiding common pitfalls.