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

Microservices War Stories

Microservices War Stories

OSCON 2016

Blithe Rocher

May 18, 2016
Tweet

More Decks by Blithe Rocher

Other Decks in Technology

Transcript

  1. Blithe Rocher
    OSCON
    May 18, 2016
    `
    MICROSERVICES
    WAR STORIES

    View full-size slide

  2. MICROSERVICES
    So…

    View full-size slide

  3. A MONOLITH
    vs.

    View full-size slide

  4. MICROSERVICES

    View full-size slide

  5. WHY ARE
    MICROSERVICES
    SO POPULAR?

    View full-size slide

  6. INDEPENDENT
    DEPLOYMENT & SCALABILITY
    1
    REASON

    View full-size slide

  7. COMPARTMENTALIZE
    TEAMS & RESPONSIBILITIES
    2
    REASON

    View full-size slide

  8. TECHNICAL
    DESIGN FREEDOM
    3
    REASON

    View full-size slide

  9. FAULT TOLERANCE
    4
    REASON

    View full-size slide

  10. MAKING MISTAKES
    & LEARNING FROM THEM
    Experience

    View full-size slide

  11. SUPPORTING NEW CONTENT TYPE
    1
    STORY
    Story

    View full-size slide

  12. STORY: Supporting New Content Type

    View full-size slide

  13. STORY: Supporting New Content Type

    View full-size slide

  14. STORY: Supporting New Content Type

    View full-size slide

  15. CONTENT-TYPE: TEXT/HTML

    STORY: Supporting New Content Type

    View full-size slide

  16. STORY: Supporting New Content Type

    View full-size slide

  17. STORY: Supporting New Content Type

    View full-size slide

  18. STORY: Supporting New Content Type
    PROBLEM?

    View full-size slide

  19. STORY: Supporting New Content Type
    REMEDIES

    View full-size slide

  20. REMOVING A FEATURE FLAG
    2
    STORY
    Story

    View full-size slide

  21. UI Authorization Service
    STORY: Removing Feature Flags

    View full-size slide

  22. DELETING CODE
    Yay!
    STORY: Removing Feature Flags

    View full-size slide

  23. PROBLEM?
    STORY: Removing Feature Flags

    View full-size slide

  24. REMEDIES
    STORY: Removing Feature Flags

    View full-size slide

  25. TIGHTLY COUPLED SERVICES
    3
    STORY
    Story

    View full-size slide

  26. STORY: Tightly Coupled Services
    Microservice
    A
    Database
    Microservice
    B

    View full-size slide

  27. STORY: Tightly Coupled Services
    ALL THE WAY DOWN
    Headaches

    View full-size slide

  28. STORY: Tightly Coupled Services
    PRODUCTION

    View full-size slide

  29. STORY: Tightly Coupled Services
    Microservice
    A
    Database
    Microservice
    B

    View full-size slide

  30. STORY: Tightly Coupled Services
    Microservice
    A
    Database
    Microservice
    B

    View full-size slide

  31. STORY: Tightly Coupled Services
    Microservice
    A
    Database
    Microservice
    B

    View full-size slide

  32. STORY: Tightly Coupled Services
    DEVELOPMENT

    View full-size slide

  33. STORY: Tightly Coupled Services
    SERVICES NOT ISOLATED,
    ALL NEED TO BE RUNNING

    View full-size slide

  34. STORY: Tightly Coupled Services
    Microservice
    A
    Database
    Microservice
    B

    View full-size slide

  35. STORY: Tightly Coupled Services
    AUTOMATED TESTING

    View full-size slide

  36. STORY: Tightly Coupled Services
    Microservice
    A
    Database
    Microservice
    B

    View full-size slide

  37. STORY: Tightly Coupled Services
    VCR RECORDING
    Solution?

    View full-size slide

  38. STORY: Tightly Coupled Services
    API Responses - 1992

    View full-size slide

  39. STORY: Tightly Coupled Services
    VCR GEM
    STORY: Tightly Coupled Services

    View full-size slide

  40. STORY: Tightly Coupled Services
    PROBLEM?

    View full-size slide

  41. STORY: Tightly Coupled Services
    REMEDIES

    View full-size slide

  42. STORY: Tightly Coupled Services

    View full-size slide

  43. STORY: Tightly Coupled Services

    View full-size slide

  44. STORY: Tightly Coupled Services
    BUNDLE EXEC RAKE TEST:REAL

    View full-size slide

  45. STORY: Tightly Coupled Services
    BUNDLE EXEC RAKE TEST:MOCK

    View full-size slide

  46. STRING VS INTEGER
    4
    STORY
    Story

    View full-size slide

  47. STORY: String vs. Integer

    View full-size slide

  48. STORY: String vs. Integer

    View full-size slide

  49. STORY: String vs. Integer

    View full-size slide

  50. ONE ENDPOINT
    TO RULE THEM ALL
    STORY: String vs. Integer

    View full-size slide

  51. STORY: String vs. Integer

    View full-size slide

  52. STORY: String vs. Integer

    View full-size slide

  53. STORY: String vs. Integer

    View full-size slide

  54. STORY: String vs. Integer

    View full-size slide

  55. STORY: String vs. Integer

    View full-size slide

  56. STORY: String vs. Integer

    View full-size slide

  57. STORY: String vs. Integer

    View full-size slide

  58. STORY: String vs. Integer

    View full-size slide

  59. PROBLEM?
    STORY: String vs. Integer

    View full-size slide

  60. REMEDIES
    STORY: String vs. Integer

    View full-size slide

  61. SUMMARY & TAKE AWAYS

    View full-size slide

  62. THANKS!
    Questions?
    @Blithe

    View full-size slide