microservices from winning the war to keeping the peace
play

Microservices From Winning the War To Keeping the Peace Andrew - PowerPoint PPT Presentation

Microservices From Winning the War To Keeping the Peace Andrew McVeigh QConSF October 2018 Background A bit about Andrews work... Many different domains Trading & risk systems PhD on software components Riot Games


  1. Microservices From Winning the War …To Keeping the Peace Andrew McVeigh QConSF October 2018

  2. Background A bit about Andrew’s work... ◎ Many different domains ◎ Trading & risk systems ◎ PhD on software components ◎ Riot Games ◎ Hulu 2

  3. Microservices Work! But make sure you prepare for the challenges... 3

  4. 1. Microservices in Gaming 2. Microservices for Video 3. Believe the Hype 4. Believe the Challenges 4

  5. 1. Microservices in Gaming A microservice architecture @ scale 5

  6. League of Legends ◎ Here you have a list of items ◎ And some text ◎ But remember not to overload your slides with content Your audience will listen to you or read the content, but won’t do both. 6

  7. @ Scale 7

  8. Gaming Particulars ◎ Low latency ◎ Need to match up players = shared state ◎ Rapid development cycles ◎ Lots of engineers working on 1 game 8

  9. 1A. Winning the War Evolving from a monolith 9

  10. Evolving the Architecture ◎ 2009: Large service monolith ○ Matchmaking, game selection, inventory etc ◎ 2012: Started evolving to microservices ○ http://bit.ly/evolving-league 10

  11. League of Legends Front End Box Matchmaking Game Server Mgr platform.war platform.war platform.war platform.war platform.war platform.war Distributed in-memory cache MySQL MySQL 11

  12. Microservices for New Features Platform Match Making Service platform.war tb.jar Proxy / API Cache Distributed in-memory cache MySQL MySQL 12

  13. Standard Infrastructure Client of Service Service Metrics Metrics Client REST S/W Load Server REST HTTP Server library Balancer library REST SWAGGER Dashboards Service Discovery Config Service 13

  14. 1B. Keeping the Peace Held back by remains of the monolith 14

  15. Not Quite Free of the Monolith... Platform Microservice Inventory ● Stats ● Summoner details ● Cache Distributed in-memory cache MySQL MySQL 15

  16. Ouch - Hitting the Wall 16

  17. If We Could Redo? ◎ Decouple state completely ○ Inventory service ○ Catalog service ○ Runes service ◎ Socialize to get prioritization ◎ Simplify infrastructure ○ Config System too “clever” ○ Too much “smarts” in fat libraries 17

  18. 2. Microservices for Internet Video Hundreds of tiny pieces... 18

  19. Hulu ◎ 2016: Full microservices architecture ○ Evolved / replaced existing VOD architecture ○ Live TV ○ 20m+ total subs ○ 1m+ live subs ◎ 15 month development! ○ 800+ microservices http://bit.ly/hulu-landscape 19

  20. Video System Particulars ◎ Lots of caching to support browsing ◎ TV show metadata needed everywhere ◎ Real-time playback to support live TV ◎ Lots of integration (billing, ads etc) 20

  21. Infrastructure for Microservices Donki PaaS DNS Github Jenkins Apps Apps Load Apps Balancers Statsd Graphite Provisioning System MySQL Apps Cluster Apps VMs Redis Cluster 21

  22. Microservice Ownership Playback team Browse team Recording team Etc... 22

  23. Data Distribution Pattern Reading Cache Cache Cache Cache Pub-sub / read-through Master Ingestion + Admin 23

  24. Scaling for Launch Day Browse Queries Per Second College kids falling asleep with XBOX on! 24

  25. 2B. Keeping the Peace Every issue gets magnified... 25

  26. Arch / Ops Dashboard Login Browse & Search Playback Playback Ads DVR … etc 26

  27. Scaling For Growth http://bit.ly/hulu-scaling 27

  28. Circuit Breakers avoid Firestorms A A B B C C X X Y Z 28

  29. Cross-Cutting Requirements 29

  30. Cloud versus DC ◎ Could target cloud or DC ○ But no elasticity, must overprovision ◎ Abstracting cloud & DC == Lowest common denominator ◎ Hard to do proper blue-green in DC 30

  31. 3. Believe the Hype The many benefits of microservices 31

  32. They Actually Work! ◎ Ownership & Independence ◎ Development velocity ◎ Operational & Development scaling 32

  33. They Actually Work! ◎ Granular deployment ◎ Evolution ◎ Organizational alignment 33

  34. 4. Believe the Challenges Standing on the shoulders of constantly improving infrastructure... 34

  35. Common CICD + Operating Env Runtime Infra Build + CICD Deploy & Jenkins K8s, istio Rollback Spinnaker / Harness Stackdriver Terraform Operational Infra Cloud! 35

  36. Cloud Approach Preferred approach ◎ Pick one cloud provider (per workflow?) ◎ Consider costs early ◎ Multi-region, multi-account on day 1 Cloud has so many advantages over DC ◎ Elasticity ◎ Easy environments (blue-green) ◎ Better shared services (db, queues etc) 36 ◎

  37. Circuit Breakers by Default! 37

  38. API Gateways Gateway API Docs Envoy Service Service 38

  39. Platforms For things that need holistic treatment … but still allow self-service ◎ Load testing ◎ Billing ◎ Browse caching ◎ A / B testing ◎ UI layout 39

  40. Takeaways Microservices offer many benefits ◎ Isolation & independence ◎ Granular deployment, scaling & evolution Use infra to protect against common issues ◎ Full CICD ◎ Infrastructure as code ◎ Circuit breakers to prevent firestorms ◎ Istio to help with monitoring + more ◎ Cloud elasticity FTW 40

  41. Thanks for Listening! Any questions? andrew.mcveigh@gmail.com AMA Decomposing the Monolith Tues 2:55pm Boardroom C 41

  42. 42

  43. Scaling For Growth But look out!!! 43

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