MONOLITHS TO MICROSERVICES: APP
TRANSFORMATION
Hands-on Technical Workshop
PART 5: RESILIENT DISTRIBUTED
APPS
INSERT DESIGNATOR, IF NEEDED3
DISTRIBUTED SERVICES ARCHITECTURES
Benefits (when implemented correctly):
● Performance
● Reliability
● Resiliency
● Extensibility
● Availability
● Robustness
INSERT DESIGNATOR, IF NEEDED4
DISTRIBUTED SERVICES ARCHITECTURES
Fallacies of Distributed Computing
● The network is reliable.
● Latency is zero.
● Bandwidth is infinite.
● The network is secure.
● Topology doesn't change.
● There is one administrator.
● Transport cost is zero.
● The network is homogeneous.
wikipedia.org/wiki/Fallacies_of_distributed_computing
INSERT DESIGNATOR, IF NEEDED5
DISTRIBUTED SERVICES ARCHITECTURES
Applications must deal with
● Unpredictable failure modes
● End-to-end application correctness
● System degradation
● Topology changes
● Elastic/ephemeral/transient resources
A
E
B C
F G
D
H
I
Client
INSERT DESIGNATOR, IF NEEDED6
MICROSERVICES == DISTRIBUTED COMPUTING
INSERT DESIGNATOR, IF NEEDED7
Example
ACME Laptop 128GB SSD,
8GB RAM
$323.56
Touchscreen
128GB SSD
8GB RAM
Core i3
Windows 10
Add to Cart
In-Store Pickup (15 available)
Raleigh, Central Ave, Store #1123
Recommendations
Pricing Engine
Reviews
Details/Specifications
Location-based availability
People who purchased also...
INSERT DESIGNATOR, IF NEEDED8
Chaining
INSERT DESIGNATOR, IF NEEDED9
Chaining (Fail)
X
INSERT DESIGNATOR, IF NEEDED10
Chaining (Cascading Fail)
XXXX
X
INSERT DESIGNATOR, IF NEEDED11
POSSIBLE SOLUTIONS
Today, Developers do this:
● Circuit Breaking
● Bulkheading
● Timeouts/Retries
● Service Discovery
● Client-side Load Balancing
INSERT DESIGNATOR, IF NEEDED12
TOO MUCH INFRASTRUCTURE IN BUSINESS LOGIC
INSERT DESIGNATOR, IF NEEDED
spring-cloud-netflix-hystrix
spring-cloud-netflix-zuul
spring-cloud-netflix-eureka-client
spring-cloud-netflix-ribbon
spring-cloud-netflix-atlas
spring-cloud-netflix-spectator
spring-cloud-netflix-hystrix-stream
...
@Enable....150MagicThings
org.wildfly.swarm.hystrix
org.wildfly.swarm.ribbon
org.wildfly.swarm.topology
org.wildfly.swarm.camel-zookeeper
org.wildfly.swarm.hystrix
org.wildfly.swarm.hystrix
...
vertx-circuit-breaker
vertx-service-discovery
vertx-dropwizard-metrics
Vertx-zipkin
...
+ Node.js
+ Go
+ Python
+ Ruby
+ Perl
+ ….
BUT I’M USING...
INSERT DESIGNATOR, IF NEEDED
SIDECARS
PODS WITH TWO CONTAINERS
Pod
Container
JVM
Service A
Side-car Container
Pod
Container
JVM
Service B
Side-car Container
Pod
Container
JVM
Service C
Side-car Container
● Service proxy
● C++. fast
● L3&4 network filter
● Service discovery
● Health checking
● Load balancing
● Stats, metrics, tracing
Istio - Sail
(Kubernetes - Helmsman or ship’s pilot)
ISTIO - A ROBUST SERVICE MESH FOR
MICROSERVICES
Further Reading :
https://blog.openshift.com/red-hat-istio-launch/
https://istio.io/blog/istio-service-mesh-for-microservices.html
http://blog.christianposta.com/microservices/the-hardest-part-of-microservices-calling-your-services/
Key Features
● Intelligent routing and load balancing
● Fleet-wide, in-depth observability
● Resiliency across languages and platforms
● Fault injection
● Developer productivity
● Policy driven ops
● Circuit breaking, outlier detection
● Timeouts/retries
● Rate limiting
● Secure by default
● Incremental, unobtrusive adoptionImage from Christian Posta
*
* App-specific fallback logic belongs here
Istio Control Plane
ISTIO - A ROBUST SERVICE MESH FOR
MICROSERVICES
Istio Pilot Istio Mixer Istio Auth
Pod
Container
Service A
Envoy Proxy
Pod
Container
Service A
Envoy Proxy
Pod
Container
Service A
Envoy ProxyIstio Data
Plane
● service discovery
● load balancing
● TLS termination
● HTTP/2 & gRPC proxying,
● circuit breakers,
● health checks,
● staged rollouts fault injection
● rich metrics.
● access control
● usage policies
● telemetry
collection
● traffic mgmt
● discovery
● authentication
● policy enforcement
● Id & credentials
MICROSERVICES 3.0 - SERVICE MESH
Code Independent:
● Intelligent Routing and Load-Balancing
○ A/B Tests
○ Canary Releases
○ Dark Launches
● Distributed Tracing
● Circuit Breakers
● Fine grained Access Control
● Telemetry, metrics and Logs
● Fleet wide policy enforcement
Config Server
NETFLIX
Ribbon
Jaeger Istio
LAB: DETECTING AND PREVENTING
ISSUES IN DISTRIBUTED APPS WITH
ISTIO
GOAL FOR LAB
In this lab you will learn:
● How to install Istio onto OpenShift Container Platform
● How to deploy apps with sidecar proxies
● How to generate and visualize deep metrics for apps
● How to alter routing dynamically
● How to inject faults for testing
● How to do rate limiting
● How Istio implements circuit breaking and distributed tracing
SAMPLE APP: “BookInfo”
Ingress
Proxy
P
R
O
X
Y
Product
Page
Pilot Mixer Prometheus
Jaeger
P
R
O
X
Y
Details
P
R
O
X
Y
Ratings
Proxy
Reviews
v1
Proxy
Reviews
v2
Proxy
Reviews
v3
SAMPLE APP: “BookInfo”
LAB: DETECTING AND PREVENTING ISSUES IN
DISTRIBUTED APPS WITH ISTIO
SCENARIO 7 PREVENT AND DETECT ISSUES IN A DISTRIBUTED SYSTEM
WRAP-UP AND DISCUSSION
RESULT OF LAB
In this lab you learned:
● How to install Istio onto OpenShift Container Platform
● How to deploy apps with sidecar proxies
● How to generate and visualize deep metrics for apps
● How to alter routing dynamically
● How to inject faults for testing
● How to do rate limiting
● How Istio implements circuit breaking and distributed
tracing
● Use cases for service mesh
MICROSERVICES 4.0?
Service Microservice
Function
f( )
> Single Purpose
> Stateless
> Independently Scalable
> Automated
> Single Action
> Event-sourced
> Ephemeral
> Autonomous
> Loosely-coupled
SERVERLESS PROJECTS / SERVICES
28
http://funcatron.org
CLOUD FUNCTIONS BETA
serverless-docker
THANK YOU
plus.google.com/+RedHat
linkedin.com/company/red-hat
youtube.com/user/RedHatVideos
facebook.com/redhatinc
twitter.com/RedHatNews

