uber s journey into microservices
play

Ubers Journey into Microservices Emily Reinhold, Software Engineer, - PowerPoint PPT Presentation

Ubers Journey into Microservices Emily Reinhold, Software Engineer, Uber JUNE 15, 2016 Background Our Monolith Fun Facts API Started January 2011 API Trends Lines of Code over Time Unique Authors over Time 300K 600 225K


  1. Uber’s Journey into Microservices Emily Reinhold, Software Engineer, Uber JUNE 15, 2016

  2. Background Our Monolith

  3. Fun Facts ‣ “API” ‣ Started January 2011

  4. API Trends Lines of Code over Time Unique Authors over Time 300K 600 225K 450 Start of migration. 150K 300 Yay! 75K 150 0K 0 2011 2012 2013 2014 2015 2016 2011 2012 2013 2014 2015 2016

  5. Fun Facts ‣ “API” ‣ Started January 2011 ‣ Access to core data models

  6. Core Data Models The Uber Monolith Users Trips Payments Cities Products Documents Exchange Vehicles Promos Rates

  7. Technical Details ‣ Postgresql ‣ Python 2.7 ‣ HTTP/JSON ‣ uWSGI

  8. Request Flow API Matching uWSGI haproxy API box nginx Service process Downstream Services Postgres Third Parties

  9. Benefits ‣ Minimal overhead for cross- domain features

  10. “Cross Domain” The Uber Monolith Users Trips Payments Cities Products Documents Exchange Vehicles Promos Rates

  11. Benefits ‣ Minimal overhead for cross- domain features ‣ Reuse code across domains ‣ Broad, extensible interface

  12. Historic Outages ‣ Honks ‣ Halloween 2014 ‣ Postgresql Master Failure Image courtesy of Anita Hart. Licensed under CC-BY-SA 2.0. https://flic.kr/p/8PG15b

  13. Postgresql Master Failure

  14. Historic Outages ‣ Honks ‣ Halloween 2014 ‣ Postgresql Master Failure ‣ Kafka Outage

  15. Kafka Outage

  16. Technical Bottlenecks ‣ Deploy burden ‣ Single Postgres Master Image courtesy of Paul Schadler. Licensed under CC-BY 2.0. https://flic.kr/p/aDoGkP

  17. Developability ‣ Rapid hiring ‣ Slow test suite ‣ Toe stepping, merge conflicts

  18. Scalability 3 Ways ‣ Growth of business ‣ Growth of features ‣ Growth of organization

  19. Our Future In Microservices

  20. Benefits ‣ Horizontally scalable

  21. Scalability Trips Users Promos

  22. Benefits ‣ Horizontally scalable ‣ Improved onboarding ‣ Clear ownership

  23. Ownership No hiding! You’re on call!

  24. Benefits ‣ Horizontally scalable ‣ Improved onboarding ‣ Clear ownership ‣ Failure isolation

  25. Granular Failures Old Way New Way client show ? Edge Service Edge Service API Payments Payments Promos Users Promos User tags

  26. Lessons Learned

  27. Limit Scope ‣ Drastically changing tech stack

  28. Tech Stack That’s me! eng.uber.com/building-tincup/

  29. Data Migration 4. Backfill 3. Dual write 1. Develop new 2. Implement schema converter 5. Validation 6. Move read 7. Remove old ? queries writes

  30. Limit Scope ‣ Drastically changing tech stack ‣ Infrastructure not ready ‣ Understaffed ‣ Lacked tooling

  31. Things Happen Image courtesy of Kim Scarborough. Licensed under CC-BY-SA 2.0. https://flic.kr/p/23HUAK

  32. Limit Scope ‣ Drastically changing tech stack ‣ Infrastructure not ready ‣ Understaffed ‣ Lacked tooling ‣ Understanding timelines

  33. Aligning with Consumers ‣ Monolith’s consumers directly impacted

  34. Consumers Pricing Trips Matching Signup Users API Cities Users Exchange rates Cities Trips Exchange Rates

  35. Aligning with Consumers ‣ Monolith’s consumers directly impacted ‣ Importance of migrating not well communicated ‣ Constant interruption

  36. Build Tools Initially ‣ For service developers and migrating consumers ‣ Tool to split up request

  37. Request Splitter Old Way New Way request user requesting trip requesting trip info, with info, with relationships relationships request trip on user, on user, API API currency, city currency, city Users Users Tool Cities Cities Currencies Currencies Trips Trips request city request currency

  38. Build Tools Initially ‣ For service developers and migrating consumers ‣ Tool to split up request ‣ Tool to validate new response ‣ Tool to gain visibility into consumers

  39. Consumer Migration Tips ‣ Most difficult aspect of migration ‣ Silently call new system

  40. Silent Swap Matching Signup API Cities Exchange rates Users Trips Users

  41. Consumer Migration Tips ‣ Most difficult aspect of migration ‣ Silently call new system ‣ Most successful migration kept interface the same

  42. Love your Monolith ‣ Tendency to avoid changes ‣ Tackling core (User) directly required refactor

  43. Migration Blockers ‣ Likely to impact other teams ‣ Teams shift focus

  44. Migration Successes

  45. Collaboration ‣ Shared accomplishment ‣ Relationships formed ‣ New understanding

  46. Hardware efficiency ‣ New tech stack: more efficient ‣ No more uWSGI!

  47. uWSGI Utilization

  48. CPU Usage

  49. Hardware efficiency ‣ New tech stack: more efficient ‣ No more uWSGI! ‣ Calls asynchronous

  50. Deeper Understanding ‣ How our systems work ‣ Design for stability ‣ Evenly spread ownership

  51. Thank you First & Last Name Email: emilyr@uber.com Engineering Blog: eng.uber.com Twitter: @UberEng

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend