SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
Microservices: when,
why, and how?
Lessons learned at Wikimedia
Let’s take a step back
microkernels or monolithic kernels?
“ [...]
If you'd ask me to define the problem with microkernels with one word, that would be
"complexity". And it’s a kind of complexity that impacts everything:
- Debugging is hard: On monolithic kernels, you have a single image, with both code and state. Hunting a
bug is just a matter of jumping into the internal debugger (or attaching an external one, or generating a
dump, or...) and looking around. On Hurd, the state is spread among Mach and the servers, so you'll
have to look at each one trying to follow the trail left by the bug.
- Managing resources is hard: Mach knows everything about the machine, but nothing the user. The
server knows everything about the user, but nothing about the machine. And keeping them in sync is too
much expensive. Go figure.
- Obtaining a reasonable performance is har... impossible: You want to read() a pair of bytes from
disk? Good, prepare a message, call to Mach, yield a little while the server is scheduled, copy the message,
unmarshall it, process the request, prepare another message to Mach to read from disk, call to Mach, yield
waiting for rescheduling, obtain the data, prepare the answer, call to Mach, yield waiting for rescheduling,
obtain your 2 bytes. Easy!
[...]
That said, if you're into kernels, microkernels are different and fun! Don't miss the opportunity of doing
some hacking with one of them. Just don't be a fool like me, and avoid become obsessed trying to
achieve the impossible.
-- Sergio Lopez, news.ycombinator.com, 2015
Wait, wasn’t this
supposed to be
about microservices?
Yes!
● Microservices and
infrastructure
● From our experience at
Wikimedia: challenges...
● … and mitigations
● So, are microservices
worth it (for you)?
And now...
● Microservices and
infrastructure
● From our experience at
Wikimedia: challenges...
● … and mitigations
● So, are microservices
worth it?
Microservices are the
microkernels of
distributed
architectures
Microservices add
complexity to your
environment.
Microservices have a
cost.
Using a microservices-based architecture has costs in terms of observability,
debugging, tooling, performance. You have to compensate for most of those at
the infrastucture level. Such infrastructural investments are expensive.
“If you’re not using
microservices you’re
doing it wrong” -- the internet
“Microservices might
be worth the costs.”
-- me, after years
enduring the pain
Outline
● Microservices and
infrastructure
● From our experience at
Wikimedia:
challenges...
● … and mitigations
● So, are microservices
worth it?
Some background
● The Wikimedia Foundation is the
organization running the
infrastructure supporting
Wikipedia and other projects
● Monthly stats:
○ 17 Billion page views
○ 45 Million edits
○ 323 Thousands new registered
users
Our infrastructure
● 2 Primary DCs (Ashburn, Dallas)
● 3 Caching DCs (San Francisco,
Amsterdam, Singapore)
● ~1400 hardware machines
● Size of engineering: ~170 people
● SRE team: ~ 25 people (6 dedicated
to the application layer)
We’ve been
adding
microservices
since 2015.
2014
2018
We have some
experience with the
growing pains
Challenges
● Retooling
● Interface proliferation
● Increased bandwidth in
communication between
teams
● Distributed architectures
are hard.
Retooling
● Configuration
management tools will
only get you that far
● CI/CD/dev environments
● Logging is not enough
● Static resource
allocation
Interfaces
● RPC
● Logging
● Monitoring
● Alerting
● Configuration
Bandwidth
● Productionize a service
vs adding a library
● Different deployment
strategies
● A lot of choices/needs
for each service!
CC by SA 4.0, Jeff Elder
Distributed
architecture
s are hard
And now
● Microservices and
infrastructure
● From our experience at
Wikimedia: challenges...
● … and mitigations
● So, are microservices
worth it?
Mitigations
● Standard interface adapters
And also:
● Architectural guidelines
● Implementation guidelines
Standard interface
adapters
The proliferation of services developed
in different languages can quickly lead
to a higher cost of setup and
maintenance from all points of view.
So you need to create adapters.
Streamlined service
delivery
Goals: reduce the toil on the SRE
team, and the technical challenges
dev teams face when a new service
gets created. Also, provide a
platform that can run our
microservices optimally
Requirements:
● Dev/staging/prod consistency, flexibility
● Ability to schedule dynamically
resource allocation across the cluster.
● Uniform testing/CI/deployment
interfaces
● More control (and less access) to
developers
Implementation
● Run containers everywhere. Abstract
the logic of dockerfiles
● Use a declarative .pipeline directory to
configure how your project will be build
● Uniform testing/CI/deployment
interfaces
● Use kubernetes to manage execution of
such containers, resource allocation
Monitoring interfaces
● Developer-defined monitoring
● “Give me an url that describes
what request/responses are to be
expected”
● Service-checker does the
server-side work, for now only
available for swagger specs
● Functional testing needs some
balance
● Prometheus adapter for legacy
services
Logging pipeline
● Standard formats
● Sink everything in a local daemon
● Kafka for reliable, secure transport
(even cross-dc)
● Multi-tiered ELK for storage /
consulting
● Unified request ID
● Full tracing will be implemented
soonTM
RPC interface [WiP]
● Envoy as a middleware/proxy
between services
● Protection from internal-DDOS,
thundering herd
● Telemetry both client and server
side
● Support our discovery service
● TLS tunneling
● Tracing
● KISS: not a true service mesh
Bandwidth
● Relatively effective
● Standards and
infrastructural helpers
● Developers portal / new
service request
● Implementation
guidelines.
● Rules of engagement
with SRE.
Outline
● Microservices and
infrastructure
● From our experience at
Wikimedia: challenges...
● … and mitigations
● So, are microservices
worth it?
Questions to
answer
● Why do we want to use
microservices?
● Is it worth the
investment?
Good and bad reasons
➔ Performance of critical parts of the
application need different
languages
➔ You’re Google, Facebook, Uber,
Spotify etc. and you have 100s of
engineering teams and several
100s services
➔ You have very specific security
requirements and separation of
concerns is needed
➔ You’re secretly working for a large
cloud provider and you get a cut
for the bill
❖ “Devs can’t work with our monolith
code, it’s too legacy”
❖ Addressing future, hypothetical
scalability needs.
❖ You want to use the new cool toys
❖ Netflix and Spotify do it
❖ Conway’s Law
❖ “A microservice architecture is
theoretically superior”
How much investment?
Either you implement infrastructure yourself or you pay one built by someone else (which puts in in a
vendor lock-in).
To attain the same level of operational excellence when using microservices, your infrastructure will be
exponentially more complex and less boring. You need to hire people that will work on infrastructure
and consider that work a first-class citizen. Else, you’re harming yourself.
TL;DR
● Understand if you need
microservices
● Create a “cloud native”
environment
● Have middlewares
abstract the complexity
away from the services
● Invest in infrastructure
● Prepare for a non-boring
production environment
THANK YOU
Credits
Microkernel comment - Sergio Lopez (permission granted to cite)
Palais du facteur Cheval - User:Otourly - CC-By-SA 3.0
DVI-HDMI adapter - BengtLueers - CC-By-SA 3.0
All other images are copyright © 2019 Wikimedia Foundation, except for the envoy logo and
the kubernetes logos, whose rights are reserved to the respective owners.
This presentation copyright © 2019 Giuseppe Lavagetto.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
International License.

