Monolith to Microservices Making a Successful Transition Samir

  • Slides: 37
Download presentation
Monolith to Microservices: Making a Successful Transition Samir Behara, System Architect, EBSCO @samirbehara. com

Monolith to Microservices: Making a Successful Transition Samir Behara, System Architect, EBSCO @samirbehara. com

Agenda • • • Monolith vs Microservices Design Principles of Microservice Architecture How to

Agenda • • • Monolith vs Microservices Design Principles of Microservice Architecture How to break a Monolith into Microservices Automated CI/CD Pipelines Design a scalable and fault tolerant architecture Cloud Migration Strategy Feature Flags Microservices Observability How to reduce complexity in a Microservice Architecture

Monolithic Architecture Large Codebase Difficult to Scale Order Manageme nt Service Longer Development Cycle

Monolithic Architecture Large Codebase Difficult to Scale Order Manageme nt Service Longer Development Cycle Monolith ic Database Complicated Deployments Fixed Technology stack Performance Issues Tight Coupling

Applying Domain Driven Design

Applying Domain Driven Design

Monolith Architecture – Centralized Database

Monolith Architecture – Centralized Database

Databases are private to each Microservice

Databases are private to each Microservice

Emergence of Microservices Shorter Development Cycle Faster Deployments Highly Scalable Right Technology Stack Business

Emergence of Microservices Shorter Development Cycle Faster Deployments Highly Scalable Right Technology Stack Business Domain Driven Resiliency & Observability High Cohesion & Loose Coupling

Polyglot Persistence

Polyglot Persistence

Automated CI/CD Pipelines

Automated CI/CD Pipelines

Microservices CI/CD Ecosystem

Microservices CI/CD Ecosystem

Deploying Monolithic Applications

Deploying Monolithic Applications

Strangler Pattern in action

Strangler Pattern in action

Microservices Deployments

Microservices Deployments

Transform and Eliminate Pattern TRANSFOR M COEXIST ELIMINAT E

Transform and Eliminate Pattern TRANSFOR M COEXIST ELIMINAT E

Feature Flags – Deployment Scenario 1 Scenario: Incremental feature deployment Feature A Feature B

Feature Flags – Deployment Scenario 1 Scenario: Incremental feature deployment Feature A Feature B DEV Feature A Feature B. 1 Feature B. 2 QA MOCK PROD

Feature Flags – Deployment Scenario 2 Scenario: One passes QA and one fails QA

Feature Flags – Deployment Scenario 2 Scenario: One passes QA and one fails QA Even though feature A did not receive QA approval, we can still deliver feature B to the customer. We simply switch off the offending feature and create a new task to fix the bug. Feature A Bug Fix Feature B DEV Feature A Feature B Feature A Bug Fix MOCK QA Bug Created PROD

Event Driven Architecture Tight Coupling between components in your architecture Loose Coupling between components

Event Driven Architecture Tight Coupling between components in your architecture Loose Coupling between components for better performance

Design for Scalability Web Server Order Servic e Order Servic e

Design for Scalability Web Server Order Servic e Order Servic e

Database Scaling

Database Scaling

Handling Read-Heavy Workloads

Handling Read-Heavy Workloads

Caching to Improve Database Performance Order Service 1. Is data in Cache? CACH E

Caching to Improve Database Performance Order Service 1. Is data in Cache? CACH E 3. If No, fetch from DB, Save in Cache and Read it 2. If Yes, Read it • Keep frequently accessed data in Memory • Memory is faster than disk • Reduced load on Database

Circuit Breaker Design Pattern Design for Failures Handle Failures gracefully Avoid Cascading failures Avoid

Circuit Breaker Design Pattern Design for Failures Handle Failures gracefully Avoid Cascading failures Avoid single point of failure Design Resilient and Fault Tolerant Microservices

Cloud Migration Strategy Migrat e Modernize Lift and Shift Containers and Microservice Architecture No

Cloud Migration Strategy Migrat e Modernize Lift and Shift Containers and Microservice Architecture No Code Changes required Requires application refactoring Fast Deployment Time Consuming Can’t leverage the true potential of Cloud Leverage benefits of Cloud Native Expensive on long run Cost Optimized solution in Cloud

6 R’s of Cloud Migration Cost and Effort --> REFACTOR REPURCHASE REPLATFORM REHOST RETAIN

6 R’s of Cloud Migration Cost and Effort --> REFACTOR REPURCHASE REPLATFORM REHOST RETAIN RETIRE Time to Migrate ---

Blue Green Deployments

Blue Green Deployments

Canary Release

Canary Release

The Three Pillars of Observability LOGGING METRICS TRACING

The Three Pillars of Observability LOGGING METRICS TRACING

Monitoring your Microservices Architecture

Monitoring your Microservices Architecture

Visualization and Time Series Analytics Create your own Dashboards for Monitoring and explore the

Visualization and Time Series Analytics Create your own Dashboards for Monitoring and explore the service metrics Visualization tools to help you understand your data better

Distributed Tracing Used to troubleshoot latency issues in a Microservice Architecture

Distributed Tracing Used to troubleshoot latency issues in a Microservice Architecture

Microservices Code Quality Open Source tool for continuous inspection of code quality. Set up

Microservices Code Quality Open Source tool for continuous inspection of code quality. Set up Quality Gates in your application and integration with Pipeline.

Testing your Microservices Applications

Testing your Microservices Applications

Complexities in a Microservice Architecture Service Discover y Auto Scalin g Distribute d Tracing

Complexities in a Microservice Architecture Service Discover y Auto Scalin g Distribute d Tracing Testabili ty Circuit Breakin g Monitorin g Orchestratio n Versionin g Securit y Metrics Collectio n Distribute d Logging Health Check Load Balancin g Contrac ts Automate d Deployme nt API Managemen t Distributed Transaction s Resilienc y Networ k Observability Configurati on

Sidecar Design Pattern

Sidecar Design Pattern

Shared Libraries vs Service Mesh

Shared Libraries vs Service Mesh

Service Mesh Journey

Service Mesh Journey

Thank You @samirbehara@gmail. com samirbehara. com

Thank You @samirbehara@gmail. com samirbehara. com