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

Microservices - Portland Oregon 2018-09-25

sullis
September 25, 2018

Microservices - Portland Oregon 2018-09-25

Microservices

Portland Java User Group
Portland Oregon
September 25, 2018

#hbctech #pdxtech #java #scala #microservices

sullis

September 25, 2018
Tweet

More Decks by sullis

Other Decks in Technology

Transcript

  1. Sean Sullivan
    September 25, 2018
    Portland Java User Group
    MICROSERVICES
    AT HBC

    View Slide

  2. software engineer
    Portland Oregon
    back office systems
    Hudson’s Bay Company
    About me

    View Slide

  3. Monoliths
    Microservices

    View Slide

  4. MICROSERVICES:
    A FUTURE
    TO BELIEVE IN

    View Slide

  5. saksfifthavenue.com
    saksoff5th.com
    lordandtaylor.com
    thebay.com

    View Slide

  6. saksfifthavenue.com

    View Slide

  7. January 2016

    View Slide

  8. June 2018

    View Slide

  9. 2009 large monolith
    2010 a few services
    2011 microservices
    gilt.com

    View Slide

  10. Ruby
    on Rails
    Postgres
    Gilt monolith (2009)

    View Slide

  11. Gilt monolith (2009)
    customer facing UI
    customer service UI
    purchase order
    management
    shopping cart logic
    checkout logic
    order processing logic
    fraud scanning
    sales management
    inventory management
    email
    return logic
    daily reports

    View Slide

  12. Gilt monolith (2009)
    drawbacks
    • unintended coupling of feature releases
    • single repo for customer-facing UI and non-
    customer-facing UI
    • rollbacks were painful

    View Slide

  13. Gilt monolith (2009)
    drawbacks
    • central coordination of each release
    • difficult to scale to higher levels of traffic
    • difficult to upgrade to new version of Ruby
    on Rails

    View Slide

  14. Gilt services (2011)
    product
    service
    inventory
    reservation
    service
    shopping
    cart
    service
    user
    service
    checkout
    service
    credit card
    service
    kvstore
    service
    discount
    service
    order
    history
    service

    View Slide

  15. 2012 L.O.S.A.
    2013 binary coupling hell
    2014 ApiBuilder
    gilt.com

    View Slide

  16. L.O.S.A. ?

    View Slide

  17. Lots
    Of
    Small
    Applications

    View Slide

  18. Customer facing UI
    was a monolithic app
    (hundreds of JSP’s in a
    single Git repo)

    View Slide

  19. large UI monolith
    smaller UI apps

    View Slide

  20. Gilt L.O.S.A.
    web-
    product-
    detail
    web-
    homepage
    web-mosaic
    web-search
    web-
    account
    web-
    checkout
    web-login
    web-
    navigation
    web-seo-
    page

    View Slide

  21. Lots
    Of
    Small
    Bugs
    Lots
    Of
    Small
    Applications

    View Slide

  22. Benefits of L.O.S.A.
    easier to troubleshoot UI bugs
    easier to implement bug fixes
    easier to test fixes
    easier to release fixes to production

    View Slide

  23. binary
    coupling
    gilt.com (2013)

    View Slide

  24. binary coupling
    can emerge in large
    microservice systems

    View Slide

  25. binary coupling was a
    significant problem at
    Gilt.com and Netflix

    View Slide

  26. View Slide

  27. how to mitigate
    binary coupling?

    View Slide

  28. API descriptors
    +
    code generation

    View Slide

  29. ApiBuilder
    gilt.com (2014)

    View Slide

  30. describe REST API
    in a JSON file

    View Slide

  31. www.apibuilder.io

    View Slide

  32. View Slide

  33. code generation

    View Slide

  34. Web
    Checkout
    Android
    Checkout
    iPhone
    Checkout
    Checkout
    service

    View Slide

  35. ApiBuilder CLI

    View Slide

  36. $ brew install apibuilder-cli
    $ cd myproj
    $ vi .apibuilder/config
    $ apibuilder update

    View Slide

  37. 2015 migrate to AWS
    2016 AWS cloud native
    gilt.com

    View Slide

  38. 2017 embrace serverless
    2018 payment platform v3
    2018 shutdown
    gilt.com

    View Slide

  39. lessons learned
    from
    gilt.com

    View Slide

  40. decentralized
    decision making

    View Slide

  41. minimize
    undifferentiated
    heavy lifting

    View Slide

  42. one path to production

    View Slide

  43. small, autonomous
    teams

    View Slide

  44. end-to-end
    ownership

    View Slide

  45. deploy to production
    everyday

    View Slide

  46. small incremental
    releases

    View Slide

  47. ApiBuilder is awesome

    View Slide

  48. developer experience
    matters

    View Slide

  49. continuous
    improvement

    View Slide

  50. testing in production

    View Slide

  51. feature flags

    View Slide

  52. engineering velocity
    is a
    competitive advantage

    View Slide

  53. View Slide

  54. HBC 2018
    multi-tenant services
    ApiBuilder
    safe deployments

    View Slide

  55. Mark Zuckerberg

    View Slide

  56. Move Fast and Break Things
    Move Slow and Don’t Break Things

    View Slide

  57. https://twitter.com/jaykreps/status/312338174108106754

    View Slide

  58. Move Fast and Don’t Break Things
    Move Purposefully and Fix Things

    View Slide

  59. continuous delivery

    View Slide

  60. https://twitter.com/evanderkoogh/status/1036787227697664000

    View Slide

  61. View Slide

  62. HBC email types
    • order acknowledgement
    • order shipment partial
    • order shipment full
    • order cancel
    • ready for pickup in store

    View Slide

  63. Queue
    consumer
    Event
    queue
    Email
    Dashboard UI
    Email
    Sender
    Email
    Render
    External
    Email
    Provider
    Feature
    Flag
    service

    View Slide

  64. Email
    Render
    Product
    Detail
    service
    Delivery
    Date
    Estimation
    service
    request
    HTML
    Feature
    Flag
    service

    View Slide

  65. HBC email system
    • multi-tenant design
    • Cloudwatch Metrics
    • Cloudwatch Alerts

    View Slide

  66. HBC email system
    • code coverage threshold
    • components deployed independently
    • safe deployments

    View Slide

  67. safe
    AWS Lambda
    deployments?

    View Slide

  68. traffic shifting

    View Slide

  69. You can now shift
    incoming traffic between
    two AWS Lambda
    function versions based on
    pre-assigned weights.
    You can now also
    use AWS
    CodeDeploy to
    automatically manage
    the rollout of new
    function versions.
    This allows you to
    gradually shift traffic
    between two versions source: aws.amazon.com

    View Slide

  70. AWS traffic hooks
    • PreTraffic hook
    • PostTraffic hook

    View Slide

  71. Final thoughts

    View Slide

  72. autonomous teams

    View Slide

  73. ApiBuilder

    View Slide

  74. engineering velocity is a
    competitive advantage

    View Slide

  75. https://www.infoq.com/presentations/microservices-arch-infrastructure-cd

    View Slide

  76. The end

    View Slide

  77. View Slide