hands on with service mesh...2 quick tip try right clicking on the photo and using “replace” to...

58
1 Hands on with Service Mesh NYRHUG December 2019 Patrick Ladd Technical Account Manager

Upload: others

Post on 28-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hands on with Service Mesh...2 QUICK TIP Try 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

1

Hands on withService MeshNYRHUG December 2019

Patrick LaddTechnical Account Manager

Page 2: Hands on with Service Mesh...2 QUICK TIP Try 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

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: Hands on with Service Mesh...2 QUICK TIP Try 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

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: Hands on with Service Mesh...2 QUICK TIP Try 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

4

OUR SECURITY TEAM SAYS WE HAVE TO INTRODUCE _________Security needs can change quickly. Many times this can require near-constant research to stay on top of the latest trends.

I’VE NEVER RUN A PRODUCTION FACING SERVICE DIRECTLYIf one has never “carried the pager” for a production service, it can be challenging to foresee the needs to of those who do.

DID THIS CODE CHANGE FIX MY PERFORMANCE ISSUE?It can be challenging to ensure that bugs are actually squashed. We need better ways of measuring changes to applications, ideally in a deterministic manner.

DEVELOPMENT PAIN POINTSClick to add subtitle

Page 5: Hands on with Service Mesh...2 QUICK TIP Try 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

5

IF I CAN’T SSH INTO THE HOST, I CAN’T DEBUG ITUsers have conflated how they achieve certain goals with the goal itself. There are bad behaviors which we must solve in other ways.

AUDITING OF EXISTING RESOURCES CAN BE CHALLENGINGDo you know which services are safe to shut off, or how they are connected?

WHERE ARE THE LOGS FOR THE APPLICATION?As monoliths are broken into microservices there are many more places to search for logs. As these are scheduled across hosts as containers, this challenge grows exponentially.

MANAGEMENT PAIN POINTSClick to add subtitle

Page 6: Hands on with Service Mesh...2 QUICK TIP Try 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

6

I DON’T UNDERSTAND ALL OF THESE APPLICATION COMPONENTSGabriel Monroy (Founder of Deis, former CTO of Engine Yard) summarized it well “DevOps means developers writing Puppet manifests and SysAdmins sitting through architecture meetings for software they will never understand.”

“WHY DON’T YOU JUST ______________?”Often, the needs of each side are hard to understand. Developers may not see the importance of on-the-fly reconfiguration while SREs may not fully appreciate the need for application level tracing in a constellation of microservices.

I NEED TO CHANGE HOW TRAFFIC IS FLOWINGThere are times when the easiest solution to a temporary problem is to redirect users and their traffic. If these features have not been built into an application it can be challenging (if not impossible) for operations to achieve this.

MANAGEMENT PAIN POINTSClick to add subtitle

Page 7: Hands on with Service Mesh...2 QUICK TIP Try 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

7

THERE IS NO REASON XXX SHOULD BE ABLE TO HIT YYYWithout the sufficient runbooks, understanding the flow of an application can be obtuse. Without understanding the flow, mitigating emerging security threats can be impossible.

IF I ROTATE THE CERTIFICATES* WILL THE APPLICATION BREAK?Fear often drives the decisions of SysAdmins. Without the ability to test the outcome of changes, they will default to the most safe process.

I NEED TO TEST THIS NEW VERSION BEFORE DEPLOYING ITA lack of real-time testing of software will lead to limited windows during which software can be deployed. Failures in this process lead to more draconian measures like ITIL.

DEPLOYMENT PAIN POINTSClick to add subtitle

Page 8: Hands on with Service Mesh...2 QUICK TIP Try 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

OVERVIEW

Page 9: Hands on with Service Mesh...2 QUICK TIP Try 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

9

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 10: Hands on with Service Mesh...2 QUICK TIP Try 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

10

SERVICE MESH ECOSYSTEM

Observe Observe

Secure

ControlConnect

Jaeger

Kiali Grafana

Prometheus

Istio

Page 11: Hands on with Service Mesh...2 QUICK TIP Try 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

11

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 12: Hands on with Service Mesh...2 QUICK TIP Try 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

UNDER THE HOOD

Page 13: Hands on with Service Mesh...2 QUICK TIP Try 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

@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 14: Hands on with Service Mesh...2 QUICK TIP Try 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

@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 15: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

DISTRIBUTED ARCHITECTURE

Service ServiceService

Service ServiceService

Service ServiceService

Page 17: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

DEPLOYMENT

ServiceContainer

INFRASTRUCTURE

ServiceContainer

ServiceContainer

Page 18: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

CONFIGURATION

Spring CloudConfig Server

Service

Config

Service

Config

Service

Config

INFRASTRUCTURE

Page 19: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

SERVICE DISCOVERY

Service

Spring CloudConfig Server Netflix Eureka

Netflix RibbonConfig

Service

Config

Service

Config

Svc Discovery Svc Discovery Svc Discovery

INFRASTRUCTURE

Page 20: Hands on with Service Mesh...2 QUICK TIP Try 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

@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 21: Hands on with Service Mesh...2 QUICK TIP Try 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

@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 22: Hands on with Service Mesh...2 QUICK TIP Try 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

@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 23: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

WHAT ABOUT…?

POLYGLOT APPS

EXISTING APPS

