Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Continuous Delivery and Micro Services - A Symbiosis

4,979 views

Published on

Continuous Delivery profits from Micro Services - and the other way round. This presentation shows how the two technologies work together - and how Micro Services can be used to simplify the transition to Continuous Delivery.

Published in: Software

Continuous Delivery and Micro Services - A Symbiosis

  1. 1. Continuous Delivery & Micro Services A Symbiosis Eberhard Wolff Freelancer Head Technology Advisory Board adesso AG http://ewolff.com
  2. 2. Eberhard Wolff - @ewolff Leseprobe: http://bit.ly/CD-Buch
  3. 3. Micro Service Eberhard Wolff - @ewolff
  4. 4. Eberhard Wolff - @ewolff
  5. 5. Eberhard Wolff - @ewolff
  6. 6. How can I implement a new feature??? Eberhard Wolff - @ewolff
  7. 7. Eberhard Wolff - @ewolff L
  8. 8. ECommerce System Eberhard Wolff - @ewolff New Stuff Spring & OSGi
  9. 9. ECommerce System Eberhard Wolff - @ewolff New Stuff NSepwri nSgtu &ff OSGi
  10. 10. Eberhard Wolff - @ewolff HTTP New Stuff Links No legacy code Any technology J Small code base
  11. 11. Little programs are delightful to write in isolation, but the process of maintaining large-scale software is always miserable. Jaron Lanier
  12. 12. Friedenspreis des deutschen Buchhandels
  13. 13. Micro Services: Definition • Small • Independent deployment units • i.e. processes Eberhard Wolff - @ewolff • Any technology • Any infrastructure Micro Service Server Micro Service Server
  14. 14. Components Collaborate Eberhard Wolff - @ewolff Micro Service Micro Service Link REST Messaging Data Replication
  15. 15. Why Micro Services? • Strong modularization • i.e. no unwanted dependencies • Choose best technology for each service • Includes database etc • Teams can deploy new features • Completely independent • Micro Service must provide meaningful set of features Eberhard Wolff - @ewolff
  16. 16. Continuous Delivery Eberhard Wolff - @ewolff
  17. 17. Continuous Delivery: Build Pipeline Manual Explorative Testing Eberhard Wolff - @ewolff Automated Acceptance Testing Commit Stage Automated Capacity Testing Release
  18. 18. Continuous Delivery Eberhard Wolff - @ewolff • Automated provisioning • Fast Feedback • Tests, tests, tests… • Feedback from production • Monitoring • Logs analysis
  19. 19. Why Continuous Delivery? • Faster time to market • i.e. can deploy changes quickly into production • Less risk • Many tests • Automation mean reproducible results • Smaller deployments Eberhard Wolff - @ewolff
  20. 20. Why Continuous Delivery Needs Micro Services Eberhard Wolff - @ewolff
  21. 21. Eberhard Wolff - @ewolff Monolith ECommerce System 3rd party systems Database
  22. 22. Continuous Delivery: Build Pipeline Manual Explorative Testing Eberhard Wolff - @ewolff Automated Acceptance Testing Commit Stage Automated Capacity Testing Release ECommerce System
  23. 23. Build Pipeline: Problems • Complex infrastructure • Huge database • 3rd party integration • Slow feedback • Test everything for each commit • Huge deployment unit • Deployment slow Eberhard Wolff - @ewolff
  24. 24. Eberhard Wolff - @ewolff Micro Services • Small independent deployment units • E.g. interface backwards compatibility • Otherwise Micro Services would need to be deployed together • Sensible set of features • Business features should be deployed independently
  25. 25. Eberhard Wolff - @ewolff Micro Services Order ECommerce System 3rd party systems Item Customer Database
  26. 26. Manual Explorative Testing Manual Explorative Testing Manual Explorative Testing Eberhard Wolff - @ewolff Automated Acceptance Testing Automated Acceptance Testing Automated Acceptance Testing Commit Stage Automated Capacity Testing Release Commit Stage Automated Capacity Testing Release Commit Stage Automated Capacity Testing Release Order Item Customer
  27. 27. Build Pipeline for Micro Services • Independent deployment • Build pipeline per Micro Service • Smaller • Easier to set up • Less features (3rd party systems) • Faster Feedback: Less tests Eberhard Wolff - @ewolff
  28. 28. Eberhard Wolff - @ewolff Micro Services Order ECommerce System 3rd party systems Item Customer Database
  29. 29. Micro Service & Databases • Micro Services don’t share data • i.e. database (schema) per server Eberhard Wolff - @ewolff • Easier schema migration • Easier deployment
  30. 30. Micro Services Design • System becomes a distributed system Eberhard Wolff - @ewolff • The network is not reliable • Micro Services fail • A failed Micro Services must not cause other to fail
  31. 31. Resilience Eberhard Wolff - @ewolff
  32. 32. Eberhard Wolff - @ewolff Resilience A system built out of unreliable components with resilience is more robust.
  33. 33. Would you reboot your database just like that? Eberhard Wolff - @ewolff
  34. 34. Amazon Reboot • Amazon Cloud rebooted several machines • Netflix: video streaming • Peak: 30% of internet traffic in the US • 2700 database server • 218 rebooted • 22 not successful • 0 downtime Eberhard Wolff - @ewolff
  35. 35. Risk Mitigation in Continuous Delivery • Blue / Green Deployment • Create complete cluster with new release • Test and only switch if OK • Canary Releasing • Release to a few nodes • Rollback if needed Eberhard Wolff - @ewolff
  36. 36. Micro Services: Further Risk Mitigation • Smaller deployment units • Deployment Failure influences less features • Easier rollback / fixing • Resilience: Other Micro Services still operational Eberhard Wolff - @ewolff
  37. 37. Why Micro Services Eberhard Wolff - @ewolff Need Continuous Delivery
  38. 38. Micro Service & Servers • Potentially different technology stack per service • Individual processes • Each component has its own server • …per stage in the pipeline Eberhard Wolff - @ewolff
  39. 39. Not one server Eberhard Wolff - @ewolff
  40. 40. Not 10 server Eberhard Wolff - @ewolff
  41. 41. But a lot more Eberhard Wolff - @ewolff
  42. 42. Micro Service: Not just a piece of Eberhard Wolff - @ewolff software
  43. 43. Eberhard Wolff - @ewolff Micro Service App + App Server + Database + More infrastructure Individual technology stack
  44. 44. Micro Services & Automation • Infrastructure much more complex • More servers • More services • Need to automate provisioning • (Virtual) Servers • Software • Complete software stacks Eberhard Wolff - @ewolff
  45. 45. Micro Services & Feedback: Eberhard Wolff - @ewolff Logs • Simple grep on a log file not enough • Too many servers • Correlation across servers • Centralized logging needed
  46. 46. Micro Services & Feedback: Eberhard Wolff - @ewolff Monitoring • Just top on a server is not enough • Too many servers • Not just your application… • …also database • …other infrastructure • Centralized monitoring needed
  47. 47. Eberhard Wolff - @ewolff Why??
  48. 48. Quick Deployment Eberhard Wolff - @ewolff Continuous Delivery Delivery Pipeline Independent Deployment Units Micro Services Smaller Deployment Units
  49. 49. Quick Deployment Eberhard Wolff - @ewolff Tests Continuous Delivery Logs Monitoring Fast Feedback
  50. 50. Conclusion Eberhard Wolff - @ewolff
  51. 51. Micro Services & Continuous Delivery: Goal is quick deployment. Eberhard Wolff - @ewolff
  52. 52. Time to Market Eberhard Wolff - @ewolff
  53. 53. Conclusion: Quick Eberhard Wolff - @ewolff Deployments Time Size & Risk Manual Deployment Pipeline Continuous Delivery Pipeline Monolith Micro Services
  54. 54. Eberhard Wolff - @ewolff Conclusion Micro Services Infrastructure much more complex Continuous Delivery Smaller deployment units
  55. 55. Micro Services and Continuous Delivery go together. Eberhard Wolff - @ewolff
  56. 56. You must do both: Continuous Delivery & Micro Services Eberhard Wolff - @ewolff
  57. 57. You must do both: Continuous Delivery & Micro Services Eberhard Wolff - @ewolff
  58. 58. Migration to Continuous Delivery or Micro Services much Eberhard Wolff - @ewolff harder
  59. 59. Migration to Continuous Delivery or Micro Services much Eberhard Wolff - @ewolff harder
  60. 60. Continuous Delivery for a Monolith might be unrealistic Eberhard Wolff - @ewolff
  61. 61. Alternative Approach ECommerce System Database Eberhard Wolff - @ewolff Micro Service Database Integration
  62. 62. Migration to Micro Service and Continuous Delivery • Micro Services can be added to a Monolith • Might use different technologies • Different way to handle legacy applications • Easier to create a Continuous Delivery Pipeline for Micro Service • But: Higher overall complexity Eberhard Wolff - @ewolff
  63. 63. Thank You! Eberhard Wolff - @ewolff

×