enterprise microservice platform and operation experience
play

Enterprise Microservice Platform and Operation - PowerPoint PPT Presentation

Enterprise Microservice Platform and Operation Experience Sharing Ivan Hsieh P .1 Agenda Microservice Architecture How to break a Monolith into Microservices


  1. 企業微服務平台建置與維運經驗分享 Enterprise Microservice Platform and Operation Experience Sharing 謝逸凡 Ivan Hsieh P .1

  2. Agenda • Microservice Architecture • How to break a Monolith into Microservices • Microservice Operation Monitor P .2 2

  3. Microservice Cloud Native Architecture Traditional Developer Container Architecture Monitor Code Build Deploy Serverless( FaaS / BaaS )

  4. Focus on Service Objective 架構原則 設計與交付實 服務目標 務 • 降低慣性 加快上 • 標準 REST • 擴展企業規模 • 封裝舊系統 版速度 • 支援進入新市場 • 提高可用度,容 • 消除整合資料庫 • 支援既有市場創新 • 發佈整合模型 量可以快速調整 • 短時間交付新功能 • 服務使用重組 • 獨立小服務 • 資料快速整合處 • 快速部屬 • 減少客製 理產生應用

  5. Characteristics of a Microservice Architecture 技術的異質性 韌性 高可用度 擴展 • • 失敗隔離 ,隔艙 • 持久化資料都在外部,快速容量 專注服務 • • 隱藏內部細節 組織調整,去中心化 擴展 • • 數據隔離,資料一致性 • 說明依賴關係並隔離管理依賴 持續創新 • 一個或多個無狀態服務一起運行 • 非同步架構 容易部屬 ,自動化 服務建構開發&運行 • • 一份程式代碼 多環境部屬 服務重組 • • 環境配置檔案與程式代碼分開隔離 後端服務當作附加資源 • • DevOps CICD 透過網路API調用後端服務 • • 獨立部屬 漸進式設計 • • 開發環境與正式環境相同 Log / 管理監控機制 • 快速重啟容器特性

  6. Microservice Architecture Identity micro service Client App RDB Catalog micro service API Gateway Cache Event Bus Ordering micro service RDB Marketing micro service WebApp NoSQL 6

  7. Microservice Build 服務切割越細可擴展性越強,彈性越好,複雜度也越高 外 鬆耦合 Loosely Couple • 內 高度聚合 • 微服務邊界與介面 Boundary Context / Explicit Interface • 微服務間共用資料模型 • 微服務隱藏細節 • 不夠瞭解服務過早分解 • 需要找到平衡點與自己的技術管理能力對齊 • 不要想要㇐步到位 •

  8. Application Modernization Service Oriented 3 Tier Micro Service Fine Grained components One Size fit all SuperFine service Loosely coupling tight coupling Loosely decoupled UI UI UI ESB (Business Logic) API Business MS MS MS MS MS Logic Service Service Service Data Data Data Data Data base base base base base Database Database

  9. Microservice Application Stateless Load Balancer Load Balancer AP AP AP AP AP AP Load Balancer Load Balancer Service2 Service2 Service2 Service1 Service1 Service3 Service3

  10. Break a Monolith into Microservices Service Service API Service1 Service2 Service3 Service 4 Service2 Service3 Service 4 Monolith Service Monolith Service

  11. Break a Monolith into Microservices - Database Read/Write splitting Database Shading 1~100 Master Write Read service E Slave Slave service A 200~300 Cache service C service B service A Portal2 Portal2 CDN Portal2

  12. Break a Monolith into Microservices - Database 資料庫依賴問題 打破 FK • 公用靜態資料 • 共用靜態資料庫 • 共用資料表 • Data Table FK Data Integrity Check

  13. Break a Monolith into Microservices - Database Share Data Read Only  Copy to each service  Property file Read/Write  Build a data service Share Table  Spilt Table

  14. Legacy Transaction Boundary Java XA DB Link DB Function Database Two Phase Commit Database Two Phase Commit

  15. Microservice Transaction Boundary Data Eventual Consistency (CAP) Microservice A API / Microservice B Services Event Bus (Push / Subscribe) Microservice C bklog 稍後再試 • Compensating Service 終止交易 • 分散交易 •

  16. Microservice Reporting & DW Legacy System Cloud Native Application Modernization Data Service API Web Microservice AP Event Data Pump Data Service Queue Platform Database Database Service ETL ETL ETL Storage Clone Service ODS/DW Application Data Mark BI Platform

  17. Microservice Operation • Testing Policy • Deployment • DevOps CI CD • Service Mesh • Architecture • Deployment Enhancement • Error Handle • Log System

  18. Microservice Architecture Identity micro service Client App RDB Catalog micro service API Gateway Cache Event Bus Ordering micro service RDB Marketing micro service WebApp NoSQL 18

  19. Microservice Testing Identity micro service Unit Service Code Build Testing Testing RDB Catalog micro service Service Unit Code Build Testing Testing Cache • 端到端測試複雜 Ordering micro service E2E • Who is owner Testing • 相互干擾 Unit Service Code Build Testing Testing RDB Marketing micro service Unit Service Code Build Testing Testing NoSQL

  20. Microservice Testing – Load Test Max Loading Best Loading CPU RT • 每次都要執行壓測 ? • 單元壓測 TPS • 服務壓測 • E2E 壓測 VU (Virtual User) VU (Virtual User) 同時執行客戶數 每秒可執行的交易 TPS (Transaction Per Second) 响應時間 RT (Response Time)

  21. 2 1 DevOps CI/CD - Docker K8S SIT Cluster K8S Prod Cluster Code Service Service Service Service Service V1 V1 V1 V1 V0 V2 Code V2 Service Service Service Service Service Trigger V1 V2 V2 V2 V0 build code & test Deploy request Code Change/ Deploy request A10 Commit Pull image Pull image & deploy & deploy Push service image Release event V1 V2 V1 V2 V1 V2 sync sync Image Image Image Image Image Image image image SIT Image Registry Exchange Pool Prod Image Registry

  22. Microservice Platform Virtualization Container Orchestration Tools Container

  23. Service Mesh Concept 微服務間通信的基礎設施層,以Slidecar模式 與應用配合運行,負責服務之間的網路 調用、路由轉發、負載均衡、限流、熔斷和監 控。 Sidecar Application Peripheral tasks such as : • Platform abstraction Core • Proxy to remove service Functionality • Logging • Configuration

  24. Service Mesh Concept Sidecar Application

  25. Istio Service Mesh Architecture Control Plane TLS Certs (Citadel) Secret Service Account Policy & Telemetry Kubernetes API (Mixer) Secret Secret Secret Config Data (Pilot) Pod Pod Pod Sidecar Sidecar Sidecar jaeger (Envoy) (Envoy) (Envoy) mTLS mTLS App A App B App C Service A Service B Service C Data Plane

  26. Service Mesh Deployment Service / Service / Ingress Ingress Mirrored Original Traffic Traffic V1 V2 V2 V1 Shadow Bule /Green

  27. Service Mesh Canary Deployment Service / Service / Ingress Ingress User agent : iPhone User agent : Android 5% 95% Canary Canary V1 V1 Traffic split Contain Base

  28. Service Mesh Error Handle Retry Timeout 3S Delay 3S Return Error Service / Ingress • Return Error • Retry times • Delay

  29. Service Mesh Error Handle Circuit Break Time out or Error Service / Ingress Hit Threshold Return error Break Service Retry Service / Ingress Hit Threshold Reconnect Service

  30. E2E Monitor Use service E2E point of view to create a monitor Store Business Transaction Call Center eService ERP Application Billing CRM Ordering Network Server AP Server Hybrid IT Storage Database Web Infrastructure

  31. AIOps Monitor Add resource Alert & check root cause CPU 100 Fix Threshold Vibrable Threshold (+- 10%) 50 0 Time 0 12 24 Threshold Actual

  32. Monitor Log Center – Service Trace Web 開戶 啟用服務 API S1 S3 S6 S9 A1 B1 D1 B1 C1 A2 B2 C1 D1 B1 Service Trace A1 A2 B1 B2 C1 D1 Business A11 A6 B5 B7 C5 D2 A 服務 S1 A2 B2 C1 D1 B1 A6 B7 C5 B5 D2

  33. Log Center Web API APP DB Trace ID Trace ID Trace ID Trace ID Span ID Span ID Span ID Span ID Parent ID Parent ID Parent ID Parent ID Host IP Host IP Host IP Host IP App name App name App name App name Service name Service name Service name Service name End Time Start Time Start Time Start Time Elapsed time Elapsed time Elapsed time Elapsed time Return Code Return Code Return Code Return Code OPID Chanel code DB Name Client IP Protocol name SQL Session ID

  34. Log Center Span ID : S003 Span ID : S005 Trace ID : T001 Trace ID : T001 Span ID : S001 Span ID : S002 Parent ID : S002 Parent ID : S003 Trace ID : T001 Trace ID : T001 Parent ID Parent ID : S001 Span ID : S004 End Time : Start Time : jaeger 14:20:13:20 14:20:13:01 Trace ID : T001 Elapsed time : 20 Elapsed time : 7 Parent ID : S002 T001 14:20:13:00 14:20:13:20 20 S001 14:20:13:01 14:20:13:09 S002 7 8 S003 14:20:13:19 14:20:15:10 4 S005 S004 6

  35. What’s Next ► Focus on service ► Not all in Microservice ► Monitor & Log continue enhancement ► Automation for Microservice environment ► Use more Visualization tool to support operation ► cloud-native application on Service ,Data ,Container infrastructure 35

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend