Next Level Cloud Development with Service...

54
1 Next Level Cloud Development with Service Mesh HVOpen January 2020 Patrick Ladd – [email protected] Technical Account Manager Red Hat

Transcript of Next Level Cloud Development with Service...

Page 1: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

1

Next Level Cloud Development with Service MeshHVOpen January 2020

Patrick Ladd – [email protected] Account ManagerRed Hat

Page 2: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

2

QUICK TIPTry right clicking on the photo and using “Replace” to insert your own photo. You are also welcome to use this photo.

A mash-up of several better-known technologies: “A service mesh is

a set of software components which act as the “glue” for a set of

independent applications. The goal of the mesh is to guarantee

secure communications between each application and be able to

redirect traffic in the event of failures. Often the features of a

service mesh look like a mash-up between a load balancer, a web

application firewall, and an API gateway.”

- Brian “Redbeard” Harrington, Product Manager at Red Hat

Page 3: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

3

BUILD AND DEPLOY CLOUD-NATIVE APPS WITH RED HAT OPENSHIFT

Service

CONTAINER

Service

CONTAINER

Service

CONTAINER

ANYINFRASTRUCTURE

OpenShift Container Platform(Enterprise Kubernetes)

Amazon Web Services Microsoft Azure Google CloudOpenStackDatacenterLaptop

ANYAPPLICATION

Service

CONTAINER

Service

CONTAINER

Service Discovery

Config Mgmt

Build Automation

Deploy Automation

Monitoring

Log Mgmt

Security

CI/CD Pipelines

Page 4: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

OVERVIEW

Page 5: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

5

WHAT IS A SERVICE MESH ?

NETWORK

Circuit Breaker

Discovery

Tracing

Circuit Breaker

Discovery

Tracing

Service A Service B

ProxyProxy

Machine A (Monolith)

Machine B

Page 6: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

6

SERVICE MESH ECOSYSTEM

Observe Observe

Secure

ControlConnect

Jaeger

Kiali Grafana

Prometheus

Istio

Page 7: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

7

DISTRIBUTED SERVICES WITHRED HAT OPENSHIFT SERVICE MESH

INFRA

INFRA OPS

SERVICE OPS

SERVICE

ANYINFRASTRUCTURE

OpenShift Container Platform(Enterprise Kubernetes)

Amazon Web Services Microsoft Azure Google CloudOpenStackDatacenterLaptop

OpenShift Service Mesh(Istio + Jaeger + Kiali)

ANYAPPLICATION

Service

CONTAINER

Service

CONTAINER

Service

CONTAINER

Service

CONTAINER

Service

CONTAINER

Page 8: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

UNDER THE HOOD

Page 9: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

MICROSERVICES ARCHITECTURE

Runtime

Service

Runtime

Service

Runtime

Service

Runtime

Service

Runtime

Service

Runtime

Service

Runtime

Service

Application Server

HTML Javascript Web

ServiceServiceService

Service Service Service

Data Access

Runtime

Service

Runtime

Service

Page 10: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

MICROSERVICES ARCHITECTURE

Runtime

Service

Runtime

Service

Runtime

Service

Runtime

Service

Runtime

Service

Runtime

Service

Runtime

Service

Application Server

HTML Javascript Web

ServiceServiceService

Service Service Service

Data Access

DISTRIBUTED

Runtime

Service

Runtime

Service

Page 11: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

DISTRIBUTED ARCHITECTURE

Service ServiceService

Service ServiceService

Service ServiceService

Page 13: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

DEPLOYMENT

ServiceContainer

INFRASTRUCTURE

ServiceContainer

ServiceContainer

Page 14: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

CONFIGURATION

Spring CloudConfig Server

Service

Config

Service

Config

Service

Config

INFRASTRUCTURE

Page 15: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

SERVICE DISCOVERY

Service

Spring CloudConfig Server Netflix Eureka

Netflix RibbonConfig

Service

Config

Service

