Download - Microservices at Netflix
![Page 1: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/1.jpg)
Application Networks:Microservices at Netflix
May 2016
![Page 2: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/2.jpg)
Uri SaridCTO – MuleSoft
Katharina ProbstEngineering Manager, API – Netflix
![Page 3: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/3.jpg)
To survive and thrive, you need:
3
RobustnessAgilitySpeed
![Page 4: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/4.jpg)
4
And do it all – at scale!
![Page 5: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/5.jpg)
No business is safe from disruption
5
![Page 6: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/6.jpg)
No business is safe from disruption
6
“52% of the Fortune 500 have been merged, acquired, gone bankrupt or fallen off the list since 2000.”– R. Ray Wang, Principal Analyst, Constellation Research
![Page 7: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/7.jpg)
But some survive and thrive
7
McDonalds: just a fast-food chain?
a digital restaurant platformfor
innovation and execution agility
![Page 8: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/8.jpg)
What are they doing right?
8
on what: better apparel? price and selection?
Under Armour is
“building the biggest connected fitness platform in the world”
competes with
![Page 9: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/9.jpg)
They are composable, built for change
9
an immersive content platform
automotive software innovation platform
parcels and logistics API-first business
retail enterprise data fabricnetwork as a service
![Page 10: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/10.jpg)
Remember why an application network
10
A seamless network of applications that…
… is organized around focused, well-defined units of value
… is recomposable
… emerges bottoms-up via self-service
… where visibility, security and govern-ability are built in
… where connectivity and reuse are top-level concerns
… bends, not breaks
… where each node adds value to the whole network
… where the business regains control of its future
small services
evolving independently, as fast as needed
coupled just enough to create business value
optimized for change
![Page 11: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/11.jpg)
11
Microservices
towards microservices
![Page 12: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/12.jpg)
12
The 2 pillars of microservices
APIexcellence
devopsexcellence
![Page 13: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/13.jpg)
The 2 pillars of microservices
• API excellence- Define atomic service boundaries- Design for purpose – know service commitment- Dependencies well-defined and managed- API lifecycle
• Devops excellence- Standardize containers and meta-services (services for your
services)- Automate promotion, testing, provisioning, deployment,
security, …- Design for resilience and operatability
13
![Page 14: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/14.jpg)
Services at Netflix
Self-contained functionality exposes an API
Always owned by a team
Many teams own more than one service
Operated by owner team
Self-contained functionality exposes an API
Always owned by a team
Many teams own more than one service
Operated by owner team
![Page 15: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/15.jpg)
….
System overview
Zuul(gateway)
API
Personali-zation
User info EVCache Ratings A/B
![Page 16: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/16.jpg)
Services interactions (simplified)
1 2
4 5 6 7?
Zuul (gateway) Geo
API
User Info A/B EVCache Recommen-dations
3
![Page 17: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/17.jpg)
Lifecycle of a service
![Page 18: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/18.jpg)
Services scale independently
Services scale up/down with traffic
Changes in traffic patterns don’t affect services equally
![Page 19: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/19.jpg)
Services evolve independently
Independent release cycles
Some services change more frequently than others
![Page 20: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/20.jpg)
Embedding service
EVCacheservice
EVCacheclient lib
Services provide client libraries
Client library as canonical way to interact with service
Service owner defines API
![Page 21: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/21.jpg)
Lifecycle of API service
Daily dependency updates
Daily canaries
Daily pushes:((new code ||
new dependency updates) && canaries pass)
![Page 24: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/24.jpg)
Operations: engineers are responsible for:
Code pushes
Metrics, alerts, monitoring
Choosing the right tooling for whatever operational insight you need
![Page 26: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/26.jpg)
Mantis for real-time analysis
![Page 27: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/27.jpg)
How to create a new service - paved path
Teams want to build business logic, not an RPC mechanismA central team can provide a paved path (template)
![Page 28: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/28.jpg)
28
Lessons from microservices at scale
Smart enablement:• Templatize services
• Templatize process
• Reuse: patterns
• Reuse: services
• Provide expertise
Smart operations:• Automated++
• Fail fast & learn
• Design for failure
• Disrupt yourself
• Bend vs break
Smart containers:• Built-in governance
• Built-in meta-svcs
• Setup for SDLC
• Fungible
• Understood by ops
![Page 29: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/29.jpg)
Planning for failure in a complex systemZuul API Downstream
services
![Page 30: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/30.jpg)
Testing for different failure conditions
Chaos monkey
Chaos Kong
FIT
![Page 31: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/31.jpg)
Protect against failure: Hystrix
….
API
Personali-zation
User info EVCache Ratings A/B
![Page 32: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/32.jpg)
Hystrix
….
API
Personali-zation
User info EVCache Ratings A/B
Don’t let this happen.
![Page 33: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/33.jpg)
Hystrix
….
API
Personali-zation
User info EVCache Ratings A/B
Instead, don’t send more traffic to unhealthy service.
![Page 34: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/34.jpg)
Hystrix
….
API
Personalization fallback
User info EVCache Ratings A/B
Serve fallbacks instead.
![Page 35: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/35.jpg)
Hystrix
….
API
Personali-zation
User info EVCache Ratings A/B
Return to normal when service is back up.
![Page 36: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/36.jpg)
36
Microservices for you?
APIexcellence
devopsexcellence
an immersive content platform
• SDLC• Connectivity• Bridges• Paved path• Automation• Tools for failure,
compensation, visibility, and recovery
• …
• Culture & mindset• Training• Devops• Buy-in from bottom• Buy-in from top• Bridges• Team ownership –
to what degree?• …
![Page 37: Microservices at Netflix](https://reader036.vdocuments.us/reader036/viewer/2022062523/58ed89ec1a28abeb558b4665/html5/thumbnails/37.jpg)
Thank you