OCHaCafe Premium #2 クラウド・アプリケーションのパフォーマンス

OCHaCafe Premium #2 クラウド・アプリケーションのパフォーマンス

2020年4月3日実施 Oracle Cloud Hangout Cafe(おちゃかふぇ) の番外編 "OCHaCafe Premium" のセッション資料です。

https://ochacafe.connpass.com/event/169582/

3115a782126be714b5f94d24073c957d?s=128

oracle4engineer

April 03, 2020
Tweet

Transcript

  1. April 3, 2020 OCHaCafe Premium #2 Oracle Cloud Hangout Cafe

  2. 2 The following is intended to outline our general product

    direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed discussion of these factors and other risks that affect our business is contained in Oracle’s Securities and Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10-Q under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s website at http://www.oracle.com/investor. All information in this presentation is current as of September 2019 and Oracle undertakes no duty to update any statement in light of new information or future events. Safe harbor statement Copyright © 2020, Oracle and/or its affiliates. All rights reserved
  3. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    • • • • • “ ” 3
  4. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    3 2 1 マイクロサービス・アーキテクチャを適用したアプリケーションの性能 マイクロサービス・アーキテクチャとその性能に関わる考慮点 性能についてのおさらい 4
  5. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    5
  6. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    • • “ ” • - • “ ” • • ※ Wikipedia https://ja.wikipedia.org/wiki/%E3%83%91%E3%83%95%E3%82%A9%E3%83%BC%E3%83%9E%E3%83%B3%E3%82%B9 https://ja.wikipedia.org/wiki/%E6%80%A7%E8%83%BD 6
  7. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    2 TAT(Turn Around Time) • • • (Response Time) • • • 7
  8. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    (Throughput) • • TPS (Transaction Per Second) • (Bottleneck) • • • 8
  9. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    • • • • • DB IoT Pub/Sub etc. 100tps 100tps 100tps 100tps 100tps 200tps 9
  10. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    10
  11. / • • • • CI/CD ( ) 環境の分離による システム全断の防止

    自動化された ビルド/テスト/リリース リリース プロセスの反復 Copyright © 2020, Oracle and/or its affiliates. All rights reserved 11
  12. • • • • • • Copyright © 2020, Oracle

    and/or its affiliates. All rights reserved API 12
  13. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    API Microservices A B { … } { … } { … } { … } C B Ajax GET Ajax Ajax Ajax { … } { … } { … } API Gateway Service A Service B Service C Front Service 13
  14. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    • • • • • CPU/ • / Error! Error! ( ) 14
  15. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    • • • / • • API • / NoSQL RDB RDB NoSQL REST API 15
  16. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    1. 2. ( ) 3. • • A B C 16
  17. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    17
  18. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    EC • Mall - - • Cart - / - - • Order - - - Mall • search_products • get_product Order • list_orders • checkout • update_products Cart • add_product • get_cart • checkout list_order add_product/chekout search/get_product checkout 18
  19. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    • - - ( / ) - 1 • - - (※ ) - REST API - 19
  20. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    Mall • search_products • get_product Order • list_orders • checkout • update_products Cart • add_product • get_cart • checkout Pod: monolith-eshop PRODUCT INVENTORY ORDER ORDER_ITEM CART CART_ITEM 20
  21. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    / / Order REST Mall • search_products • get_product Pod: api-eshop-mall Cart • add_product • get_cart • checkout Pod: api-eshop-cart Order • list_orders • checkout • update_products • search_products • get_product Pod: api-eshop-order PRODUCT INVENTORY ORDER ORDER_ITEM CART CART_ITEM • / Order • / Order • Cart • Mall Cart 21
  22. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    Pod Load Gen DB api-eshop-mall Mall api-eshop-cart Cart api-eshop-order Order jaeger monolith-eshop Mall Cart Order 22
  23. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    / Pod Load Gen DB api-eshop-mall Mall api-eshop-cart Cart api-eshop-order Order jaeger monolith-eshop Mall Cart Order OKE Database System Virtual Machine 23
  24. Oracle Java OSS • GitHub https://github.com/oracle/helidon • Java Java 2

    • Helison MP Eclipse MicroProfile • Helison SE Cross Cutting Concern • • Redis (Helidon MP ) Project Helidon Copyright © 2020, Oracle and/or its affiliates. All rights reserved 24
  25. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    Java Eclipse MicroProfile • • Java EE • Eclipse MicroProfile - Kubernetes - Health Check/Circuit Breaker/Fault Tolerance - OpenTracing/OpenMetrics, etc. • Java EE 8 - JAX-RS/JSON-B/JSON-P/CDI/Commons Annotations OpenMetrics OpenTracing Health Check Circuit Breaker Fault Tolerance 25
  26. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    Oracle Container Engine for Kubernetes (OKE) Kubernetes 1Tb/s, <500μs Availability Domain 3 Worker Node 25Gb/s, <100μs Availability Domain 2 Worker Node 25Gb/s, <100μs Availability Domain 1 Master Node Worker Node 25Gb/s, <100μs Master Node Master Node 26
  27. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    Pod CPU Load Gen DB api-eshop-mall Mall api-eshop-cart Cart api-eshop-order Order jaeger monolith-eshop Mall Cart Order Pod OCPU (=1 core ) 2.00 2.00 0.25 ※metric-server require/limit = 500m CPU = 0.25 OCPU 0.25 0.25 0.25 1 REST Mall x 24, x 20 Cart x 8, x 3, x 1 Order x 1 27
  28. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    100 VU 3 28
  29. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    • - 0.25 OCPU - Pod 0.25 OCPU • - 0.25 OCPU A (Mall) + B (Cart) + C (Order) • Order - 0.25 OCPU A (Mall) + B’ (※) + C (Order) - ※Cart ( ) Load Gen api-eshop-mall Mall api-eshop-cart Cart api-eshop-order Order monolith-eshop Mall Cart Order 2.00 0.25 0.25 0.25 0.25 A B C A + B + C B’ A A + B + C A + B + C 29
  30. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    100 VU / • • • • ( ) • 30
  31. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    ) (tps) (ms) 100 VU ( ) 113.1 737 43.0 1,933 45 tps ( ) 45.8 14 43.3 1,065 40 tps 40.6 101 43tps 2 5 tps 1 31
  32. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    45tps #1 HTTP GET JAX-RS ( JPA ) 32
  33. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    45tps #2 JPA (7.57ms) (10.51ms) 33
  34. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    45tps #3 HTTP GET JAX-RS ( Rest Clinet Order REST ) Order ( ) 34
  35. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    9 45tps #4 (2.02s) (2.11s) Order JPA (5.55ms) Order (8.94ms) 35
  36. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    40tps ( ) (0.00ms) (107.2ms) Order JPA (5.16ms) Order (7.08ms) 36
  37. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    1. 2. ( ) 3. Mall Order Order (7.08 8.94ms ) Mall 37
  38. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    • - - ( / ) - 1 • - - (※ ) - API - • Event Sourcing/CQRS - - / Redis - (Kafka ) Produce/Consumer 38
  39. async-eshop-order Order async-relay-order relay Copyright © 2020, Oracle and/or its

    affiliates. All rights reserved async-eshop-mall Mall PRODUCT INVENTORY ORDER ORDER_ITEM redis-mall PRODUCT INVENTORY kProductStream kOrderStream async-relay-mall relay async-eshop-cart Cart async-relay-cart relay redis-cart PRODUCT INVENTORY CART CART_ITEM 39
  40. async-eshop-order Order async-relay-order relay Copyright © 2020, Oracle and/or its

    affiliates. All rights reserved Order async-eshop-mall Mall PRODUCT INVENTORY ORDER ORDER_ITEM redis-mall PRODUCT INVENTORY kProductStream kOrderStream async-relay-mall relay • Redis async-eshop-cart Cart async-relay-cart relay redis-cart PRODUCT INVENTORY CART CART_ITEM • Redis Order 40
  41. async-eshop-order Order async-relay-order relay Copyright © 2020, Oracle and/or its

    affiliates. All rights reserved async-eshop-mall Mall PRODUCT INVENTORY ORDER ORDER_ITEM redis-mall PRODUCT INVENTORY kProductStream kOrderStream • Kafka • Kafka async-relay-mall relay • Order async-eshop-cart Cart async-relay-cart relay redis-cart PRODUCT INVENTORY CART CART_ITEM • Cart • Mall • • 41
  42. Event Sourcing : #1 • • • • • •

    • INVENTORY Shopping API Decrease Inventory Event Store Order #123 Created Approve d Ready Shipped Subscribe Shipped Copyright © 2020, Oracle and/or its affiliates. All rights reserved 42
  43. CQRS : Event Sourcing #2 CQRS (Command Query Responsibility Segregation)

    Event Sourcing • • API • • Event Sourcing • HISTORY Shopping API Add History Event Store Order #123 Created Approve d Ready Shipped Subscribe Shipped Search History History API Publish Copyright © 2020, Oracle and/or its affiliates. All rights reserved 43
  44. async-eshop-order Order async-relay-order relay Copyright © 2020, Oracle and/or its

    affiliates. All rights reserved Microservices async-eshop-mall Mall PRODUCT INVENTORY ORDER ORDER_ITEM redis-mall PRODUCT INVENTORY kProductStream kOrderStream async-relay-mall relay async-eshop-cart Cart async-relay-cart relay redis-cart PRODUCT INVENTORY CART CART_ITEM Event Sourcing CQRS 44
  45. Load Gen Event Store Copyright © 2020, Oracle and/or its

    affiliates. All rights reserved jaeger DB monolith-eshop Mall Cart Order api-eshop-mall Mall api-eshop-cart Cart api-eshop-order Order async-eshop-mall Mall async-eshop-cart Cart async-eshop-order Order async-relay-mall Relay async-relay-cart Relay async-relay-order Relay kProductStream kOrderStream redis-mall redis-cart Pod 45
  46. Load Gen Event Store Copyright © 2020, Oracle and/or its

    affiliates. All rights reserved / OKE Virtual Machine DB Database System api-eshop-mall Mall api-eshop-cart Cart api-eshop-order Order async-eshop-mall Mall async-eshop-cart Cart async-eshop-order Order async-relay-mall Relay async-relay-cart Relay async-relay-order Relay kProductStream kOrderStream redis-mall redis-cart Streaming jaeger Pod monolith-eshop Mall Cart Order 46
  47. 47 Oracle Cloud Infrastructure - Streaming API Gateway Oracle Functions

    Events IoT Mobile/Web Activities Object Storage Database System App Kafka Client (Producer/Consumer) Streaming • • IoT SNS • • Apache Kafka Streaming • Kafka Broker Kafka API • Kafka Connect Copyright © 2020, Oracle and/or its affiliates. All rights reserved
  48. 1 OCPU x 4 node Load Gen Event Store Copyright

    © 2020, Oracle and/or its affiliates. All rights reserved Mall Cart Order Pod CPU jaeger DB api-eshop-mall Mall api-eshop-cart Cart api-eshop-order Order async-eshop-mall Mall async-eshop-cart Cart async-eshop-order Order async-relay-mall Relay async-relay-cart Relay async-relay-order Relay kProductStream kOrderStream redis-mall redis-cart 0.25 0.25 0.25 0.25 0.25 0.25 2.00 2.00 • Write: 1MB/s • Read: 2MB/s monolith-eshop Mall Cart Order 0.25 ※metric-server require/limit = 500m CPU = 0.25 OCPU 48
  49. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    100 VU +30% -25% 30% 49
  50. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    / ) (tps) (ms) 100 VU ( ) 113.1 737 43.0 1,933 149.8 556 45 tps ( ) 45.8 14 43.3 1,065 45.8 12 40 tps 40.6 101 3 50
  51. async-eshop-order Order async-relay-order relay Copyright © 2020, Oracle and/or its

    affiliates. All rights reserved async-eshop-mall Mall PRODUCT INVENTORY ORDER ORDER_ITEM redis-mall PRODUCT INVENTORY kProductStream kOrderStream async-relay-mall relay async-eshop-cart Cart async-relay-cart relay redis-cart PRODUCT INVENTORY CART CART_ITEM • Cart • • ( ) 51
  52. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    • • • • • Pub/Sub • 52
  53. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    • • • ( ) SLA • 53
  54. Copyright © 2020, Oracle and/or its affiliates. All rights reserved

    Thank you! 54
  55. None