A PRAGMATIC GUIDE FOR MIGRATING TO MICROSERVICES › brands › sdd › library › Zhamak...A...
Transcript of A PRAGMATIC GUIDE FOR MIGRATING TO MICROSERVICES › brands › sdd › library › Zhamak...A...
A PRAGMATIC GUIDE FOR MIGRATING TO MICROSERVICES
Zhamak Dehghani @zhamakd [email protected]
being unstuck accelerate growth enable rapid experimentation
� deconstruct the monolith
� transform � organization, infrastructure
Build services around the edges
� do it again!
� Overview of microservices ecosystem
� 8 monolith decomposition guidelines
� 6 migration execution practices
Microservices Ecosystem The dream
ARCHITECTURE EVOLUTION TOWARDS MICROSERVICES
Monolith
ARCHITECTURE EVOLUTION TOWARDS MICROSERVICES
Intelligently Integrated
ARCHITECTURE EVOLUTION TOWARDS MICROSERVICES
Layered
ARCHITECTURE EVOLUTION TOWARDS MICROSERVICES
Centrally Integrated
ARCHITECTURE EVOLUTION TOWARDS MICROSERVICES
Microservices
ARCHITECTURE EVOLUTION TOWARDS MICROSERVICES
Microservices ecosystem as a platform
Monolith Evolution The battle
Use social code analysis e.g. CodeScene.io Consult the business portfolio
5. Decouple What Matters
Customer Personalization
Unit of evolution:
• Decouple • Redirect • Retire
Atomic step
Architecture Fitness function output
e.g. Speed of experimentation
Time
Evolution of the architecture
8. Migrate in Atomic Evolutionary Steps
A QUICK SUMMARY
1. Warm up with simple and fairly decoupled capabilities
2. Minimize dependency back to the monolith
3. Split sticky capabilities early
4. Decouple what matters: changes frequently and has high value to business
5. Decouple vertically and release the data early
6. Decouple capability not code
7. Go macro first then micro
8. Migrate in atomic evolutionary steps (use evolutionary architecture)
https://martinfowler.com/articles/break-monolith-into-microservices.html
Migration Execution The climb
The only thing a Big Bang re-architecture
guarantees is a Big Bang! - Martin Fowler
Experiment speed
N * (N -1) ____________ 2
Complexity in integration
0 50 100 150 200
Microservices Complexity
Possible number of connections
Experiment speed
10
45 1225
4950
19900
Gateway
µS
Dynamic Discovery Traffic Routing Load Balancing
Resiliency Observability
Security Policy Enforcement
µS µS
µS
1. Manage complexity with dedicated infrastructure
A service mesh is a dedicated infrastructure layer for making service-to-service communication safe, fast, and reliable. If you’re building a cloud native application, you need a service mesh!
“
” - WILLIAM MORGAN Co-creator of
API MANAGEMENT CAPABILITIES
API Documentation API Discovery
API Testing
Developer notification
Developer Engagement
Monetization
API Lifecycle Management
API Analytics
API KPI
Observability Telemetry Distributed
Tracing Logs
Resiliency
Active Health Checks
Fault Injections
Circuit breaker
SERVICE MESH CAPABILITIES
API Gateway (Proxy)
Security
Traffic
Management Routing
Load Balancing
Backend Infrastructure
Sidecar K8s Pod
APIs
Control Plane
Gateway
Backend Delivery Infrastructure
K8s Ingress Controller
Istio
2. Apply platform thinking to remove friction
Experiment speed
security
Delivery Infrastructure
Data Infra.
Domain API • Self-serve
• Abstract complexity
• As a Product
3. Define Architecture Outcomes Track with Fitness Function
Experiment speed
security throughput
Experiment speed
4. Measure, Measure, Measure Service KPIs
Experiment speed
security
throughput
Experiment speed
Service deployment frequency
Num apps built on a service API Service
API adoption lead time
Service API NPS
5. Clarify Trade-offs & record them
security BUY
BUILD RE WRITE
REUSE
There are no solutions. There are only trade-offs.
- Thomas Sowell
6. Align Organization
Experiment speed
• Long-lived teams
• Fluid team membership
• Virtual teams
• Open source ownership
• DRI (Directly Responsible Individual)
• Tech product owners
A QUICK SUMMARY
1. Manage complexity with a dedicated infrastructure
2. Apply platform thinking to remove friction
3. Define architecture outcomes and track with fitness function
4. Define and measure service / API KPIs
5. Clarify trade-offs and record them
6. Align organization
The Journey of a thousand miles begins with one step.
- Lao Tzu
THANK YOU!
@zhamakd [email protected]