Don’t Build a Distributed Monolith - Jonathan "J." Tower - NDC London 2023

by NDC Conferences

📚 Main Topics

  1. Introduction to Microservices

    • Definition and advantages of microservices.
    • Comparison with monolithic architecture.
  2. Understanding Monoliths and Distributed Monoliths

    • Characteristics of traditional monoliths.
    • The concept of a distributed monolith and its pitfalls.
  3. Common Mistakes in Microservices Implementation

    • Ten pitfalls that lead to the creation of distributed monoliths.
  4. Migration Strategies

    • Approaches to transitioning from monolithic to microservices architecture.
  5. 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
    1. Assuming microservices are always better.
    2. Using shared data stores or models.
    3. Creating microservices that are too large or too small.
    4. Starting from scratch without leveraging existing systems.
    5. Coupling through cross-cutting concerns (e.g., logging).
    6. Using synchronous communication between services.
    7. Breaking changes to event contracts.
    8. Not automating builds and releases.
    9. Unencapsulated services leading to high coupling.
    10. 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.

Keywords: Architecture cloud Microservices Monolith Jonathan J. Tower NDC Conferences 2023 Live Fun London