Weitere ähnliche Inhalte

Was ist angesagt?

Microservice design patterns
Microservice design patternsMicroservice design patterns
Microservice design patternsHugh McKee
 
Collaborative Contingency in the Cloud
Collaborative Contingency in the CloudCollaborative Contingency in the Cloud
Collaborative Contingency in the CloudGlen Roberts, CISSP
 
Docker Deployments for the Enterprise
Docker Deployments for the EnterpriseDocker Deployments for the Enterprise
Docker Deployments for the EnterpriseMurad Korejo
 
Nats meetup sf 20150826
Nats meetup sf   20150826Nats meetup sf   20150826
Nats meetup sf 20150826Apcera
 
Tlu introduction-to-cloud
Tlu introduction-to-cloudTlu introduction-to-cloud
Tlu introduction-to-cloudVan Phuc
 

Was ist angesagt? (8)

Microservice design patterns
Microservice design patternsMicroservice design patterns
Microservice design patterns
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Are Microservices our future?
Are Microservices our future?Are Microservices our future?
Are Microservices our future?
 
Collaborative Contingency in the Cloud
Collaborative Contingency in the CloudCollaborative Contingency in the Cloud
Collaborative Contingency in the Cloud
 
Docker Deployments for the Enterprise
Docker Deployments for the EnterpriseDocker Deployments for the Enterprise
Docker Deployments for the Enterprise
 