Monoliths to Microservices: App Transformation - Jacksonville Workshop Slides

  • 1.
    MONOLITHS TO MICROSERVICES:APP TRANSFORMATION Hands-on Technical Workshop
  • 2.
    PART 5: RESILIENTDISTRIBUTED APPS
  • 3.
    INSERT DESIGNATOR, IFNEEDED3 DISTRIBUTED SERVICES ARCHITECTURES Benefits (when implemented correctly): ● Performance ● Reliability ● Resiliency ● Extensibility ● Availability ● Robustness
  • 4.
    INSERT DESIGNATOR, IFNEEDED4 DISTRIBUTED SERVICES ARCHITECTURES Fallacies of Distributed Computing ● The network is reliable. ● Latency is zero. ● Bandwidth is infinite. ● The network is secure. ● Topology doesn't change. ● There is one administrator. ● Transport cost is zero. ● The network is homogeneous. wikipedia.org/wiki/Fallacies_of_distributed_computing
  • 5.
    INSERT DESIGNATOR, IFNEEDED5 DISTRIBUTED SERVICES ARCHITECTURES Applications must deal with ● Unpredictable failure modes ● End-to-end application correctness ● System degradation ● Topology changes ● Elastic/ephemeral/transient resources A E B C F G D H I Client
  • 6.
    INSERT DESIGNATOR, IFNEEDED6 MICROSERVICES == DISTRIBUTED COMPUTING
  • 7.
    INSERT DESIGNATOR, IFNEEDED7 Example ACME Laptop 128GB SSD, 8GB RAM $323.56 Touchscreen 128GB SSD 8GB RAM Core i3 Windows 10 Add to Cart In-Store Pickup (15 available) Raleigh, Central Ave, Store #1123 Recommendations Pricing Engine Reviews Details/Specifications Location-based availability People who purchased also...
  • 8.
    INSERT DESIGNATOR, IFNEEDED8 Chaining
  • 9.
    INSERT DESIGNATOR, IFNEEDED9 Chaining (Fail) X
  • 10.
    INSERT DESIGNATOR, IFNEEDED10 Chaining (Cascading Fail) XXXX X
  • 11.
    INSERT DESIGNATOR, IFNEEDED11 POSSIBLE SOLUTIONS Today, Developers do this: ● Circuit Breaking ● Bulkheading ● Timeouts/Retries ● Service Discovery ● Client-side Load Balancing
  • 12.
    INSERT DESIGNATOR, IFNEEDED12 TOO MUCH INFRASTRUCTURE IN BUSINESS LOGIC
  • 13.
    INSERT DESIGNATOR, IFNEEDED spring-cloud-netflix-hystrix spring-cloud-netflix-zuul spring-cloud-netflix-eureka-client spring-cloud-netflix-ribbon spring-cloud-netflix-atlas spring-cloud-netflix-spectator spring-cloud-netflix-hystrix-stream ... @Enable....150MagicThings org.wildfly.swarm.hystrix org.wildfly.swarm.ribbon org.wildfly.swarm.topology org.wildfly.swarm.camel-zookeeper org.wildfly.swarm.hystrix org.wildfly.swarm.hystrix ... vertx-circuit-breaker vertx-service-discovery vertx-dropwizard-metrics Vertx-zipkin ... + Node.js + Go + Python + Ruby + Perl + …. BUT I’M USING...
  • 14.
    INSERT DESIGNATOR, IFNEEDED SIDECARS
  • 15.
    PODS WITH TWOCONTAINERS Pod Container JVM Service A Side-car Container Pod Container JVM Service B Side-car Container Pod Container JVM Service C Side-car Container ● Service proxy ● C++. fast ● L3&4 network filter ● Service discovery ● Health checking ● Load balancing ● Stats, metrics, tracing
  • 16.
    Istio - Sail (Kubernetes- Helmsman or ship’s pilot)
  • 17.
    ISTIO - AROBUST SERVICE MESH FOR MICROSERVICES Further Reading : https://blog.openshift.com/red-hat-istio-launch/ https://istio.io/blog/istio-service-mesh-for-microservices.html http://blog.christianposta.com/microservices/the-hardest-part-of-microservices-calling-your-services/ Key Features ● Intelligent routing and load balancing ● Fleet-wide, in-depth observability ● Resiliency across languages and platforms ● Fault injection ● Developer productivity ● Policy driven ops ● Circuit breaking, outlier detection ● Timeouts/retries ● Rate limiting ● Secure by default ● Incremental, unobtrusive adoptionImage from Christian Posta * * App-specific fallback logic belongs here
  • 18.
    Istio Control Plane ISTIO- A ROBUST SERVICE MESH FOR MICROSERVICES Istio Pilot Istio Mixer Istio Auth Pod Container Service A Envoy Proxy Pod Container Service A Envoy Proxy Pod Container Service A Envoy ProxyIstio Data Plane ● service discovery ● load balancing ● TLS termination ● HTTP/2 & gRPC proxying, ● circuit breakers, ● health checks, ● staged rollouts fault injection ● rich metrics. ● access control ● usage policies ● telemetry collection ● traffic mgmt ● discovery ● authentication ● policy enforcement ● Id & credentials
  • 19.
    MICROSERVICES 3.0 -SERVICE MESH Code Independent: ● Intelligent Routing and Load-Balancing ○ A/B Tests ○ Canary Releases ○ Dark Launches ● Distributed Tracing ● Circuit Breakers ● Fine grained Access Control ● Telemetry, metrics and Logs ● Fleet wide policy enforcement Config Server NETFLIX Ribbon Jaeger Istio
  • 20.
    LAB: DETECTING ANDPREVENTING ISSUES IN DISTRIBUTED APPS WITH ISTIO
  • 21.
    GOAL FOR LAB Inthis lab you will learn: ● How to install Istio onto OpenShift Container Platform ● How to deploy apps with sidecar proxies ● How to generate and visualize deep metrics for apps ● How to alter routing dynamically ● How to inject faults for testing ● How to do rate limiting ● How Istio implements circuit breaking and distributed tracing
  • 22.
  • 23.
  • 24.
    LAB: DETECTING ANDPREVENTING ISSUES IN DISTRIBUTED APPS WITH ISTIO SCENARIO 7 PREVENT AND DETECT ISSUES IN A DISTRIBUTED SYSTEM
  • 25.
  • 26.
    RESULT OF LAB Inthis lab you learned: ● How to install Istio onto OpenShift Container Platform ● How to deploy apps with sidecar proxies ● How to generate and visualize deep metrics for apps ● How to alter routing dynamically ● How to inject faults for testing ● How to do rate limiting ● How Istio implements circuit breaking and distributed tracing ● Use cases for service mesh
  • 27.
    MICROSERVICES 4.0? Service Microservice Function f() > Single Purpose > Stateless > Independently Scalable > Automated > Single Action > Event-sourced > Ephemeral > Autonomous > Loosely-coupled
  • 28.
    SERVERLESS PROJECTS /SERVICES 28 http://funcatron.org CLOUD FUNCTIONS BETA serverless-docker
  • 29.

