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

Microservices adoption practical lessons with examples by Dmitry Lebedev

Riga Dev Day
March 13, 2016
110

Microservices adoption practical lessons with examples by Dmitry Lebedev

Riga Dev Day

March 13, 2016
Tweet

More Decks by Riga Dev Day

Transcript

  1. DMITRY LEBEDEV • Software engineer • 20 years in software

    development • Dozens of project delivered • Couple of projects failed • Still learn how to solve problems • Works for Norwegian company AMBITA
  2. MICROSERVICES CAN HELP • To grow in a balanced way

    • Separate the responsibilities • Define the boundaries • Adapt to new challenges
  3. CONCEPT • Relatively small pieces of software • Working together

    as a separate isolated system • Which is highly adaptable due to it’s nature Copyright © 2014 Chris Richardson microservices.io
  4. BENEFITS • Easy to scale development • Easy to deploy

    changes • Fault isolation • Technology diversity
  5. PROBLEMS TO ADDRESS • How to expose services to outer

    world? • Do you need technology diversity? • How to find what is really broken? • Which version of components are deployed? • Where data is coming from?
  6. INTERMEDIARY CONCLUSION • API design principles • Failure strategy •

    Deployment / dep management tools • Service discovery • Health-check services
  7. API DESIGN • External API should not be UI driven

    (if you expose it) • Think how to have different versions of same API • Think how to reflect failures
  8. FAILURE STRATEGY • Gradation of a failure (total, partial, just

    delayed data) • 3rd party end-points unavailable • ‘Circuit breaker’ pattern
  9. DEPLOYMENT / DEP MANAGEMENT • Deploy one specific version to

    specified instances • Check if all dependencies are in place • Deploy missing components • Register deployed components at service registry • Environment provisioning
  10. SERVICE DISCOVERY • Services got registered when deployed/started • Services

    got de-registered when stopped/undeployed • Client-side discovery • Server-side discovery
  11. HEALTH CHECK SYSTEMS • Log aggregation and search • System

    dashboard (number of instances, versions & etc) • Statistics (throughput, response time, load)
  12. NO RELEVANT INFRASTRUCTURE By Ness Kerson/madNESS Photography for AusAID, CC

    BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=32165089
  13. MULTIPLE DATASOURCES By Frank Vincentz - Own work, CC BY-SA

    3.0, https://commons.wikimedia.org/w/index.php?curid=5638446
  14. DIFFERENT LOAD AND SIZE By Eddy Van 3000 - Flickr:

    Friends, CC BY-SA 2.0, https://commons.wikimedia.org/w/index.php?curid=32821544
  15. HIGH AVAILABILITY REQUIRED By ŠJů, Wikimedia Commons, CC BY 4.0,

    https://commons.wikimedia.org/w/index.php?curid=41179082
  16. RE-CAP: WE DON’T NEED IT • Load is equally distributed

    • 99.999 availability is not required • Dynamic scaling is not required • No infrastructure that supports microservices
  17. RE-CAP: WE NEED IT • Data comes from different sources

    • High availability required • Several teams are working together • Infrastructure is in place