Config

Svc Discovery Svc Discovery Svc Discovery

INFRASTRUCTURE

Page 16: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

DYNAMIC ROUTING

Spring CloudConfig Server

Service

Netflix EurekaNetflix Ribbon

Config

Service

Config

Service

Config

Svc Discovery Svc Discovery Svc Discovery

Routing Routing Routing

Netflix ZuulServer

INFRASTRUCTURE

Page 17: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

FAULT TOLERANCE

Spring CloudConfig Server

Service

Netflix EurekaNetflix Ribbon

Config

Service

Config

Service

Config

Svc Discovery Svc Discovery Svc Discovery

Routing Routing Routing

Netflix ZuulServer

Circuit Breaker Circuit Breaker Circuit Breaker

INFRASTRUCTURE

Page 18: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

TRACING AND VISIBILITY

Spring CloudConfig Server

Service

Netflix EurekaNetflix Ribbon

Config

Service

Config

Service

Config

Svc Discovery Svc Discovery Svc Discovery

Routing Routing Routing

Netflix ZuulServer

Circuit Breaker Circuit Breaker Circuit Breaker

Tracing Tracing Tracing

ZipKin Server

INFRASTRUCTURE

Page 19: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

WHAT ABOUT…?

POLYGLOT APPS

EXISTING APPS

Page 20: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

THERE SHOULD BE A BETTER WAY

Page 21: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

ADDRESS THE COMPLEXITY IN THE INFRASTRUCTURE

Page 22: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

SERVICE MESHA dedicated infrastructure layer for service-to-service

communications

Photo on Visual Hunt

Page 23: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

MICROSERVICES EVOLUTION

Service

Config

Svc Discovery

Routing

Circuit Breaker

Tracing

Service

Platform Container Platform (+ Service Mesh)

...2014 2018

Page 24: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

POD

SERVICECONTAINER

POD

SERVICECONTAINER

POD

SERVICECONTAINER

KUBERNETES

AUTOMATING CONTAINER DEPLOYMENT

INFRASTRUCTURE

Page 25: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

● Two or more containers deployed to same pod● Share

○ Same■ Namespace■ Pod IP

○ Shared lifecycle● Used to enhance the co-located containers● Istio Proxy (L7 Proxy)

○ Proxy all network traffic in and out of the app container

Source: http://blog.kubernetes.io/2015/06/the-distributed-system-toolkit-patterns.html

SIDECARS

POD

SERVICE A

Istio Proxy

Page 26: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

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

JaegerControl Plane

Data Plane

Page 27: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

MAJOR FUNCTIONALITY

Page 28: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

FAULT TOLERANCE

Page 29: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

SERVICEA

SERVICEB

CIRCUIT BREAKERS WITHOUT ISTIO

SERVICECCB CB

coupled to the service code

Page 30: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB

ENVOY

POD

SERVICEC

ENVOY

CIRCUIT BREAKERS WITH ISTIO

transparent to the services

Page 31: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB

ENVOY

POD

SERVICEC

ENVOY

CIRCUIT BREAKERS WITH ISTIO

improved response time with global circuit status

Page 32: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB

ENVOY

POD

SERVICEC

ENVOY

TIMEOUTS AND RETRIES WITH ISTIO

configure timeouts and retries, transparent to the services

timeout: 10 secretry: 5

timeout: 15 secretry: 5

Page 33: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB

ENVOY

POD

SERVICEC

ENVOY

RATE LIMITING WITH ISTIO

limit invocation rates, transparent to the services

max 500 concurrent reqs

max 100 connections

Page 34: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

SERVICE SECURITY

Page 35: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

SERVICEA

SERVICEB

SECURE COMMUNICATION WITHOUT ISTIO

SERVICECTLS TLS TLS TLS

coupled to the service code

Page 36: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

SECURE COMMUNICATION WITH ISTIO

POD

SERVICEA

ENVOY

POD

SERVICEB

