Microservices at Spotify

4,256 views

Published on

Why does Spotify use a microservices architecture? What are the benefits and challenges we've encountered? How does our organizational model support our architecture?

Video of the talk is posted on YouTube: https://youtu.be/7LGPeBgNFuU

Published in: Software

Microservices at Spotify

  1. 1. Microservices @ Spotify Kevin Goldsmith VP Engineering @kevingoldsmith
  2. 2. Let’s say I wanted to build a large application
  3. 3. Some requirements ‣ Mustscaletomillionsofusers ‣ Supportmultipleplatforms ‣ Handlecomplexbusinessrules ‣ Competitiveinafastmovingmarket ‣ ReactQuickly ‣ Out-innovate
  4. 4. A product like this
  5. 5. A product like this ‣ 75+MillionMonthlyActiveUsers ‣ 58Countries ‣ >20,000songsaddedperday ‣ >2Bplaylists ‣ Incrediblycomplexbusinessrules ‣ Lotsofcompetition
  6. 6. Howdoyousupport theserequirements whilemovingfast andinnovating?
  7. 7. Solution Autonomous full-stack teams
  8. 8. Autonomous adjective au·ton·o·mous - ȯ-ˈtä-nə-məs (of a country or region) having the freedom to govern itself or control its own affairs. "the federation included sixteen autonomous republics" having the freedom to act independently. "school governors are legally autonomous" synonyms: self-governing, independent, sovereign, free, self-ruling, self- determining, autarchic; self-sufficient "an autonomous republic"
  9. 9. Autonomous adjective au·ton·o·mous - ȯ-ˈtä-nə-məs (of a country or region) having the freedom to govern itself or control its own affairs. "the federation included sixteen autonomous republics" having the freedom to act independently. "school governors are legally autonomous" synonyms: self-governing, independent, sovereign, free, self-ruling, self-determining, autarchic; self-sufficient "an autonomous republic"
  10. 10. Server Core Library Platform Platform Platform Platform Infrastructure
  11. 11. Challenges Synchronization Client UX implementation Core Library Implementation depends on depends on depends onServer Implementation Infrastructure Implementation
  12. 12. Server Core Library Platform Platform Platform Platform Infrastructure
  13. 13. platforms Server Core Library Platform Platform Platform Platform Infrastructure FeatureTeam FeatureTeam FeatureTeam FeatureTeam FeatureTeam FeatureTeam
  14. 14. What this looks like at Spotify ‣ 90+teams ‣ 600+Developers ‣ 5Developmentoffices ‣1Product
  15. 15. Full-stack autonomous teams Requires you to structure your application in loosely coupled parts
  16. 16. Services
  17. 17. LoadBallancer
  18. 18. Microservices yay! Easierto scale based on real-world bottlenecks
  19. 19. Microservices yay! Easierto test
  20. 20. Microservices yay! Easierto deploy
  21. 21. Microservices yay! Easierto monitor
  22. 22. Microservices yay! Can be versioned independently
  23. 23. Microservices yay! Are less susceptible to large failures
  24. 24. Microservices boo! are harderto monitor
  25. 25. Microservices boo! need good documentation / discoverytools
  26. 26. Microservices boo! create increased latency
  27. 27. What does this look like at Spotify? ‣ 810activeservices ‣ ~10Systemspersquad ‣ ~1.7Systemsperpersonwithaccessto productionservers ‣ ~1.15Systemspermemberof Technology
  28. 28. http://spotify.github.io/apollo/
  29. 29. Questions twitter: @kevingoldsmith (yes, we’re hiring)

×