Nats meetup sf 20150826
Nats meetup sf   20150826Nats meetup sf   20150826
Nats meetup sf 20150826
 
Tlu introduction-to-cloud
Tlu introduction-to-cloudTlu introduction-to-cloud
Tlu introduction-to-cloud
 
Containers the next era of computing
Containers the next era of computingContainers the next era of computing
Containers the next era of computing
 

Ähnlich wie Microservices - when, why and how incontrodevops.it

Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMiki Lombardi
 
Microservices - stress-free and without increased heart attack risk
Microservices - stress-free and without increased heart attack riskMicroservices - stress-free and without increased heart attack risk
Microservices - stress-free and without increased heart attack riskUwe Friedrichsen
 
Microservices - stress-free and without increased heart-attack risk - Uwe Fri...
Microservices - stress-free and without increased heart-attack risk - Uwe Fri...Microservices - stress-free and without increased heart-attack risk - Uwe Fri...
Microservices - stress-free and without increased heart-attack risk - Uwe Fri...distributed matters
 
Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201
Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201
Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201Amazon Web Services
 
Andrea Di Persio
Andrea Di PersioAndrea Di Persio
Andrea Di PersioCodeFest
 
Technology insights: Decision Science Platform
Technology insights: Decision Science PlatformTechnology insights: Decision Science Platform
Technology insights: Decision Science PlatformDecision Science Community
 
Microservices - How Microservices Have Changed and Why They Matter
Microservices - How Microservices Have Changed and Why They MatterMicroservices - How Microservices Have Changed and Why They Matter
Microservices - How Microservices Have Changed and Why They MatterAlexander Arda
 
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Ambassador Labs
 
WinConnections Spring, 2011 - Constructing a vSphere Private Cloud: Strategi...
WinConnections Spring, 2011 - Constructing a vSphere Private Cloud:  Strategi...WinConnections Spring, 2011 - Constructing a vSphere Private Cloud:  Strategi...
WinConnections Spring, 2011 - Constructing a vSphere Private Cloud: Strategi...Concentrated Technology
 
Cloud Native Future
Cloud Native FutureCloud Native Future
Cloud Native FutureJulie Coonce
 
Accelerate Delivery: Business case for Agile DevOps, CI/CD and Microservices
Accelerate Delivery: Business case for Agile DevOps, CI/CD and MicroservicesAccelerate Delivery: Business case for Agile DevOps, CI/CD and Microservices
Accelerate Delivery: Business case for Agile DevOps, CI/CD and MicroservicesRick Hightower
 
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?Phuong Mai Nguyen
 
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve PooleDevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve PooleJAXLondon_Conference
 
Digital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and MicroservicesDigital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and MicroservicesLightbend
 
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"Daniel Bryant
 
A Guide on What Are Microservices: Pros, Cons, Use Cases, and More
A Guide on What Are Microservices: Pros, Cons, Use Cases, and MoreA Guide on What Are Microservices: Pros, Cons, Use Cases, and More
A Guide on What Are Microservices: Pros, Cons, Use Cases, and MoreSimform
 
QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes Abdul Basit Munda
 

Ähnlich wie Microservices - when, why and how incontrodevops.it (20)

Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
 
Microservices - stress-free and without increased heart attack risk
Microservices - stress-free and without increased heart attack riskMicroservices - stress-free and without increased heart attack risk
Microservices - stress-free and without increased heart attack risk
 
Microservices - stress-free and without increased heart-attack risk - Uwe Fri...
Microservices - stress-free and without increased heart-attack risk - Uwe Fri...Microservices - stress-free and without increased heart-attack risk - Uwe Fri...
Microservices - stress-free and without increased heart-attack risk - Uwe Fri...
 
Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201
Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201
Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201
 
Andrea Di Persio
Andrea Di PersioAndrea Di Persio
Andrea Di Persio
 
Technology insights: Decision Science Platform
Technology insights: Decision Science PlatformTechnology insights: Decision Science Platform
Technology insights: Decision Science Platform
 
Microservices - How Microservices Have Changed and Why They Matter
Microservices - How Microservices Have Changed and Why They MatterMicroservices - How Microservices Have Changed and Why They Matter
Microservices - How Microservices Have Changed and Why They Matter
 
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
 
