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 full-size slide

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

    View full-size slide

  3. Monoliths
    Microservices

    View full-size slide

  4. MICROSERVICES:
    A FUTURE
    TO BELIEVE IN

    View full-size slide

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

    View full-size slide

  6. saksfifthavenue.com

    View full-size slide

  7. January 2016

    View full-size slide

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

    View full-size slide

  9. Ruby
    on Rails
    Postgres
    Gilt monolith (2009)

    View full-size slide

  10. 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 full-size slide

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

    View full-size slide

  12. 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 full-size slide

  13. 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 full-size slide

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

    View full-size slide

  15. Lots
    Of
    Small
    Applications

    View full-size slide

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

    View full-size slide

  17. large UI monolith
    smaller UI apps

    View full-size slide

  18. 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 full-size slide

  19. Lots
    Of
    Small
    Bugs
    Lots
    Of
    Small
    Applications

    View full-size slide

  20. 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 full-size slide

  21. binary
    coupling
    gilt.com (2013)

    View full-size slide

  22. binary coupling
    can emerge in large
    microservice systems

    View full-size slide

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

    View full-size slide

  24. how to mitigate
    binary coupling?

    View full-size slide

  25. API descriptors
    +
    code generation

    View full-size slide

  26. ApiBuilder
    gilt.com (2014)

    View full-size slide

  27. describe REST API
    in a JSON file

    View full-size slide

  28. www.apibuilder.io

    View full-size slide

  29. code generation

    View full-size slide

  30. Web
    Checkout
    Android
    Checkout
    iPhone
    Checkout
    Checkout
    service

    View full-size slide

  31. ApiBuilder CLI

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  35. lessons learned
    from
    gilt.com

    View full-size slide

  36. decentralized
    decision making

    View full-size slide

  37. minimize
    undifferentiated
    heavy lifting

    View full-size slide

  38. one path to production

    View full-size slide

  39. small, autonomous
    teams

    View full-size slide

  40. end-to-end
    ownership

    View full-size slide

  41. deploy to production
    everyday

    View full-size slide

  42. small incremental
    releases

    View full-size slide

  43. ApiBuilder is awesome

    View full-size slide

  44. developer experience
    matters

    View full-size slide

  45. continuous
    improvement

    View full-size slide

  46. testing in production

    View full-size slide

  47. feature flags

    View full-size slide

  48. engineering velocity
    is a
    competitive advantage

    View full-size slide

  49. HBC 2018
    multi-tenant services
    ApiBuilder
    safe deployments

    View full-size slide

  50. Mark Zuckerberg

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  54. continuous delivery

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  61. safe
    AWS Lambda
    deployments?

    View full-size slide

  62. traffic shifting

    View full-size slide

  63. 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 full-size slide

  64. AWS traffic hooks
    • PreTraffic hook
    • PostTraffic hook

    View full-size slide

  65. Final thoughts

    View full-size slide

  66. autonomous teams

    View full-size slide

  67. engineering velocity is a
    competitive advantage

    View full-size slide

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

    View full-size slide