Upgrade to Pro — share decks privately, control downloads, hide ads and more …

So You Want to Split Your Monolith: First Steps

Joy Ebertz
November 15, 2022

So You Want to Split Your Monolith: First Steps

I originally presented this deck at API World in San Jose on October 25, 2022 and virtually on November 1, 2022.

The last 5 slides contain links for resources and further reading.

Joy Ebertz

November 15, 2022
Tweet

More Decks by Joy Ebertz

Other Decks in Technology

Transcript

  1. © 2022 Split Software, Inc. API World 2022 So You

    Want to Split Your Monolith: First Steps Joy Ebertz Principal Engineer
  2. © 2022 Split Software, Inc. Agenda • Why split a

    monolith? • Strategies for Splitting a Monolith • Creating a Service Map • Where to Start • Possible Risks & Mitigating Them
  3. © 2022 Split Software, Inc. 10% 10% 10% Deploy 28%

    Chance Of Success 10% 10% 10% 10% 10% 10% 10% 10% 10%
  4. © 2022 Split Software, Inc. Big Bang Pattern Advantages •

    Easier to remove features • Less Transition State Work
  5. © 2022 Split Software, Inc. Strangler Fig Pattern Advantages •

    Less Risk • Lower time to first benefit • Easier to sell
  6. © 2022 Split Software, Inc. Lift and Shift ▸ Typically

    less work ▸ No risk of forgetting features
  7. © 2022 Split Software, Inc. Lift and Shift ▸ Typically

    less work ▸ No risk of forgetting features ▸ should just work
  8. © 2022 Split Software, Inc. Rewrite ▸ Able to remove

    low usage features ▸ Can use newer technologies
  9. © 2022 Split Software, Inc. Rewrite ▸ Able to remove

    low usage features ▸ Can use newer technologies ▸ Can start with best practices
  10. © 2022 Split Software, Inc. Rewrite ▸ Able to remove

    low usage features ▸ Can use newer technologies ▸ Can start with best practices ▸ More able to modularize
  11. © 2022 Split Software, Inc. DDD is an approach to

    developing software for complex needs by deeply connecting the implementation to an evolving model of the core business concepts.
  12. © 2022 Split Software, Inc. DDD Core Concepts • Domains

    and Subdomains • Bounded Contexts • Ubiquitous Language
  13. © 2022 Split Software, Inc. DDD Core Concepts • Domains

    and Subdomains • Bounded Contexts • Ubiquitous Language
  14. © 2022 Split Software, Inc. API Gateway Authentication Service Authorization

    Service Logging/Monitoring Contacting Customers (Email/Phone) (Feature Flags and A/B Testing)
  15. © 2022 Split Software, Inc. DDD Core Concepts • Domains

    and Subdomains • Bounded Contexts • Ubiquitous Language
  16. © 2022 Split Software, Inc. The problem space is defined

    by a domain which consists of one or more subdomains
  17. © 2022 Split Software, Inc. The problem space is defined

    by a domain which consists of one or more subdomains The solution space is defined by a domain model which consists of one or more bounded contexts
  18. © 2022 Split Software, Inc. DDD Core Concepts • Domains

    and Subdomains • Bounded Contexts • Ubiquitous Language
  19. © 2022 Split Software, Inc. Ubiquitous Language Domain Expert Marketing

    Developer Application Code Test Code Specs and Documentation Discussions & whiteboarding
  20. © 2022 Split Software, Inc. Content Subdomain The container object

    that groups different versions of a piece of content and enables Box file- system capabilities. What is a file?
  21. © 2022 Split Software, Inc. Content Subdomain Storage Subdomain The

    container object that groups different versions of a piece of content and enables Box file- system capabilities. A blob of customer-owned data identified by a uniq_name. What is a file?
  22. © 2022 Split Software, Inc. Layered Architecture is a way

    of driving an architecture between the front-end, middle tier and back-end logic to optimize for decoupling and re-use.
  23. © 2022 Split Software, Inc. Your Servers FE Engineers BE

    Engineers Application Layer Backend For Frontend (BFF)
  24. © 2022 Split Software, Inc. Your Servers FE Engineers BE

    Engineers Application Layer Backend For Frontend (BFF)
  25. © 2022 Split Software, Inc. Your Servers FE Engineers BE

    Engineers Application Layer Backend For Frontend (BFF)
  26. © 2022 Split Software, Inc. Example Architecture Application Service Application

    Service Business Capability Service Foundational Backend Service
  27. © 2022 Split Software, Inc. Example Architecture Application Service Application

    Service Business Capability Service Foundational Backend Service
  28. © 2022 Split Software, Inc. Example Architecture Application Service Application

    Service Business Capability Service Foundational Backend Service Backend Service
  29. © 2022 Split Software, Inc. Example Architecture Application Service Application

    Service Business Capability Service Foundational Backend Service Backend Service
  30. © 2022 Split Software, Inc. Typical SOA Architecture Request API

    Gateway Authz Service AuthN Rate Limiting App Services Business Capability Services Foundational Capability Services Logging Event Bus Secrets Management Service Discovery
  31. © 2022 Split Software, Inc. First Services • Low Dependencies

    • Backend for Frontend • Unusual usage patterns • Infrastructure Components • New Features • Major Remodels
  32. © 2022 Split Software, Inc. New Microservice Feature Flag Parity

    Check Monolith logic Log if different Requests
  33. © 2022 Split Software, Inc. New Microservice Feature Flag Parity

    Check Monolith logic Log if different Requests
  34. © 2022 Split Software, Inc. New Microservice Feature Flag Parity

    Check Monolith logic Log if different Requests
  35. © 2022 Split Software, Inc. • Treatments.OLD • Treatments.NEW •

    Treatments.BOTH • Treatments.PARITY Default OFF treatment
  36. © 2022 Split Software, Inc. Summary • Why split a

    monolith? • Strategies for Splitting a Monolith • Creating a Service Map • Where to Start • Possible Risks & Mitigating Them
  37. © 2022 Split Software, Inc. Questions? • Email me: [email protected]

    • Scan the QR code to enter our raffle to win a prize!
  38. © 2022 Split Software, Inc. Further Resources DDD Books •

    Eric Evans’ classic DDD book that started it all (the ‘Blue Book’): Domain Driven Design: Tackling Complexity in the Heart of Software • Vaughn Vernon has a book a bit more on the practical side (the ‘Red Book’): Implementing Domain Driven Design • If you want something a bit shorter Vaughn Vernon also has a shortened version: Domain Driven Design Distilled • For another shorter, more reference driven option, Eric Evans also has: Domain Driven Design Reference • A former colleague recommends Scott Millett’s book: Patterns, Priciples, and Practices of Domain Driven Design
  39. © 2022 Split Software, Inc. Further Resources DDD Articles •

    Getting Started with Domain Driven Design: http://www.informit.com/articles/article.aspx?p=1944876&seqNum=5 • Strategic Domain Driven Design with Context Mapping: https://www.infoq.com/articles/ddd-contextmapping/ • My blog post, A Brief Intro to Domain Driven Design: https://austinstartups.com/a-brief-intro-to-domain-driven-design-326cf1669bbc • Is Design Dead? https://www.martinfowler.com/articles/designDead.html • How Can Domain-driven design help with large scale agile development? http://www.ben-morris.com/how-can-domain-driven-design-help-with-large- scale-agile-development/
  40. © 2022 Split Software, Inc. Further Resources Layered Architecture Articles

    • Thoughtworks has a really great blog post about this topic: https://www.thoughtworks.com/insights/blog/well-factored-approach- securing-roi-your-service-investment-part-2 . Part 1 is here: https://www.thoughtworks.com/insights/blog/well-factored-approach- securing-roi-your-service-investment, but honestly most of the good material is in part 2. • The language in this one is a little bit different, but Mulesoft fundamentally talks about a lot of the same concepts: https://cloud.box.com/s/ggttm7wjsposhrcjxxzdmb3f4uxzp6mg • Another one by Mulesoft. This one doesn't directly talk about the horizontal splitting but does have a great diagram: https://www.linkedin.com/pulse/build- business-capabilities-apis-nial-darbey
  41. © 2022 Split Software, Inc. Further Resources Layered Architecture Articles

    (continued…) • This also covers a lot more material, but in their Identifying Services section, IBM also touches on these concepts: https://www.redbooks.ibm.com/redbooks/pdfs/sg248357.pdf • This talks about more general layering principals, but has a lot of rules of thumb that still apply: https://www.linkedin.com/pulse/build-business-capabilities-apis- nial-darbey • Not directly about these concepts, but Jeff Coble's blog post is somewhat related and a good read: https://medium.com/@jeffcoble/from-product-to- platform-5d6857e55afb • My blog post (Microservices: Building things is easy, building the right thing is hard) also touches briefly on this: https://medium.com/box-tech- blog/microservices-building-things-is-easy-building-the-right-thing-is-hard- b88b6e2474c1
  42. © 2022 Split Software, Inc. Further Resources Strangler Fig Pattern

    & More • Martin Fowler’s updated post on this pattern: https://martinfowler.com/bliki/StranglerFigApplication.html • Some good case studies: https://paulhammant.com/2013/07/14/legacy- application-strangulation-case-studies/ • A blog post where I talk a bit about using feature flags for parity, load and stress testing: https://www.split.io/blog/5-advanced-feature-flag-uses/