WinConnections Spring, 2011 - Constructing a vSphere Private Cloud: Strategi...
WinConnections Spring, 2011 - Constructing a vSphere Private Cloud:  Strategi...WinConnections Spring, 2011 - Constructing a vSphere Private Cloud:  Strategi...
WinConnections Spring, 2011 - Constructing a vSphere Private Cloud: Strategi...
 
Cloud Native Future
Cloud Native FutureCloud Native Future
Cloud Native Future
 
Surviving microservices
Surviving microservicesSurviving microservices
Surviving microservices
 
Accelerate Delivery: Business case for Agile DevOps, CI/CD and Microservices
Accelerate Delivery: Business case for Agile DevOps, CI/CD and MicroservicesAccelerate Delivery: Business case for Agile DevOps, CI/CD and Microservices
Accelerate Delivery: Business case for Agile DevOps, CI/CD and Microservices
 
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
 
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve PooleDevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
 
Digital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and MicroservicesDigital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and Microservices
 
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Dockerization
DockerizationDockerization
Dockerization
 
A Guide on What Are Microservices: Pros, Cons, Use Cases, and More
A Guide on What Are Microservices: Pros, Cons, Use Cases, and MoreA Guide on What Are Microservices: Pros, Cons, Use Cases, and More
A Guide on What Are Microservices: Pros, Cons, Use Cases, and More
 
QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes
 

Kürzlich hochgeladen

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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 

