Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and Serverless at Open Source Summit Japan

7.087 visualizaciones

Publicado el

Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and Serverless at Open Source Summit Japan

Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and Serverless at Open Source Summit Japan

  1. 1. Microservice 4.0 Journey From Spring NetFlix OSS to Istio Service Mesh and Serverless Daniel Oh / DevOps Evangelist Open Source Summit Japan 2018
  2. 2. About All of You ● How many of you are in charge of enterprise developer and application architect? ● How many of you have developed Microservices application based Spring Boot? ● How many of you have deployed Microservices app through containers in development? ● How many of you have heard about service mesh and istio before? ● How many of you have fingers on keyboard, played with service mesh via Istio? ● How many of you have deployed service mesh with istio in production? ● How many of you have developed serverless or FaaS(function as a service) in development? ● And so on and so forth Straw Poll Time!
  3. 3. About Me danieloh30 Daniel Oh @danieloh30doh@redhat.com ● DevOps Evangelist at Red Hat ○ Cloud Native App Practitioner ○ Agile Coach ○ Container Geek ● Java Developer ● Opensource.com DevOps Team ● Speaker & Writer
  4. 4. Short History of Microservices Continuous Integration via XP 1999 AWS EC2 2006 DropWizard May 2011 Agile Manifesto Feb 2001 NETFLIX to AWS 2010 Ribbon March 2012 Hystrix March 2012 Eureka July 2012 Microservices Access Thoughtworks Radar March 2012 Spring Boot Sept 2013 Microservices Defined Thoughtworks Fowler, Lewis March 2014 Kubernetes June 2014 Java EE 6 2009 DevOps 2009 Containers Docker 2013 @danieloh30
  5. 5. The microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies. Martin Fowler What is a microservice ? @danieloh30
  6. 6. @danieloh30 Monolith MyApp
  7. 7. @danieloh30 Modules
  8. 8. @danieloh30 Microservices
  9. 9. @danieloh30 Microservices
  10. 10. @danieloh30 Microservices
  11. 11. @danieloh30 Microservices
  12. 12. @danieloh30 Microservices
  13. 13. Microservices == Distributed Computing @danieloh30
  14. 14. OS JVM Service C OS JVM Service B OS JVM Service A @danieloh30 Distributed Computing == Network of Services
  15. 15. @danieloh30 Microservices own their Data
  16. 16. @danieloh30 Multiple Points of Entry
  17. 17. @danieloh30 Failure of a Service X
  18. 18. @danieloh30 Cascading Failure X X X X X X X
  19. 19. MyService Monitoring Tracing API Discovery Invocation Resilience Pipeline Authentication Logging Elasticity Microservices'ilities @danieloh30
  20. 20. MyService Monitoring Tracing API Discovery Invocation Resilience Pipeline Authentication Logging Elasticity Microservices'ilities + Netflix OSS == 1.0 @danieloh30
  21. 21. CONFIGURATION Spring Cloud Config Server Service Config Service Config Config INFRASTRUCTURE @danieloh30 Service
  22. 22. SERVICE DISCOVERY Service Spring Cloud Config Server Netflix Eureka Netflix Ribbon Config Service Config Service Config Svc Discovery Svc Discovery Svc Discovery INFRASTRUCTURE @danieloh30
  23. 23. DYNAMIC ROUTING Spring Cloud Config Server Service Netflix Eureka Netflix Ribbon Config Service Config Service Config Svc Discovery Svc Discovery Svc Discovery Routing Routing Routing Netflix Zuul Server INFRASTRUCTURE @danieloh30
  24. 24. FAULT TOLERANCE Spring Cloud Config Server Service Netflix Eureka Netflix Ribbon Config Service Config Service Config Svc Discovery Svc Discovery Svc Discovery Routing Routing Routing Netflix Zuul Server Circuit Breaker Circuit Breaker Circuit Breaker INFRASTRUCTURE @danieloh30
  25. 25. TRACING AND VISIBILITY Spring Cloud Config Server Service Netflix Eureka Netflix Ribbon Config Service Config Service Config Svc Discovery Svc Discovery Svc Discovery Routing Routing Routing Netflix Zuul Server Circuit Breaker Circuit Breaker Circuit Breaker Tracing Tracing Tracing ZipKin Server INFRASTRUCTURE @danieloh30
  26. 26. Java Only Adds a lot of libraries to YOUR code What's Wrong with Netflix OSS? @danieloh30
  27. 27. @danieloh30
  28. 28. MyService Monitoring Tracing API Discovery Invocation Resilience Pipeline Authentication Logging Elasticity @danieloh30 Microservices'ilities + Kubernetes == 2.0
  29. 29. MyService Monitoring Tracing API Discovery Invocation Resilience Pipeline Authentication Logging Elasticity @danieloh30 Microservices'ilities + OpenShift == 2.0
  30. 30. SERVICE MESH WITH ISTIO @danieloh30
  31. 31. A service mesh is a dedicated infrastructure layer for handling service-to-service communication. It’s responsible for the reliable delivery of requests through the complex topology of services that comprise a modern, cloud native application. In practice, the service mesh is typically implemented as an array of lightweight network proxies that are deployed alongside application code, without the application needing to be aware https://buoyant.io/2017/04/25/whats-a-service-mesh-and-why-do-i-need-one/ Service Mesh Defined @danieloh30
  32. 32. @danieloh30 Next Generation Microservices - Service Mesh Code Independent (Polyglot) ● Intelligent Routing and Load-Balancing ○ A/B Tests ○ Smarter Canary Releases ● Chaos: Fault Injection ● Resilience: Circuit Breakers ● Observability: Metrics and Tracing ● Fleet wide policy enforcement
  33. 33. @danieloh30 Istio - Sail (Kubernetes - Helmsman or ship’s pilot)
  34. 34. @danieloh30 MyService Monitoring Tracing API Discovery Invocation Resilience Pipeline Authentication Logging Elasticity Microservices'ilities + Istio == 3.0
  35. 35. @danieloh30 Microservices embedding Capabilities Container JVM Service B Discovery Load-balancer Resiliency Metrics Tracing Container JVM Service A Discovery Load-balancer Resiliency Metrics Tracing Container JVM Service C Discovery Load-balancer Resiliency Metrics Tracing Before Istio
  36. 36. @danieloh30 Microservices externalizing Capabilities Pod Container JVM Service A Sidecar Container Pod Container JVM Service C Sidecar Container Pod Container JVM Service B Sidecar Container After Istio
  37. 37. @danieloh30 Envoy is the current sidecar Pod Container JVM Service A Sidecar Container Pod Container JVM Service C Sidecar Container Pod Container JVM Service B Sidecar Container
  38. 38. @danieloh30 MICROSERVICES EVOLUTION Service Config Svc Discovery Routing Circuit Breaker Tracing Service Platform Container Platform (+ Service Mesh) ...2014 2018
  39. 39. @danieloh30 POD ENVOY SERVICE POD ENVOY SERVICE POD ENVOY SERVICE Pilot Mixer Auth SERVICE MESH ARCHITECTURE Applies security, route rules, policies and reports traffic telemetry at the pod level Jaeger
  40. 40. FAULT TOLERANCE @danieloh30
  41. 41. @danieloh30 SERVICE A SERVICE B CIRCUIT BREAKERS WITHOUT ISTIO SERVICE C CB CB coupled to the service code
  42. 42. @danieloh30 POD SERVICE A ENVOY POD SERVICE B ENVOY POD SERVICE C ENVOY CIRCUIT BREAKERS WITH ISTIO transparent to the services
  43. 43. @danieloh30 POD SERVICE A ENVOY POD SERVICE B ENVOY POD SERVICE C ENVOY CIRCUIT BREAKERS WITH ISTIO improved response time with global circuit status
  44. 44. @danieloh30 POD SERVICE A ENVOY POD SERVICE B ENVOY POD SERVICE C ENVOY TIMEOUTS AND RETRIES WITH ISTIO configure timeouts and retries, transparent to the services timeout: 10 sec retry: 5 timeout: 15 sec retry: 5
  45. 45. @danieloh30 POD SERVICE A ENVOY POD SERVICE B ENVOY POD SERVICE C ENVOY RATE LIMITING WITH ISTIO limit invocation rates, transparent to the services max 500 concurrent reqs max 100 connections
  46. 46. SERVICE SECURITY @danieloh30
  47. 47. @danieloh30 SERVICE A SERVICE B SECURE COMMUNICATION WITHOUT ISTIO SERVICE C TLS TLS TLS TLS coupled to the service code
  48. 48. @danieloh30 SECURE COMMUNICATION WITH ISTIO POD SERVICE A ENVOY POD SERVICE B ENVOY POD SERVICE C ENVOY mutual TLS authentication, transparent to the services TLS TLS
  49. 49. @danieloh30 POD SERVICE A ENVOY POD SERVICE B ENVOY POD SERVICE C ENVOY CONTROL SERVICE ACCESS WITH ISTIO control the service access flow, transparent to the services
  50. 50. CHAOS ENGINEERING @danieloh30
  51. 51. @danieloh30 CHAOS ENGINEERING WITHOUT ISTIO SERVICE A SERVICE B SERVICE C Netflix Chaos Monkeys Netflix Spinnaker random termination
  52. 52. @danieloh30 POD SERVICE A ENVOY POD SERVICE B ENVOY POD SERVICE C ENVOY CHAOS ENGINEERING WITH ISTIO inject delays, transparent to the services 10 sec delay in 10% of requests
  53. 53. @danieloh30 inject protocol-specific errors, transparent to the services POD SERVICE A ENVOY POD SERVICE B ENVOY POD SERVICE C ENVOY CHAOS ENGINEERING WITH ISTIO HTTP 400 in 5% of requests
  54. 54. DYNAMIC ROUTING @danieloh30
  55. 55. @danieloh30 Gateway Service SERVICE A SERVICE B:1 DYNAMIC ROUTING WITHOUT ISTIO SERVICE B:2 Netflix Zuul Server custom code to enable dynamic routing
  56. 56. @danieloh30 POD SERVICE A ENVOY POD SERVICE B:v2 ENVOY CANARY DEPLOYMENT WITH ISTIO POD SERVICE B:v1 ENVOY tokyo employee everyone
  57. 57. @danieloh30 POD SERVICE A ENVOY POD SERVICE B:v2 ENVOY A/B DEPLOYMENT WITH ISTIO POD SERVICE B:v1 ENVOY 70% traffic 30% traffic
  58. 58. @danieloh30 POD SERVICE A ENVOY POD SERVICE B:v2 ENVOY DARK LAUNCHES WITH ISTIO POD SERVICE B:v1 ENVOY 100% traffic mirror traffic
  59. 59. DISTRIBUTED TRACING @danieloh30
  60. 60. @danieloh30 SERVICE A SERVICE B SERVICE C DISTRIBUTED TRACING WITHOUT ISTIO Spring Sleuth ZipKin Spring Sleuth ZipKin Spring Sleuth ZipKin code to enable dynamic tracing
  61. 61. @danieloh30 POD SERVICE A ENVOY POD SERVICE B ENVOY POD SERVICE C ENVOY DISTRIBUTED TRACING WITH ISTIO & JAEGER discovers service relationships and process times, transparent to the services SERVICE A SERVICE B SERVICE C 210 ms 720 ms 930 ms
  62. 62. @danieloh30 Demo bit.ly/istio-tutorial learn.openshift.com/servicemesh
  63. 63. @danieloh30 “Change is the essential process of all of existence.” —SPOCK @danieloh30
  64. 64. @danieloh30 Let there be Functions == 4.0
  65. 65. @danieloh30 Microservices Serverless Functions Your Control Long-Lived Processes Known Programming Model Often Sync Request-Response Mature: IDE Integration Debuggers Tracers Monitoring CI/CD Cloud Control Short-Lived Processes New Programming Model Event-Driven Async Immature: ?
  66. 66. @danieloh30 It is Serverless, because of SaaS (managed by another party services).
  67. 67. @danieloh30 It is all about the Services
  68. 68. @danieloh30 API Gateway -as-a- Service HTTP Input/Output Service
  69. 69. @danieloh30 API Gateway -as-a- Service SSO-as-a- Service A P I Authentication Service
  70. 70. @danieloh30 Storage-as-a-Service A P I API Gateway -as-a- Service SSO-as-a- Service A P I File Storage Service
  71. 71. @danieloh30 Storage-as-a-Service A P I API Gateway -as-a- Service Cache-as-a- Service API DB-as-a- Service API SSO-as-a- Service A P I Data Services
  72. 72. @danieloh30 Storage-as-a-Service A P I API Gateway -as-a- Service Messaging -as-a- Service A P I Cache-as-a- Service API DB-as-a- Service API Notifications -as-a- Service A P I A P I SSO-as-a- Service A P I Connectivity Services
  73. 73. @danieloh30 Storage-as-a-Service A P I API Gateway -as-a- Service My Microservice A My Microservice B My Microservice C Messaging -as-a- Service A P I Cache-as-a- Service API DB-as-a- Service API Notifications -as-a- Service A P I A P I SSO-as-a- Service A P I Your Containerized Services
  74. 74. @danieloh30 Storage-as-a-Service A P I API Gateway -as-a- Service My Microservice A Function 1 My Microservice B My Microservice C Function 2 Function 3 Function 4 Messaging -as-a- Service A P I Cache-as-a- Service API DB-as-a- Service API Notifications -as-a- Service A P I A P I SSO-as-a- Service A P I Event-Driven Input Function 5
  75. 75. @danieloh30 Storage-as-a-Service A P I API Gateway -as-a- Service My Microservice A Function 1 My Microservice B My Microservice C Function 2 Function 3 Function 7 Function 4 Function 6 Messaging -as-a- Service A P I Cache-as-a- Service API DB-as-a- Service API Notifications -as-a- Service A P I A P I SSO-as-a- Service A P I Event-Driven Output Function 5
  76. 76. @danieloh30 Storage-as-a-Service A P I API Gateway -as-a- Service My Microservice A Function 1 My Microservice B My Microservice C Function 2 Function 3 Function 7 Function 4 Function 6 Messaging -as-a- Service A P I Cache-as-a- Service API DB-as-a- Service API Notifications -as-a- Service A P I A P I SSO-as-a- Service A P I Synergy Function 5
  77. 77. FaaS Kubernetes Players @danieloh30
  78. 78. Apache OpenWhisk ● Open Source incubating under Apache ● A Cloud platform to execute functions written in: ○ JavaScript ○ Swift ○ Java ○ Python ○ PHP ○ Docker ○ Go ● Deployable on ○ Any platform where docker can be run ○ Kubernetes/OpenShift @danieloh30
  79. 79. @danieloh30 OpenWhisk On OpenShift (bit.ly/faas-tutorial)
  80. 80. @danieloh30 Short History of Serverless * Only supports JavaScript Only for stateless, short-lived, simple applications AWS S3 March 2006 AWS Lambda November 2014 * AWS EC2 August 2006 Serverless Described Thoughtworks August 2016 Serverless Coined October 2012 Serverless Assess Thoughtworks Radar April 2016 AWS Dynamo DB January 2012 Firebase September 2011 Iron.io July 2011 Google Cloud Function Feb 2016 Azure Functions Mar 2016 Pivotal Function Service Dec 2017 Oracle Functions Sept 2016 IBM Bluemix OpenWhisk Feb 2016 Oracle Fn Project Oct 2017
  81. 81. RESOURCES @danieloh30
  82. 82. @danieloh30 Demo: bit.ly/msa-instructions Slides: bit.ly/microservicesdeepdive Video Training: bit.ly/microservicesvideo Free eBooks from developers.redhat.com bit.ly/reactivemicroservicesbookbit.ly/javamicroservicesbook Microservices Introductory Materials Advanced Materials bit.ly/istio-tutorial Kubernetes for Java Developers learn.openshift.com/servicemesh bit.ly/faas-tutorial learn.openshift.com/serverless
  83. 83. @danieloh30 bit.ly/mono2microdb bit.ly/istio-book
  84. 84. @danieloh30
  85. 85. THANK YOU & QUESTION? Contacting me: doh@redhat.com / @danieloh30

×