$30 off During Our Annual Pro Sale. View Details »

Microservices

 Microservices

Building large systems the easier way
http://risingstack.com

Gergely Nemeth

January 29, 2015
Tweet

More Decks by Gergely Nemeth

Other Decks in Programming

Transcript

  1. Microservices(.js)
    Building large systems the easier way
    Gergely Nemeth
    @nthgergo

    View Slide

  2. $ whoami
    Work - RisingStack
    Twitter - @nthgergo
    GitHub - gergelyke
    Stuff I write - http://blog.risingstack.com

    View Slide

  3. “an approach to developing a single application as a suite of
    small services”
    Microservices

    View Slide

  4. Microservices
    Some “small” implementers:
    Amazon, Netflix, The Guardian

    View Slide

  5. BUT WHY!?
    Microservices

    View Slide

  6. ● built as a single unit
    ● handle HTTP requests, execute domain logic, retrieve and update data from the database, and
    select and populate HTML views to be sent to the browser, handles authentication - in short: does
    everything
    ● any changes to the system involve building and deploying a new version of the server-side
    application
    The Monolithic Way

    View Slide

  7. What about scaling?
    The Monolithic Way

    View Slide

  8. You are going to have a BAD time.
    The Monolithic Way

    View Slide

  9. “Any organization that designs a system (defined broadly) will produce a design
    whose structure is a copy of the organization's communication structure.”
    -- Melvin Conway, 1967
    The Monolithic Way

    View Slide

  10. The Monolithic Way

    View Slide

  11. Back to Microservices
    Cross-functional teams

    View Slide

  12. Microservices
    Advantages
    Small code base

    View Slide

  13. Microservices
    Advantages
    Easy to scale

    View Slide

  14. Microservices
    Advantages
    Easy to throw away

    View Slide

  15. Microservices
    Advantages
    System resilience

    View Slide

  16. Microservices
    Advantages
    Easy to deploy
    You build it, you run it.

    View Slide

  17. Microservices
    Ok. How?

    View Slide

  18. Microservices
    Communication
    HTTP REST interfaces for communication

    View Slide

  19. Microservices
    Communication
    Or messaging over a lightweight message bus
    (RabbitMQ, ZeroMQ, .. )

    View Slide

  20. Microservices
    Communication
    Yes, microservices can be written in different
    languages!

    View Slide

  21. Microservices
    Decentralized Data Management

    View Slide

  22. Microservices
    Automation
    When you own 10s of services, you do not want
    to deploy manually :)

    View Slide

  23. Microservices
    Automation
    Use Continuous Delivery:
    ● automated tests
    ● automated deployments

    View Slide

  24. Microservices
    Design for Failure
    Monitor & Log everything

    View Slide

  25. Microservices
    Design for Failure
    Alerting

    View Slide

  26. Microservices
    How to get started if you have a monolithic architecture?
    Evolutionary Design

    View Slide

  27. Microservices
    Evolutionary Design
    The monolith still is the core of the website

    View Slide

  28. Microservices
    Evolutionary Design
    Add new features by building microservices

    View Slide

  29. Okok, but what is the catch?
    Microservices

    View Slide

  30. Your stack traces are gone
    Microservices

    View Slide

  31. Deploying breaking changes?
    Microservices

    View Slide

  32. Service discovery
    Microservices

    View Slide

  33. ● Small code base
    ● Easy to scale
    ● Easy to throw away
    ● Easy to deploy
    ● System resilience
    ● Possibility to use different tech stacks
    Summary

    View Slide

  34. Yes, we are hiring ;)
    RisingStack

    View Slide

  35. $ ./thanks.sh

    View Slide