Kürzlich hochgeladen (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...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 

Microservices - when, why and how incontrodevops.it

  • 1. Microservices: when, why, and how? Lessons learned at Wikimedia
  • 2. Let’s take a step back microkernels or monolithic kernels?
  • 3. “ [...] If you'd ask me to define the problem with microkernels with one word, that would be "complexity". And it’s a kind of complexity that impacts everything: - Debugging is hard: On monolithic kernels, you have a single image, with both code and state. Hunting a bug is just a matter of jumping into the internal debugger (or attaching an external one, or generating a dump, or...) and looking around. On Hurd, the state is spread among Mach and the servers, so you'll have to look at each one trying to follow the trail left by the bug. - Managing resources is hard: Mach knows everything about the machine, but nothing the user. The server knows everything about the user, but nothing about the machine. And keeping them in sync is too much expensive. Go figure. - Obtaining a reasonable performance is har... impossible: You want to read() a pair of bytes from disk? Good, prepare a message, call to Mach, yield a little while the server is scheduled, copy the message, unmarshall it, process the request, prepare another message to Mach to read from disk, call to Mach, yield waiting for rescheduling, obtain the data, prepare the answer, call to Mach, yield waiting for rescheduling, obtain your 2 bytes. Easy! [...] That said, if you're into kernels, microkernels are different and fun! Don't miss the opportunity of doing some hacking with one of them. Just don't be a fool like me, and avoid become obsessed trying to achieve the impossible. -- Sergio Lopez, news.ycombinator.com, 2015
  • 4. Wait, wasn’t this supposed to be about microservices?
  • 5. Yes! ● Microservices and infrastructure ● From our experience at Wikimedia: challenges... ● … and mitigations ● So, are microservices worth it (for you)?
  • 6. And now... ● Microservices and infrastructure ● From our experience at Wikimedia: challenges... ● … and mitigations ● So, are microservices worth it?
  • 7. Microservices are the microkernels of distributed architectures
  • 9. Microservices have a cost. Using a microservices-based architecture has costs in terms of observability, debugging, tooling, performance. You have to compensate for most of those at the infrastucture level. Such infrastructural investments are expensive.
  • 10. “If you’re not using microservices you’re doing it wrong” -- the internet
  • 11. “Microservices might be worth the costs.” -- me, after years enduring the pain
  • 12. Outline ● Microservices and infrastructure ● From our experience at Wikimedia: challenges... ● … and mitigations ● So, are microservices worth it?
  • 13. Some background ● The Wikimedia Foundation is the organization running the infrastructure supporting Wikipedia and other projects ● Monthly stats: ○ 17 Billion page views ○ 45 Million edits ○ 323 Thousands new registered users
  • 14. Our infrastructure ● 2 Primary DCs (Ashburn, Dallas) ● 3 Caching DCs (San Francisco, Amsterdam, Singapore) ● ~1400 hardware machines ● Size of engineering: ~170 people ● SRE team: ~ 25 people (6 dedicated to the application layer)
  • 16. We have some experience with the growing pains
  • 17. Challenges ● Retooling ● Interface proliferation ● Increased bandwidth in communication between teams ● Distributed architectures are hard.
  • 18. Retooling ● Configuration management tools will only get you that far ● CI/CD/dev environments ● Logging is not enough ● Static resource allocation
  • 19. Interfaces ● RPC ● Logging ● Monitoring ● Alerting ● Configuration
  • 20. Bandwidth ● Productionize a service vs adding a library ● Different deployment strategies ● A lot of choices/needs for each service!
  • 21. CC by SA 4.0, Jeff Elder Distributed architecture s are hard
  • 22. And now ● Microservices and infrastructure ● From our experience at Wikimedia: challenges... ● … and mitigations ● So, are microservices worth it?
  • 23. Mitigations ● Standard interface adapters And also: ● Architectural guidelines ● Implementation guidelines
  • 24. Standard interface adapters The proliferation of services developed in different languages can quickly lead to a higher cost of setup and maintenance from all points of view. So you need to create adapters.
  • 25. Streamlined service delivery Goals: reduce the toil on the SRE team, and the technical challenges dev teams face when a new service gets created. Also, provide a platform that can run our microservices optimally Requirements: ● Dev/staging/prod consistency, flexibility ● Ability to schedule dynamically resource allocation across the cluster. ● Uniform testing/CI/deployment interfaces ● More control (and less access) to developers
  • 26. Implementation ● Run containers everywhere. Abstract the logic of dockerfiles ● Use a declarative .pipeline directory to configure how your project will be build ● Uniform testing/CI/deployment interfaces ● Use kubernetes to manage execution of such containers, resource allocation
  • 27.
  • 28. Monitoring interfaces ● Developer-defined monitoring ● “Give me an url that describes what request/responses are to be expected” ● Service-checker does the server-side work, for now only available for swagger specs ● Functional testing needs some balance ● Prometheus adapter for legacy services
  • 29. Logging pipeline ● Standard formats ● Sink everything in a local daemon ● Kafka for reliable, secure transport (even cross-dc) ● Multi-tiered ELK for storage / consulting ● Unified request ID ● Full tracing will be implemented soonTM
  • 30. RPC interface [WiP] ● Envoy as a middleware/proxy between services ● Protection from internal-DDOS, thundering herd ● Telemetry both client and server side ● Support our discovery service ● TLS tunneling ● Tracing ● KISS: not a true service mesh
  • 31. Bandwidth ● Relatively effective ● Standards and infrastructural helpers ● Developers portal / new service request ● Implementation guidelines. ● Rules of engagement with SRE.
  • 32. Outline ● Microservices and infrastructure ● From our experience at Wikimedia: challenges... ● … and mitigations ● So, are microservices worth it?
  • 33. Questions to answer ● Why do we want to use microservices? ● Is it worth the investment?
  • 34. Good and bad reasons ➔ Performance of critical parts of the application need different languages ➔ You’re Google, Facebook, Uber, Spotify etc. and you have 100s of engineering teams and several 100s services ➔ You have very specific security requirements and separation of concerns is needed ➔ You’re secretly working for a large cloud provider and you get a cut for the bill ❖ “Devs can’t work with our monolith code, it’s too legacy” ❖ Addressing future, hypothetical scalability needs. ❖ You want to use the new cool toys ❖ Netflix and Spotify do it ❖ Conway’s Law ❖ “A microservice architecture is theoretically superior”
  • 35. How much investment? Either you implement infrastructure yourself or you pay one built by someone else (which puts in in a vendor lock-in). To attain the same level of operational excellence when using microservices, your infrastructure will be exponentially more complex and less boring. You need to hire people that will work on infrastructure and consider that work a first-class citizen. Else, you’re harming yourself.
  • 36. TL;DR ● Understand if you need microservices ● Create a “cloud native” environment ● Have middlewares abstract the complexity away from the services ● Invest in infrastructure ● Prepare for a non-boring production environment
  • 38. Credits Microkernel comment - Sergio Lopez (permission granted to cite) Palais du facteur Cheval - User:Otourly - CC-By-SA 3.0 DVI-HDMI adapter - BengtLueers - CC-By-SA 3.0 All other images are copyright © 2019 Wikimedia Foundation, except for the envoy logo and the kubernetes logos, whose rights are reserved to the respective owners. This presentation copyright © 2019 Giuseppe Lavagetto. This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.