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 Slide

  2. @BLITHE

    View Slide

  3. View Slide

  4. MICROSERVICES
    So…

    View Slide

  5. A MONOLITH
    vs.

    View Slide

  6. MICROSERVICES

    View Slide

  7. WHY ARE
    MICROSERVICES
    SO POPULAR?

    View Slide

  8. INDEPENDENT
    DEPLOYMENT & SCALABILITY
    1
    REASON

    View Slide

  9. 1
    REASON

    View Slide

  10. 1
    REASON

    View Slide

  11. 1
    REASON

    View Slide

  12. 1
    REASON

    View Slide

  13. 1
    REASON

    View Slide

  14. 1
    REASON

    View Slide

  15. COMPARTMENTALIZE
    TEAMS & RESPONSIBILITIES
    2
    REASON

    View Slide

  16. TECHNICAL
    DESIGN FREEDOM
    3
    REASON

    View Slide

  17. FAULT TOLERANCE
    4
    REASON

    View Slide

  18. WHY ME?

    View Slide

  19. MAKING MISTAKES
    & LEARNING FROM THEM
    Experience

    View Slide

  20. STORY TIME

    View Slide

  21. SUPPORTING NEW CONTENT TYPE
    1
    STORY
    Story

    View Slide

  22. STORY: Supporting New Content Type

    View Slide

  23. STORY: Supporting New Content Type

    View Slide

  24. STORY: Supporting New Content Type

    View Slide

  25. CONTENT-TYPE: TEXT/HTML

    STORY: Supporting New Content Type

    View Slide

  26. STORY: Supporting New Content Type

    View Slide

  27. STORY: Supporting New Content Type

    View Slide

  28. STORY: Supporting New Content Type
    PROBLEM?

    View Slide

  29. STORY: Supporting New Content Type
    REMEDIES

    View Slide

  30. REMOVING A FEATURE FLAG
    2
    STORY
    Story

    View Slide

  31. UI Authorization Service
    STORY: Removing Feature Flags

    View Slide

  32. DELETING CODE
    Yay!
    STORY: Removing Feature Flags

    View Slide

  33. PROBLEM?
    STORY: Removing Feature Flags

    View Slide

  34. REMEDIES
    STORY: Removing Feature Flags

    View Slide

  35. TIGHTLY COUPLED SERVICES
    3
    STORY
    Story

    View Slide

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

    View Slide

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

    View Slide

  38. STORY: Tightly Coupled Services
    PRODUCTION

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  42. STORY: Tightly Coupled Services
    DEVELOPMENT

    View Slide

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

    View Slide

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

    View Slide

  45. STORY: Tightly Coupled Services
    AUTOMATED TESTING

    View Slide

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

    View Slide

  47. STORY: Tightly Coupled Services
    VCR RECORDING
    Solution?

    View Slide

  48. STORY: Tightly Coupled Services
    API Responses - 1992

    View Slide

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

    View Slide

  50. STORY: Tightly Coupled Services
    PROBLEM?

    View Slide

  51. STORY: Tightly Coupled Services
    REMEDIES

    View Slide

  52. STORY: Tightly Coupled Services

    View Slide

  53. STORY: Tightly Coupled Services

    View Slide

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

    View Slide

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

    View Slide

  56. STRING VS INTEGER
    4
    STORY
    Story

    View Slide

  57. STORY: String vs. Integer

    View Slide

  58. STORY: String vs. Integer

    View Slide

  59. STORY: String vs. Integer

    View Slide

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

    View Slide

  61. STORY: String vs. Integer

    View Slide

  62. STORY: String vs. Integer

    View Slide

  63. STORY: String vs. Integer

    View Slide

  64. STORY: String vs. Integer

    View Slide

  65. STORY: String vs. Integer

    View Slide

  66. STORY: String vs. Integer

    View Slide

  67. STORY: String vs. Integer

    View Slide

  68. STORY: String vs. Integer

    View Slide

  69. PROBLEM?
    STORY: String vs. Integer

    View Slide

  70. REMEDIES
    STORY: String vs. Integer

    View Slide

  71. SUMMARY & TAKE AWAYS

    View Slide

  72. THANKS!
    Questions?
    @Blithe

    View Slide

  73. View Slide