Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

I Love APIs 2015: Microservices at Amazon

19.223 Aufrufe

Veröffentlicht am

I Love APIs 2015
Chris Munns, Amazon
@chrismunns
http://www.amazon.com/

As computing costs decreased and computing power grew over time, so increased the complexity of the problems computers were called to solve and complexity of software. Enterprise applications quickly went through the stage of monolithic applications to client-server to multiple tier and beyond – to the land of massively distributed architectures. We arrived at the point where enterprise software is well beyond the capability of a single person or even a reasonably practical group of people to understand and control. Are microsevices the answer? Join Chris Munns to learn about how microservices are scaled at Amazon.

Veröffentlicht in: Software

I Love APIs 2015: Microservices at Amazon

  1. 1. Microservices at Amazon Chris Munns Business Development Manager - DevOps
  2. 2. About me: Chris Munns - munns@amazon.com, @chrismunns – Business Development Manager – DevOps – New Yorker – Previously: •  AWS Solutions Architect 2011-2014 •  Lead of Infrastructure/DevOps @hingeapp •  Formerly on operations teams @Etsy and @Meetup •  Little time at a hedge fund, Xerox and others – Rochester Institute of Technology: Applied Networking and Systems Administration ’05 – Internet infrastructure geek
  3. 3. The Micro-elephant in the room https://www.flickr.com/photos/davidrosenphotography/14711027415/
  4. 4. Microservices “is a software architecture style in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs. These services are small, highly decoupled and focus on doing a small task, facilitating a modular approach to system-building.” - Wikipedia https://en.wikipedia.org/wiki/Microservices
  5. 5. Microservices Smart people are talking about it: •  Sam Newman - book “Building Microservices” O’Reilly Publishing •  Adrian Cockcroft – numerous talks, presentations, blog posts “Loosely coupled service oriented architecture with bounded contexts” •  Martin Fowler – numerous blog posts •  2 sessions at AWS Re:Invent 2014 •  ~8 sessions at AWS Re:Invent 2015
  6. 6. But is it just a fad? Phil Calcado(ex-SoundCloud) in his Sept 8th post entitled “How we ended up with microservices.” highlighted the recent growth of the term: Data from Google Trends http://philcalcado.com/2015/09/08/how_we_ended_up_with_microservices.html
  7. 7. But is it just a fad? As they say in dramatic police dramas….Let’s ENHANCE!: Data from Google Trends
  8. 8. Lots of folks are doing it • Gilt: “From Monolith Ruby App to Distributed Scala Micro- Services” NYC Tech Talks • Nike: “Nike’s Journey to Microservices” – AWS Re:Invent 2014 • SoundCloud: ”Building Products at SoundCloud—Part III: Microservices in Scala and Finagle” • Capital One: “Lack Of Legacy Lets Capital One Build Nimble Infrastructure” – ThePlatform.net • Hailo: “A Journey into Microservices” – sudo.hailoapp.com
  9. 9. Brilliant folks are sharing tools for it • Netflix: Dozens of tools - https://netflix.github.io/ • Airbnb: SmartStack - http://nerds.airbnb.com/ smartstack-service-discovery-cloud/ • Twitter: Mesos - https://mesos.apache.org/ • LinkedIn: Rest.li - https://github.com/linkedin/ rest.li
  10. 10. Monolith development lifecycle developers releasetestbuild delivery pipelineapp
  11. 11. •  Single-purpose •  Connect only through APIs •  Connect over HTTPS •  Largely “black boxes” to each other •  “Microservices”
  12. 12. Microservices vs. SOA Wikipedia: “distinct from a Service-oriented architecture (SOA) in that the latter aims at integrating various (business) applications whereas several microservices belong to one application only” Martin Fowler: “This common manifestation of SOA has led some microservice advocates to reject the SOA label entirely, although others consider microservices to be one form of SOA” Oracle: “The picture that emerges is not of microservices as an alternative to SOA, but rather as a way to restore flexibility that may have been lost in SOAs that became too rigid and monolithic.” https://en.wikipedia.org/wiki/Microservices http://martinfowler.com/articles/microservices.html#MicroservicesAndSoa http://www.oracle.com/technetwork/issue-archive/2015/15-mar/o25architect-2458702.html
  13. 13. Microservices: •  Many very small components •  Business logic lives inside of single service domain •  Simple wire protocols(HTTP with XML/JSON) •  API driven with SDKs/Clients SOA: •  Fewer more sophisticated components •  Business logic can live across domains •  Enterprise Service Bus like layers between services •  Middleware Microservices vs. SOA 14
  14. 14. •  Two-pizza teams •  Full ownership •  Full accountability •  Aligned incentives •  “DevOps”
  15. 15. Wait, now we’re talking about Pizza? 16 ©2015 Apigee. All Rights Reserved. Image By: Chris Munns – munns@amazon.com
  16. 16. How do Two Pizza Teams work? We call them “Service teams” • Own the “primitives” they build: – Product planning (roadmap) – Development work – Operational/Client support work • “You build it, you run it” • Part of a larger concentrated org (Amazon.com, AWS, Prime, etc) 17
  17. 17. Who Does QA? 18 The Two Pizza Team
  18. 18. Who Does On Call? 19 Image By: Chris Munns – munns@amazon.com The Two Pizza Team
  19. 19. What does Ops Do? 20 Not Exist
  20. 20. What about Ops/QA/Etc? Everyone exists on a “service team” focused on their primitive(s): • SDE’s focused on developing • PM’s focused on product direction • TPM’s help drive development • SE’s focused on infra/tooling • SDET’s focused on test excellence throughout the organization Some folks are shared across the org, some on individual teams 21
  21. 21. Boy, that sounds like a lot of freedom? It is! Teams are empowered and also held to high standards: • Thorough onboarding/training • Patterns/practices defined at scale and with 20+ years of organizational knowledge • Regular technical and business metric reviews • Regular sharing of new tools, services, technologies, etc, by internal subject matter experts 22
  22. 22. Missing tools developers delivery pipelineservices ???
  23. 23. •  Self-service •  Technology-agnostic •  Encourage best practices •  Single-purpose services
  24. 24. •  Deployment service •  No downtime deployments •  Health checking •  Versioned artifacts and rollbacks
  25. 25. •  Continuous delivery •  From check-in to production •  Automated actions and transitions •  >90% of teams Pipelines
  26. 26. Microservice development lifecycle developers delivery pipelinesservices releasetestbuild releasetestbuild releasetestbuild releasetestbuild releasetestbuild releasetestbuild
  27. 27. = 50 million deployments a year Thousands of teams × Microservice architecture × Continuous delivery × Multiple environments
  28. 28. I’m sold, how do I make my own pizza? 29 ©2015 Apigee. All Rights Reserved. Image By: Chris Munns – munns@amazon.com
  29. 29. How to make pizza? • Yeast • Water • Sugar • Olive oil • Tomato sauce • Cheese • <insert favorite toppings here> 30
  30. 30. No Chris, I mean in the organizational/ technological sense 31 ©2015 Apigee. All Rights Reserved. Image By: Chris Munns – munns@amazon.com
  31. 31. The keys to your own Two Pizza teams & Microservices Culture Practices Tools 32
  32. 32. The keys to your own Two Pizza teams & Microservices Culture – Ownership & Accountability go hand in hand – Larger teams typically move slower than smaller teams – Insist on standards of excellence, but be flexible on the how Practices – Continuous Integration & Delivery – Simplify operational tasks Tools – CI & CD tools – Infrastructure management – Metrics/Monitoring/Logging – Communication and Collaboration 33
  33. 33. The keys to your own Two Pizza teams & Microservices Culture – Ownership & Accountability go hand in hand – Larger teams typically move slower than smaller teams – Insist on standards of excellence, but be flexible on the how Practices – Continuous Integration & Delivery – Simplify operational tasks Tools – CI & CD tools – Infrastructure management – Metrics/Monitoring/Logging – Communication and Collaboration 34
  34. 34. The keys to your own Two Pizza teams & Microservices Culture – Ownership & Accountability go hand in hand – Larger teams typically move slower than smaller teams – Insist on standards of excellence, but be flexible on the how Practices – Continuous Integration & Delivery – Simplify operational tasks Tools – CI & CD tools – Infrastructure management – Metrics/Monitoring/Logging – Communication and Collaboration 35
  35. 35. The keys to your own Two Pizza teams & Microservices Culture – Ownership & Accountability go hand in hand – Larger teams typically move slower than smaller teams – Insist on standards of excellence, but be flexible on the how Practices – Continuous Integration & Delivery – Simplify operational tasks Tools – CI & CD tools – Infrastructure management – Metrics/Monitoring/Logging – Communication and Collaboration 36 Internal “Service teams” should own, support, train, drive excellence of these tools
  36. 36. Apollo and Pipelines as AWS Services: CodePipeline launched July 2015 CodeDeploy launched Nov 2014
  37. 37. Establishing a pattern for services and clients It’s important that the organization isn’t reinventing the wheel on every new service: •  How are clients going to communicate? •  What cross service authorization requirements are there? •  How do services prevent abuse? •  How do you quickly build clients against a service? •  How do services handle discovery of others services and resources?
  38. 38. Use an API Gateway! Internet Mobile Apps Websites Services API Gateway AWS Lambda functions API Gateway Cache Endpoints on Amazon EC2 Any other publicly accessible endpoint Amazon CloudWatch Monitoring Amazon CloudFront
  39. 39. HOST METRICS SERVICE METRICS LOG ANALYSIS BUILD METRICS
  40. 40. FIN, ACK This is a big topic that is hard to cover in a single session, day, week! Key pointers: •  Microservices patterns are changing how we are building APIs and our applications in general •  Team structure plays an incredible role in building, running, scaling Microservices •  Focusing on flexible tooling that provides standards can help an organization focus on what matters •  Enable the smart people you hire to do great things by giving them both ownership and accountability on those things success 41
  41. 41. Thank you 42

×