Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Microservices Adoption

özay duman
January 29, 2020

Microservices Adoption

Why Microservice Architecture
Path to Microservices
Obstacles, Patterns
Experiences

özay duman

January 29, 2020
Tweet

Other Decks in Technology

Transcript

  1. Who am I? ozay_duman ozayduman ozayduman  12 years of

    experience  Software Architect  4 years on microservices development & Cloud Native Applications
  2. Centralised management of your services Order Service Payment Service Delivery

    Service Notification Service Accounting Service Enterprise Service Bus
  3. Centralised management of your services Order Service Payment Service Delivery

    Service Notification Service Accounting Service centralized architecture == single point of failure
  4. How to organize teams to build a scalable system? Frontend

    Backend Database QA Ops .. Team A Team B Team C
  5. How to organize teams to build a scalable system? Order

    Team Payment Team Delivery Team Order Service Payment Service Delivery Service Production CI/CD Pipeline
  6. Why Microservices? Strong Module Boundaries Independently Deployable & Scalable Improved

    Fault Isolation Easier to Understand Develop Technology Diversity Autonomous Teams …
  7. Scalability Microservices Monolith 1 * instances Partitions 1 * Y-

    Functional decomposition Z-Data partitioning X- Scale by cloning Chris Richardson
  8. Y-axis scaling Order Payment Delivery Accounting Review Order Service Payment

    Service Delivery Service Review Service Accounting Service WAR/EAR
  9. Scalability Microservices Monolith 1 * instances Partitions 1 * Y-

    Functional decomposition Z-Data partitioning X- Scale by cloning Chris Richardson
  10. Business Process Event Storming - DDD AGGREGATE COMMAND DOMAIN EVENT

    Domain Event Issues Command Aggregate External System View
  11. But there is a price to pay ! Complexity of

    developing a Distributed System Transaction Management Eventual Consistency Complexity of Deployment & Operating Network Latency Complexity of Testing Requires Cultural Change
  12. Broker Based Messaging Order Service Payment Service Delivery Service Notification

    Service T O P I C Partition Partition Partition Producer Consumer Consumer Consumer • Message Ordering • Delivery Guarantees • Scalability • Persistence • Durability • Duplicate Message Handling
  13. Transactional Messaging Order Service T O P I C Partition

    Partition Partition Producer Order Table Event Table Message Publisher Database
  14. Transaction Log Mining (Tailing) Order Service T O P I

    C Partition Partition Partition Producer Transaction Log Event Table Transaction Log Miner Postgres WAL Debezium LinkedIn Databus Database
  15. Sagas – orchestration based Inventory Service Delivery Service Payment Service

    REST API Message Broker Inventory Service Request Channel CreateOrderSaga Reply Channel Payment Service Request Channel Delivery Service Request Channel Create Order Saga Orchestrator Order Service Command Reply
  16. Sagas – choreography based Order Service Inventory Service Delivery Service

    Payment Service REST API Message Broker Order Events Inventory Events Payment Events Delivery Events Publish Subscribe
  17. Self Contained Services Order Service Product Service REST API Message

    Broker Product Events Publish Subscribe Name Price Discount Products Table Name Price Discount Products Table id … Orders Table Phone 200 TL %3 TL Phone 200 TL %3 TL CQRS
  18. Service Discovery Client Service Inventory Service Delivery Service Payment Service

    REST API REST API REST API 10.150.0.41:8080 10.90.0.23:7519 10.70.2.71:3333 dynamically changed dynamically assigned how to load balance?
  19. Service Mesh REST API Circuit Breaker Service Discovery Load Balancing

    Security Order Service Distributed Tracing Traffic Routing Sidecar Proxy Deployment Infrastructure