Editor's Notes

  • #12 entire suites of frameworks were built to help developers address these resilience concerns (e.g. netflix oss)
  • #13 entire suites of frameworks were built to help developers address these resilience concerns (e.g. netflix oss)
  • #14 entire suites of frameworks so for every language/framework combination, you need... service discovery retries timeouts load balancing bulk heading circuit breaking rate limiting built to help developers address these resilience concerns (e.g. netflix oss) adaptive routing deadlines back pressure outlier detection health checking traffic shaping request shadowing edge/dmz routing surgical / fine / per-request routing A/B testing rollout dark launches fault injection stats, metric collection observability
  • #15 entire suites of frameworks so for every language/framework combination, you need... service discovery retries timeouts load balancing bulk heading circuit breaking rate limiting built to help developers address these resilience concerns (e.g. netflix oss) adaptive routing deadlines back pressure outlier detection health checking traffic shaping request shadowing edge/dmz routing surgical / fine / per-request routing A/B testing rollout dark launches fault injection stats, metric collection observability
  • #18 Earlier this year Google, IBM and Lyft announced the Istio project, which aims to make it easier to develop and connect AND manage our complex and distributed microservices applications. First generation microservices were mainly A DIY effort - you had to do a lot of defensive programming in the app itself. Istio basically delivers on the “microservices 2.0” idea of minimizing requirements on developers for dealing with the distributed nature of their apps. In this diagram from Christian Posta, chief architect for cloud app dev at red hat, you can roughly see how this translates to apps - it pushes the real magic behind distributed apps like routing, rate limiting or circuit breaking into lower networking layers, out of reach and out of control of app developers. It also means that the service mesh benefits all applications running on it, regardless of programming language and communication protocol - think databases or IoT binary streaming apps.
  • #19 To give you an idea of what this looks like, here’s a rough diagram of the components at play. Istio creates a cross-cutting platform-level service mesh to address common microservices architecture concerns, and there are a lot of them: communication, load balancing, traffic routing, metrics, quotas, authentication, rate limiting, circuit breakers, timeouts, automatic retries, and on and on.. Things that developers and operations have to deal with today. It does this by injecting we are called side car proxies for each service, acting as a frontend to the service and managing traffic to it according to policy. As services come and go, their presence, absence, or general health are tracked by The control plane components and traffic is shaped accordingly. Red Hat customers and the greater OpenShift and Kubernetes communities will benefit from this platform level support for microservice architectures, so stay tuned as we work to bring a developer preview of this technology by Red Hat Summit in May and then later on in the year fully integrate it into OpenShift and the RHOAR getting started experience.
  • #20 To give you an idea of what this looks like, here’s a rough diagram of the components at play. Istio creates a cross-cutting platform-level service mesh to address common microservices architecture concerns, and there are a lot of them: communication, load balancing, traffic routing, metrics, quotas, authentication, rate limiting, circuit breakers, timeouts, automatic retries, and on and on.. Things that developers and operations have to deal with today. It does this by injecting we are called side car proxies for each service, acting as a frontend to the service and managing traffic to it according to policy. As services come and go, their presence, absence, or general health are tracked by The control plane components and traffic is shaped accordingly. Red Hat customers and the greater OpenShift and Kubernetes communities will benefit from this platform level support for microservice architectures, so stay tuned as we work to bring a developer preview of this technology by Red Hat Summit in May and then later on in the year fully integrate it into OpenShift and the RHOAR getting started experience.
  • #23 To give you an idea of what this looks like, here’s a rough diagram of the components at play. Istio creates a cross-cutting platform-level service mesh to address common microservices architecture concerns, and there are a lot of them: communication, load balancing, traffic routing, metrics, quotas, authentication, rate limiting, circuit breakers, timeouts, automatic retries, and on and on.. Things that developers and operations have to deal with today. It does this by injecting we are called side car proxies for each service, acting as a frontend to the service and managing traffic to it according to policy. As services come and go, their presence, absence, or general health are tracked by The control plane components and traffic is shaped accordingly. Red Hat customers and the greater OpenShift and Kubernetes communities will benefit from this platform level support for microservice architectures, so stay tuned as we work to bring a developer preview of this technology by Red Hat Summit in May and then later on in the year fully integrate it into OpenShift and the RHOAR getting started experience.
  • #24 To give you an idea of what this looks like, here’s a rough diagram of the components at play. Istio creates a cross-cutting platform-level service mesh to address common microservices architecture concerns, and there are a lot of them: communication, load balancing, traffic routing, metrics, quotas, authentication, rate limiting, circuit breakers, timeouts, automatic retries, and on and on.. Things that developers and operations have to deal with today. It does this by injecting we are called side car proxies for each service, acting as a frontend to the service and managing traffic to it according to policy. As services come and go, their presence, absence, or general health are tracked by The control plane components and traffic is shaped accordingly. Red Hat customers and the greater OpenShift and Kubernetes communities will benefit from this platform level support for microservice architectures, so stay tuned as we work to bring a developer preview of this technology by Red Hat Summit in May and then later on in the year fully integrate it into OpenShift and the RHOAR getting started experience.