Page 24: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

THERE SHOULD BE A BETTER WAY

Page 25: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

ADDRESS THE COMPLEXITY IN THE INFRASTRUCTURE

Page 26: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

SERVICE MESHA dedicated infrastructure layer for service-to-service

communications

Photo on Visual Hunt

Page 27: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

MICROSERVICES EVOLUTION

Service

Config

Svc Discovery

Routing

Circuit Breaker

Tracing

Service

Platform Container Platform (+ Service Mesh)

...2014 2018

Page 28: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

POD

SERVICECONTAINER

POD

SERVICECONTAINER

POD

SERVICECONTAINER

KUBERNETES

AUTOMATING CONTAINER DEPLOYMENT

INFRASTRUCTURE

Page 29: Hands on with Service Mesh...2 QUICK TIP Try 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

@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 30: Hands on with Service Mesh...2 QUICK TIP Try 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

@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 31: Hands on with Service Mesh...2 QUICK TIP Try 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

MAJOR FUNCTIONALITY

Page 32: Hands on with Service Mesh...2 QUICK TIP Try 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

FAULT TOLERANCE

Page 33: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

SERVICEA

SERVICEB

CIRCUIT BREAKERS WITHOUT ISTIO

SERVICECCB CB

coupled to the service code

Page 34: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB

ENVOY

POD

SERVICEC

ENVOY

CIRCUIT BREAKERS WITH ISTIO

transparent to the services

Page 35: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB

ENVOY

POD

SERVICEC

ENVOY

CIRCUIT BREAKERS WITH ISTIO

improved response time with global circuit status

Page 36: Hands on with Service Mesh...2 QUICK TIP Try 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

@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 37: Hands on with Service Mesh...2 QUICK TIP Try 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

@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 38: Hands on with Service Mesh...2 QUICK TIP Try 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

SERVICE SECURITY

Page 39: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

SERVICEA

SERVICEB

SECURE COMMUNICATION WITHOUT ISTIO

SERVICECTLS TLS TLS TLS

coupled to the service code

Page 40: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

SECURE COMMUNICATION WITH ISTIO

POD

SERVICEA

ENVOY

POD

SERVICEB

ENVOY

POD

SERVICEC

ENVOY

mutual TLS authentication, transparent to the services

TLS TLS

Page 41: Hands on with Service Mesh...2 QUICK TIP Try 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

@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 42: Hands on with Service Mesh...2 QUICK TIP Try 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

CHAOS ENGINEERING

Page 43: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

CHAOS ENGINEERING WITHOUT ISTIO

SERVICEA

SERVICEB

SERVICEC

Netflix Chaos Monkeys

Netflix Spinnaker

randomtermination

Page 44: Hands on with Service Mesh...2 QUICK TIP Try 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

@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 45: Hands on with Service Mesh...2 QUICK TIP Try 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

@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 46: Hands on with Service Mesh...2 QUICK TIP Try 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

DYNAMIC ROUTING

Page 47: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

GatewayServiceSERVICE

A

SERVICEB:1

DYNAMIC ROUTING WITHOUT ISTIO

SERVICEB:2

Netflix ZuulServer

custom code to enable dynamic routing

Page 48: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB:v2

ENVOY

CANARY DEPLOYMENT WITH ISTIO

POD

SERVICEB:v1

ENVOY

boston employee

everyone

Page 49: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB:v2

ENVOY

A/B DEPLOYMENT WITH ISTIO

POD

SERVICEB:v1

ENVOY

50% traffic

50% traffic

Page 50: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

POD

SERVICEA

ENVOY

POD

SERVICEB:v2

ENVOY

DARK LAUNCHES WITH ISTIO

POD

SERVICEB:v1

ENVOY

100% traffic

mirror traffic

Page 51: Hands on with Service Mesh...2 QUICK TIP Try 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

DISTRIBUTED TRACING(JAEGER)

Page 52: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

SERVICEA

SERVICEB

SERVICEC

DISTRIBUTED TRACING WITHOUT ISTIO

Spring SleuthZipKin

Spring SleuthZipKin

Spring SleuthZipKin

code to enable dynamic tracing

Page 53: Hands on with Service Mesh...2 QUICK TIP Try 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

@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 54: Hands on with Service Mesh...2 QUICK TIP Try 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

SERVICE MESH OBSERVABILITY(KIALI)

Page 55: Hands on with Service Mesh...2 QUICK TIP Try 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

@redhat

Page 56: Hands on with Service Mesh...2 QUICK TIP Try 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

@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 57: Hands on with Service Mesh...2 QUICK TIP Try 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

57

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

Service Mesh Documentation (OCP 4.2)Architecture: https://docs.openshift.com/container-platform/4.2/service_mesh/service_mesh_arch/understanding-ossm.htmlInstall:https://docs.openshift.com/container-platform/4.2/service_mesh/service_mesh_install/preparing-ossm-installation.htmlDay 2:https://docs.openshift.com/container-platform/4.2/service_mesh/service_mesh_day_two/prepare-to-deploy-applications-ossm.html

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

Page 58: Hands on with Service Mesh...2 QUICK TIP Try 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

linkedin.com/company/red-hat

youtube.com/user/RedHatVideos

facebook.com/redhatinc

twitter.com/RedHat

58

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