ENVOY

POD

SERVICEC

ENVOY

mutual TLS authentication, transparent to the services

TLS TLS

Page 37: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB

ENVOY

POD

SERVICEC

ENVOY

CONTROL SERVICE ACCESS WITH ISTIO

control the service access flow, transparent to the services

Page 38: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

CHAOS ENGINEERING

Page 39: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

CHAOS ENGINEERING WITHOUT ISTIO

SERVICEA

SERVICEB

SERVICEC

Netflix Chaos Monkeys

Netflix Spinnaker

randomtermination

Page 40: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB

ENVOY

POD

SERVICEC

ENVOY

CHAOS ENGINEERING WITH ISTIO

inject delays, transparent to the services

10 sec delay in 10% of requests

Page 41: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

inject protocol-specific errors, transparent to the services

POD

SERVICEA

ENVOY

POD

SERVICEB

ENVOY

POD

SERVICEC

ENVOY

CHAOS ENGINEERING WITH ISTIO

HTTP 400in 5% of requests

Page 42: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

DYNAMIC ROUTING

Page 43: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

GatewayServiceSERVICE

A

SERVICEB:1

DYNAMIC ROUTING WITHOUT ISTIO

SERVICEB:2

Netflix ZuulServer

custom code to enable dynamic routing

Page 44: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB:v2

ENVOY

CANARY DEPLOYMENT WITH ISTIO

POD

SERVICEB:v1

ENVOY

boston employee

everyone

Page 45: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB:v2

ENVOY

A/B DEPLOYMENT WITH ISTIO

POD

SERVICEB:v1

ENVOY

50% traffic

50% traffic

Page 46: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB:v2

ENVOY

DARK LAUNCHES WITH ISTIO

POD

SERVICEB:v1

ENVOY

100% traffic

mirror traffic

Page 47: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

DISTRIBUTED TRACING(JAEGER)

Page 48: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

SERVICEA

SERVICEB

SERVICEC

DISTRIBUTED TRACING WITHOUT ISTIO

Spring SleuthZipKin

Spring SleuthZipKin

Spring SleuthZipKin

code to enable dynamic tracing

Page 49: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB

ENVOY

POD

SERVICEC

ENVOY

DISTRIBUTED TRACING WITH ISTIO & JAEGER

discovers service relationships and process times, transparent to the services

SERVICE A SERVICE B SERVICE C210 ms 720 ms

930 ms

Page 50: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

SERVICE MESH OBSERVABILITY(KIALI)

Page 51: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

Page 52: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

@redhat

DISTRIBUTED SERVICES PLATFORM

ANYINFRASTRUCTURE

OpenShift Container Platform(Enterprise Kubernetes)

Amazon Web Services Microsoft Azure Google CloudOpenStackDatacenterLaptop

OpenShift Service Mesh(Istio + Jaeger + Kiali)

ANYAPPLICATION

Service

CONTAINER

Service

CONTAINER

Service

CONTAINER

Service

CONTAINER

Service

CONTAINER

Page 53: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

53

References

How to explain service mesh in plain Englishhttps://enterprisersproject.com/article/2019/6/service-mesh-plain-english

OpenShift Commons 2019https://blog.openshift.com/wp-content/uploads/State-of-the-Platform-Services-Integrated-1.pdf QUICK TIP

Try right clicking on the icon and using “Replace” to insert your own icons.

Page 54: Next Level Cloud Development with Service Meshpeople.redhat.com/pladd/Service_Mesh_HVOpen_2020-01.pdf · Spinnaker random termination. @redhat POD SERVICE A ENVOY POD SERVICE B ENVOY

linkedin.com/company/red-hat

youtube.com/user/RedHatVideos

facebook.com/redhatinc

twitter.com/RedHat

54

Red Hat is the world’s leading provider of enterprise

open source software solutions. Award-winning

support, training, and consulting services make

Red Hat a trusted adviser to the Fortune 500.

Thank you