from monolithic to microservices in 45 minutes
TRANSCRIPT
![Page 1: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/1.jpg)
![Page 2: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/2.jpg)
Monolithic to Microservices in 45 min
![Page 3: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/3.jpg)
Understand Scalability
![Page 4: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/4.jpg)
4
AgendaMonolithic ApplicationsMicroservicesBest PracticesHow it's Done
![Page 5: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/5.jpg)
Monolithic Applications
![Page 6: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/6.jpg)
"A monolithic application is self-contained, and independent from other computing applications. The design philosophy is that the application is responsible not just for a particular task, but can perform every step needed to complete a particular function"
![Page 7: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/7.jpg)
7
![Page 8: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/8.jpg)
8
![Page 9: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/9.jpg)
9
Monolithic Applications• It’s very easy to start building applications that become Monolithic
– Projects start small– If successful they will grow
Super Cool Application
UI Component
Business Logic
Persistency Layer
![Page 10: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/10.jpg)
Monolithic Applications
Super Cool Application
UI Component
Business Logic
Persistency Layer
![Page 11: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/11.jpg)
Monolithic Applications
Super Cool InstanceSuper Cool Instance
Super Cool InstanceSuper Cool Instance
Super Cool InstanceSuper Cool Instance
Super Cool InstanceSuper Cool Instance
![Page 12: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/12.jpg)
Decouple Applications
![Page 13: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/13.jpg)
"Decoupled architecture is a framework for complex work that allows components to remain completely autonomous and unaware of each
other"
![Page 14: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/14.jpg)
Decoupling your applicationsSuper Cool Application
UI Component
Business Logic
Persistency Layer
![Page 15: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/15.jpg)
15
Reasons to Decouple
• The different components of your application have different:– Density– Release and Development cycles – Requirements
• Functional• Architecture
![Page 16: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/16.jpg)
Decoupling your applications
UI Layer
Business Service Layer
Scalable Data Layer
![Page 17: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/17.jpg)
… for scalability
UI Layer
Business Service Layer
Scalable Data Layer
UI Layer
UI Layer
UI Layer
UI Layer
![Page 18: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/18.jpg)
… for different integrations
MobileUI
Business Service Layer
Scalable Data Layer
Web UI
MobileUI
Web UI
Specific UI
![Page 19: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/19.jpg)
… for function segregation
![Page 20: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/20.jpg)
… scale separately
![Page 21: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/21.jpg)
Scale AxisY-axis: Functional Decomposition
X-axis: Functional Duplication Z-axis: Data Partitioning
![Page 22: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/22.jpg)
Microservices
![Page 23: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/23.jpg)
"Microservices is a software architecture style in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs"
![Page 24: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/24.jpg)
Application Stack
UI Layer
Business Service Layer
Scalable Data Layer
![Page 25: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/25.jpg)
Microservices
![Page 26: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/26.jpg)
Microservices
Text Search
Recommendations Engine
Chat Service
![Page 27: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/27.jpg)
Microservices
![Page 28: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/28.jpg)
Microservices – Service Registry
Service Registry
Service Registry allows client side discovery of existing and available services
![Page 29: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/29.jpg)
Host OS
Virtual OS
Virtual OS
Virtual OS
Microservices – Virtual MachinesVirtual Machines are a familiar topic, it is the backbone of many PaaS and IaaS services out there
![Page 30: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/30.jpg)
Host OS
System Kernel
Microservices – ContainersContainers are a typical approach to deploy and maintain microservices because they're highly scalable and isolated.
![Page 31: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/31.jpg)
Microservices – Containers
Host OS
System Kernel
Host OS
System Kernel
Host OS
System Kernel
REHL v7 Windows 2008
Web Search v1Web Search v2
![Page 32: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/32.jpg)
Microservices – Clustering
![Page 33: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/33.jpg)
"I'm getting dizzy"
Norberto Leite – 2015/10/06
![Page 34: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/34.jpg)
MongoDB
Ops Manager
![Page 35: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/35.jpg)
35
MongoDB - Containerized
• Benefit from MongoDB Scalability– Replica Sets for HA– Sharding for Horizontal Scalability
But Keep In Mind: • Sharding requires knowing well your data• Replication is much more than just spinning a few more
instances!
Ops Manager is Important for these
environments!
![Page 36: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/36.jpg)
Use Cases
![Page 37: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/37.jpg)
Otto Use Case
Batch analytics Layer
Frontend – System
Profile Service Customer Service Session Service Persona Service
Shared Nothing architecture
Clear Isolation of services
Hundreds of Virtual Instances
![Page 38: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/38.jpg)
How to do it
![Page 39: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/39.jpg)
39
Best Approach• Start monolithic
– There's nothing wrong with starting small – Your team will be small enough so they will know all the code
• Start Decoupling when you grow – In number of features and functionality – In number of teams working side by side
• Go Microservices– When you become Netflix!
![Page 40: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/40.jpg)
40
When do Microservices Fail• Contracts
– It's important to agree on the interfaces– Developer Philosophical Beliefs
• Service Separation– Granularity – Dependencies
• Maintenance – Devops and Release Manager Burden– Monitoring– Orchestration
"…language-agnostic APIs"
"completely autonomous"
"composed of small, independent processes"
![Page 41: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/41.jpg)
41
Best Approach - Data• Replication from Day 0
– No excuses to have a single node in production• Shard when you grow
– Functionally – By Volume – Regionaly
• Ops Manager to the rescue– Makes you life easier!
![Page 42: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/42.jpg)
Now that you understand it… I hope
![Page 44: From Monolithic to Microservices in 45 Minutes](https://reader036.vdocument.in/reader036/viewer/2022062400/5876fe941a28abf3398b6d55/html5/thumbnails/44.jpg)