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

Monorails Application Design vs Cult of Microse...

Nick Bienko
October 22, 2016

Monorails Application Design vs Cult of Microservices

RailsClub 2016 Talk

Nick Bienko

October 22, 2016
Tweet

More Decks by Nick Bienko

Other Decks in Technology

Transcript

  1. Overview • Overview of Monolith vs Microservices • Why you

    should start with monolith • How to design monolith • How to split monolith 2
  2. Pros of microservices • Maintainability • Granular scalability • Granular

    deploy • Reliability • Resilience • Separation of Concerns • Right tool for job • Management (small teams, fast delivery) 3
  3. Problems with microservices • Technology hell • Deployment complexity •

    Latency between services • Network failures • Complex integration testing • Data consistency • Management (Conway’s law) 4
  4. Prerequisites for microservices • Clear boundaries • Experienced team •

    DevOps (provisioning, simple deployment) • Monitoring • Logging • Design for failures • Appropriate teams structure 5
  5. Monolith for the rescue • All successful companies started with

    monolith • Architectures are temporary • Evolutionary Design 8
  6. Monolith First 9 "The only thing a Big Bang rewrite

    guarantees is a Big Bang!” – Martin Fowler http://martinfowler.com/bliki/MonolithFirst.html
  7. Monolith: The Good Parts • Easier debugging (between call stack

    instead of socket) • No latency or network failures • Fast delivery • Easy deploy and provisioning • Less problems with monitoring • Separation of Concerns (when done right) • Good for small and medium teams • Good enough scaling (Stackoverflow, Shopify) 10
  8. How to design monolith • Bounded Contexts • Domain Events

    • Event-Driven Architecture • Component-based Architecture • Failures handling 11
  9. Bounded Contexts • Separation of Concerns • Loose Coupling •

    High Cohesion 12 http://martinfowler.com/bliki/BoundedContext.html
  10. LMS Example Bounded Contexts: • LMS • GitLab • Notifications

    • ImportService • Calendar • Feed 13
  11. Qlean Example • Billing • Notifications Service • Accounting •

    Reporting • HR CRM • CRM • Recommendations • Pricing and Services management • Subscription management 15
  12. How to design monolith • Design internal bounded components •

    Clear interfaces between components • Pass only serializable objects between boundaries • Use Event-Driven approach • Improve infrastructure (logging, monitoring, provisioning) • Design for failures 33