SlideShare une entreprise Scribd logo
1  sur  46
Microservices
From Winning the War
…To Keeping the Peace
Andrew McVeigh
QConSF October 2018
InfoQ.com: News & Community Site
• Over 1,000,000 software developers, architects and CTOs read the site world-
wide every month
• 250,000 senior developers subscribe to our weekly newsletter
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• 2 dedicated podcast channels: The InfoQ Podcast, with a focus on
Architecture and The Engineering Culture Podcast, with a focus on building
• 96 deep dives on innovative topics packed as downloadable emags and
minibooks
• Over 40 new content items per week
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
microservices-pitfalls-lessons
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon San Francisco
www.qconsf.com
Background
A bit about Andrew’s work...
◎ Many different domains
◎ Trading & risk systems
◎ PhD on software components
◎ Riot Games
◎ Hulu
2
Microservices
Work!
But make sure you prepare for the challenges...
3
1. Microservices in Gaming
2. Microservices for Video
3. Believe the Hype
4. Believe the Challenges
4
1.
Microservices in
Gaming
A microservice architecture
@ scale
5
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
@ Scale
7
Gaming Particulars
◎ Low latency
◎ Need to match up players = shared state
◎ Rapid development cycles
◎ Lots of engineers working on 1 game
8
1A.
Winning the War
Evolving from a monolith
9
Evolving the Architecture
◎ 2009: Large service monolith
○ Matchmaking, game selection, inventory etc
◎ 2012: Started evolving to microservices
○ http://bit.ly/evolving-league
10
Front End Box
League of Legends
11
platform.war
Distributed in-memory cache
MySQL
Matchmaking Game Server Mgr
platform.warplatform.warplatform.war platform.warplatform.war
MySQL
Microservices for New Features
12
Platform
platform.war
Distributed in-memory cache
MySQL
Service
Proxy / API
MySQL
Match Making
tb.jar
Cache
REST SWAGGER
Dashboards Service Discovery Config Service
Standard Infrastructure
13
Client of Service
Metrics
Client REST
library
S/W Load
Balancer
Service
Metrics
Server REST
library
HTTP Server
1B.
Keeping the Peace
Held back by remains of the
monolith
14
Not Quite Free of the Monolith...
15
Platform
● Inventory
● Stats
● Summoner details
Distributed in-memory cache
MySQL
MySQL
Microservice
Cache
Ouch - Hitting the Wall
16
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
2.
Microservices for
Internet Video
Hundreds of tiny pieces...
18
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
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
Infrastructure for Microservices
21
Donki PaaS
AppsGithub Jenkins
Apps
Apps
Redis
Cluster
MySQL
Cluster
Provisioning System
Apps
Apps
VMs
Load
Balancers
DNS
Statsd
Graphite
Microservice Ownership
22
Playback team Browse team Recording team Etc...
Data Distribution Pattern
23
Master
Cache CacheCacheCache
Ingestion + Admin
Reading
Pub-sub /
read-through
Scaling for Launch Day
24
Browse Queries Per Second
College kids falling asleep
with XBOX on!
2B.
Keeping the Peace
Every issue gets magnified...
25
Arch / Ops Dashboard
26
Login Browse & Search Playback Ads DVR … etcPlayback
http://bit.ly/hulu-scaling
Scaling For Growth
27
Circuit Breakers avoid Firestorms
28
A B C
X
YY
X
A B C
Z
Cross-Cutting Requirements
29
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
3.
Believe the Hype
The many benefits of microservices
31
They Actually Work!
◎ Ownership & Independence
◎ Development velocity
◎ Operational & Development scaling
32
They Actually Work!
◎ Granular deployment
◎ Evolution
◎ Organizational alignment
33
4.
Believe the Challenges
Standing on the shoulders of
constantly improving infrastructure...
34
Common CICD + Operating Env
Runtime Infra
35
Build + CICD
Operational Infra
Deploy &
Rollback
Jenkins
Spinnaker / Harness
Terraform
K8s, istio
Stackdriver
Cloud!
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
Circuit Breakers by Default!
37
API Gateways
38
Gateway
ServiceService Envoy
API Docs
Platforms
For things that need holistic treatment
… but still allow self-service
◎ Load testing
◎ Billing
◎ Browse caching
◎ A / B testing
◎ UI layout
39
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
Thanks for Listening!
Any questions?
andrew.mcveigh@gmail.com
41
AMA
Decomposing the Monolith
Tues 2:55pm Boardroom C
42
Scaling For Growth
43But look out!!!
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
microservices-pitfalls-lessons

Contenu connexe

Plus de C4Media

Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDC4Media
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine LearningC4Media
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at SpeedC4Media
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsC4Media
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsC4Media
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerC4Media
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleC4Media
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeC4Media
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereC4Media
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing ForC4Media
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data EngineeringC4Media
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreC4Media
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsC4Media
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechC4Media
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/awaitC4Media
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaC4Media
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayC4Media
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?C4Media
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseC4Media
 
A Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinA Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinC4Media
 

Plus de C4Media (20)

Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery Teams
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in Adtech
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven Utopia
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL Database
 
A Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinA Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with Brooklin
 

Dernier

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Dernier (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

From Winning the Microservice War to Keeping the Peace

  • 1. Microservices From Winning the War …To Keeping the Peace Andrew McVeigh QConSF October 2018
  • 2. InfoQ.com: News & Community Site • Over 1,000,000 software developers, architects and CTOs read the site world- wide every month • 250,000 senior developers subscribe to our weekly newsletter • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • 2 dedicated podcast channels: The InfoQ Podcast, with a focus on Architecture and The Engineering Culture Podcast, with a focus on building • 96 deep dives on innovative topics packed as downloadable emags and minibooks • Over 40 new content items per week Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ microservices-pitfalls-lessons
  • 3. Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide Presented at QCon San Francisco www.qconsf.com
  • 4. Background A bit about Andrew’s work... ◎ Many different domains ◎ Trading & risk systems ◎ PhD on software components ◎ Riot Games ◎ Hulu 2
  • 5. Microservices Work! But make sure you prepare for the challenges... 3
  • 6. 1. Microservices in Gaming 2. Microservices for Video 3. Believe the Hype 4. Believe the Challenges 4
  • 8. 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
  • 10. Gaming Particulars ◎ Low latency ◎ Need to match up players = shared state ◎ Rapid development cycles ◎ Lots of engineers working on 1 game 8
  • 11. 1A. Winning the War Evolving from a monolith 9
  • 12. Evolving the Architecture ◎ 2009: Large service monolith ○ Matchmaking, game selection, inventory etc ◎ 2012: Started evolving to microservices ○ http://bit.ly/evolving-league 10
  • 13. Front End Box League of Legends 11 platform.war Distributed in-memory cache MySQL Matchmaking Game Server Mgr platform.warplatform.warplatform.war platform.warplatform.war MySQL
  • 14. Microservices for New Features 12 Platform platform.war Distributed in-memory cache MySQL Service Proxy / API MySQL Match Making tb.jar Cache
  • 15. REST SWAGGER Dashboards Service Discovery Config Service Standard Infrastructure 13 Client of Service Metrics Client REST library S/W Load Balancer Service Metrics Server REST library HTTP Server
  • 16. 1B. Keeping the Peace Held back by remains of the monolith 14
  • 17. Not Quite Free of the Monolith... 15 Platform ● Inventory ● Stats ● Summoner details Distributed in-memory cache MySQL MySQL Microservice Cache
  • 18. Ouch - Hitting the Wall 16
  • 19. 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
  • 21. 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
  • 22. 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
  • 23. Infrastructure for Microservices 21 Donki PaaS AppsGithub Jenkins Apps Apps Redis Cluster MySQL Cluster Provisioning System Apps Apps VMs Load Balancers DNS Statsd Graphite
  • 24. Microservice Ownership 22 Playback team Browse team Recording team Etc...
  • 25. Data Distribution Pattern 23 Master Cache CacheCacheCache Ingestion + Admin Reading Pub-sub / read-through
  • 26. Scaling for Launch Day 24 Browse Queries Per Second College kids falling asleep with XBOX on!
  • 27. 2B. Keeping the Peace Every issue gets magnified... 25
  • 28. Arch / Ops Dashboard 26 Login Browse & Search Playback Ads DVR … etcPlayback
  • 30. Circuit Breakers avoid Firestorms 28 A B C X YY X A B C Z
  • 32. 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
  • 33. 3. Believe the Hype The many benefits of microservices 31
  • 34. They Actually Work! ◎ Ownership & Independence ◎ Development velocity ◎ Operational & Development scaling 32
  • 35. They Actually Work! ◎ Granular deployment ◎ Evolution ◎ Organizational alignment 33
  • 36. 4. Believe the Challenges Standing on the shoulders of constantly improving infrastructure... 34
  • 37. Common CICD + Operating Env Runtime Infra 35 Build + CICD Operational Infra Deploy & Rollback Jenkins Spinnaker / Harness Terraform K8s, istio Stackdriver Cloud!
  • 38. 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
  • 39. Circuit Breakers by Default! 37
  • 41. Platforms For things that need holistic treatment … but still allow self-service ◎ Load testing ◎ Billing ◎ Browse caching ◎ A / B testing ◎ UI layout 39
  • 42. 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
  • 43. Thanks for Listening! Any questions? andrew.mcveigh@gmail.com 41 AMA Decomposing the Monolith Tues 2:55pm Boardroom C
  • 44. 42
  • 46. Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ microservices-pitfalls-lessons