Service Mesh with Istio on Kubernetes. Dmitry Burlea Software FlixCharter

Similar documents
Managing your microservices with Kubernetes and Istio. Craig Box

A Comparision of Service Mesh Options

Istio. A modern service mesh. Louis Ryan Principal

The Road to Istio: How IBM, Google and Lyft Joined Forces to Simplify Microservices

Microservices Implementations not only with Java. Eberhard Wolff Fellow

Easily Secure your Microservices with Keycloak. Sébastien Blanc Red

Four times Microservices: REST, Kubernetes, UI Integration, Async. Eberhard Fellow

ISTIO 1.0 INTRODUCTION & OVERVIEW OpenShift Commons Briefing Brian redbeard Harrington Product Manager, Istio

MSB to Support for Carrier Grade ONAP Microservice Architecture. Huabing Zhao, PTL of MSB Project, ZTE

& the architecture along the way!

Istio s Mixer: Policy Enforcement with Custom Adapters Limin Wang, Software Engineer, Google Torin Sandall, Software Engineer, Styra

Enabling Multi-Cloud with Istio Stretching an Istio service mesh between Public & Private Clouds. John Joyce Robert Li

Service Mesh and Related Microservice Technologies in ONAP

Microservices mit Java, Spring Boot & Spring Cloud. Eberhard Wolff

SQUASH. Debugger for microservices. Idit Levine solo.io

Cloud I - Introduction

Deployment Strategies on Kubernetes. By Etienne Tremel Software engineer at Container February 13th, 2017

What is Spring Cloud

Handling Microservices with Kubernetes - Basic Info

NGINX: From North/South to East/West

SERVERLESS APL. For now this is just research in Cloud technologies in SimCorp A/S.

Service Mesh and Microservices Networking

JFOKUS 2017 EXPERIENCES FROM USING DISCOVERY SERVICES IN A MICROSERVICE LANDSCAPE

ENHANCE APPLICATION SCALABILITY AND AVAILABILITY WITH NGINX PLUS AND THE DIAMANTI BARE-METAL KUBERNETES PLATFORM

How to Re-Architect without Breaking Stuff (too much) Owen Garrett March 2018

Container-Native Applications

Eclipse MicroProfile: Accelerating the adoption of Java Microservices

Index. Backing services, 52 Ballerina data formats, 214 definition, 208

OPENSHIFT 3.7 and beyond

SPRING CLOUD AGIM EMRULI - MIMACOM

OpenShift Container Platform 3.11

gcp / gke / k8s microservices

BUILDING MICROSERVICES ON AZURE. ~ Vaibhav

EASILY DEPLOY AND SCALE KUBERNETES WITH RANCHER

Kubernetes: Twelve KeyFeatures

Cloud Service Engine. Product Description. Issue 01 Date

Kubernetes introduction. Container orchestration

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

CADEC 2016 MICROSERVICES AND DOCKER CONTAINERS MAGNUS LARSSON

CHALLENGES IN A MICROSERVICES AGE: MONITORING, LOGGING AND TRACING ON OPENSHIFT. Martin Etmajer Technology May 4, 2017

Ingress Kubernetes Tutorial

Building a Kubernetes on Bare-Metal Cluster to Serve Wikipedia. Alexandros Kosiaris Giuseppe Lavagetto

Defining Security for an AWS EKS deployment

Container 2.0. Container: check! But what about persistent data, big data or fast data?!

Open Java EE and Eclipse MicroProfile - A New Java Landscape for Cloud Native Apps

/ Cloud Computing. Recitation 5 September 26 th, 2017

Clover Overview: Gambia release. April 16, 2018

SAMPLE CHAPTER. John Carnell MANNING

Singapore. Service Proxy, Container Networking & K8s. Acknowledgement: Pierre Pfister, Jerome John DiGiglio, Ray

Kubernetes Integration with Virtuozzo Storage

Microservices. Chaos Kontrolle mit Kubernetes. Robert Kubis - Developer Advocate,

Kubernetes. Introduction

Zero to Microservices in 5 minutes using Docker Containers. Mathew Lodge Weaveworks

Cloud Native Java with Kubernetes

Kuber-what?! Learn about Kubernetes

MEAP Edition Manning Early Access Program Istio in Action Version 1

Kubernetes made easy with Docker EE. Patrick van der Bleek Sr. Solutions Engineer NEMEA

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

Microservices at Netflix Scale. First Principles, Tradeoffs, Lessons Learned Ruslan

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Kubernetes Integration Guide

Knative: Building serverless platforms on top of Kubernetes

10 Kube Commandments

Running MarkLogic in Containers (Both Docker and Kubernetes)

Exam : Implementing Microsoft Azure Infrastructure Solutions

OpenShift Dedicated 3 Release Notes

Kuberiter White Paper. Kubernetes. Cloud Provider Comparison Chart. Lawrence Manickam Kuberiter Inc

Wolfram Richter Red Hat. OpenShift Container Netzwerk aus Sicht der Workload

Continuous delivery while migrating to Kubernetes

RECap: RunEscape Capsule for On-demand Managed Service Delivery in the Cloud

/ Cloud Computing. Recitation 5 February 14th, 2017

Using Custom Resources to Provide Cloud Native API Management Frank B Greco Jr, Cloud Native Engineer, Northwestern Mutual

Anti-fragile Cloud Architectures. Agim Emruli - mimacom

Kubernetes 101. Doug Davis, STSM September, 2017

Open Cloud Engine - An Open Source Cloud Native Transformer

Going Reactive. Reactive Microservices based on Vert.x. JavaLand Kristian Kottke

Securing Microservice Interactions in Openstack and Kubernetes

What s New in K8s 1.3

ticrypt DEPLOYMENT OVERVIEW AND TIMELINE Information about hardware, deployment, and on-boarding

Table of Contents. Section 1: Overview 3 NetScaler Summary 3 NetScaler CPX Overview 3

Kubernetes 1.8 and Beyond

Open Cloud Engine - An Open Source Cloud Native Platform

Package your Java Application using Docker and Kubernetes. Arun

Cloud Native Architecture 300. Copyright 2014 Pivotal. All rights reserved.

Przyspiesz tworzenie aplikacji przy pomocy Openshift Container Platform. Jarosław Stakuń Senior Solution Architect/Red Hat CEE

An Introduction to Kubernetes

Hacking and Hardening Kubernetes

A Cloud Gateway - A Large Scale Company s First Line of Defense. Mikey Cohen Manager - Edge Gateway Netflix

grpc - A solution for RPCs by Google Distributed Systems Seminar at Charles University in Prague, Nov 2016 Jan Tattermusch - grpc Software Engineer

Docker Enterprise Edition 2.0 Platform Public Beta Install and Exercises Guide

@unterstein #bedcon. Operating microservices with Apache Mesos and DC/OS

Launching StarlingX. The Journey to Drive Compute to the Edge Pilot Project Supported by the OpenStack

Life of a Packet. KubeCon Europe Michael Rubin TL/TLM in GKE/Kubernetes github.com/matchstick. logo. Google Cloud Platform

Implementing SaaS on Kubernetes

SCALE AND SECURE MOBILE / IOT MQTT TRAFFIC

Stateless Microservice Security via JWT, TomEE and MicroProfile

Microservice Bus Tutorial. Huabing Zhao, PTL of MSB Project, ZTE

Microservices. GCPUG Tokyo Kubernetes Engine

Continuous Integration and Delivery with Spinnaker

Microservices stress-free and without increased heart-attack risk

Transcription:

Service Mesh with Istio on Kubernetes Dmitry Burlea Software Developer @ FlixCharter

Road to Microservices Monolith (all-in-one)

Road to Microservices Images from http://amazon.com/

Road to Microservices Image from http://amazon.com/

Road to Microservices Monolith (all-in-one) Service A Service C Service B Service D

Self Contained Systems / Micro Frontends Backend Team A Team B Team C Database Frontend https://micro-frontends.org/

Microservices Deployment Service A Service B Service C Service D

Microservices Deployment: Containers

Microservice Architecture Challenges Service A Service B Service A Service B Service C Service D Service C Service D

Microservice Architecture Challenges Image from https://imgflip.com/

Microservice Architecture Challenges Image from https://imgflip.com/

Microservice Architecture Challenges Scaling up & down Resiliency Service Discovery Rolling out & back Security

Container Orchestration Tools Docker Swarm

Kubernetes @ FlixTech Image from http://www.handshakestudios.com/

Kubernetes Open-sourced by Google in 2014 Replication Controller Pod Service Communication Channel Container Container Container Container Pod blueprint Pod Pod Pod

Microservice Architecture Challenges Image from https://imgflip.com/

Microservice Architecture Challenges Image from https://imgflip.com/

Microservice Architecture Challenges Observability Resiliency Traffic Management Metrics Distributed Tracing Dependency Visualization Circuit Breaking Health Checks Fault Injection Policy Enforcement Service Identity & Security

Microservice Architecture Challenges Observability Resiliency Traffic Management Policy Enforcement Service Identity & Security

Frameworks response to the challenge: Netflix OSS example Hystrix -

Service Discovery 10.2.3.4:3333 10.2.3.4:3444 Service A Service A Client Service 10.3.4.5:4444 10.3.4.5:4555 Service B Service B 10.4.5.6:5555 10.4.5.6:7777 Service C Service C

Netflix OSS: Service Discovery @EnableEurekaServer @SpringBootApplication public class EurekaServiceApplication { public static void main(string[] args) { SpringApplication.run(EurekaServiceApplication.class, args); } } @EnableDiscoveryClient @SpringBootApplication @RestController public class EurekaClientApplication { @Autowired private DiscoveryClient discoveryclient; } @RequestMapping("/service-instances/{applicationName}") public List<ServiceInstance> serviceinstancesbyapplicationname( @PathVariable String applicationname) { return this.discoveryclient.getinstances(applicationname); }

Circuit Breaking Service A Client Service Service B Service C

Netflix OSS: Circuit Breaking Hystrix @Service public class BookService { private final RestTemplate resttemplate; public BookService (RestTemplate rest) { this.resttemplate = rest; } @HystrixCommand(fallbackMethod = "reliable") public String readinglist() { URI uri = URI.create("http://localhost:8090/recommended"); } return this.resttemplate.getforobject(uri, String.class); public String reliable() { return "Cloud Native Java (O'Reilly)"; } }

Distributed Tracing Service D Service B Service E error Client Service Service F Service C Service G

Distributed Tracing Service D Service B Service E Client Service Service F Service C Service G

Distributed Tracing http://opentracing.io https://gist.github.com/adriancole/3c4b70925b8f87d7c98e369216b916aa

Distributed Tracing Service D Service B No Trace ID No Span ID Trace ID = X Span ID = A Client Service Service E Service F Service C Service G

Distributed Tracing Trace Data Storage / UI Service D Service B No Trace ID No Span ID Trace ID = X Span ID = A Client Service Service E Service F Service C Service G

Distributed Tracing

Frameworks Support Summary Hystrix Hello, me again Custom Vendor Specific Instrumentation None of them are native networking technologies Not flexible

Frameworks Support Summary

Another programming language Let s maybe implement the new service in Go, Kotlin, Ruby, (insert what is missing)???

New microservice in another programming language https://www.entertainmentearth.com/product/ghostbusters-zuul-110-art-scale-statue/ns35325 https://www.dorksidetoys.com/funko-pop-vinyl-exclusive-ghostbusters-zuul-figur-p/fkgb09017z.htm

Network & Business Logic Network related implementation Business logic implementation Service Service Service Service Service Service Service Service Service

Separate Business Logic from Networking Network related implementation Business logic implementation Service

Service Mesh: Sidecar "A sidecar is a one-wheeled device attached to the side of a motorcycle, scooter, or bicycle, producing a three-wheeled vehicle. @Wikipedia Images from https://github.com/newrelic/sidecar, https://www.pinterest.com

Service Mesh: Sidecar Sidecar proxy Service application Sidecar Service

Service Mesh: Sidecar In 2014, we started an initiative to create a replacement architecture that would scale better. The result has proven extremely successful and has been gradually deployed throughout Google, saving in the process millions of dollars a month in ops costs. Google https://istio.io/blog/2017/mixer-spof-myth.html Sidecar Sidecar Sidecar Service A Service B Service C

Service Mesh: Data Plane Sidecar Sidecar Sidecar Sidecar Sidecar Sidecar Data Plane Service A Service A Sidecar Sidecar Service B Service B Sidecar Sidecar Service C Service C Sidecar Sidecar Service D Service D Service E Service E Service F Service F

Service Mesh: Control Plane Control Plane Sidecar Sidecar Sidecar Sidecar Sidecar Sidecar Data Plane Service A Service A Sidecar Sidecar Service B Service B Sidecar Sidecar Service C Service C Sidecar Sidecar Service D Service D Service E Service E Service F Service F

Data Plane Solutions

Service Mesh Platforms

Istio. How has it started? IBM Amalgam8 project Google Service Control Envoy Proxy @ Lyft https://developer.ibm.com/dwblog/2017/istio/

Istio Service Architecture Pilot Mixer Service Discovery Citadel Envoy Proxy Envoy Proxy Envoy Proxy Kubernetes Pod Service A Service B Service C

Envoy L3 (Network) / L4 (Transport) Proxy L7 (Application) Proxy Implemented in C++ 11 Small memory footprint Battle tested @ Lyft 10 000+ VMs ~ 2 000 000 requests / second

Istio Concepts Traffic Management Discovery & Load Balancing Traffic Splitting Traffic Steering Handling Failures Fault Injections Policies and Telemetry Rate limiting Distributing Tracing Collecting Logs & Metrics Generating Service Graph Security Authentication Policy Mutual TLS Authentication Istio RBAC

Istio: Traffic Management Service A Pod 1 Service Pod A2 Service V1 Pod A3 Service V1 B

Istio: Traffic Splitting Pod 1 Service Pod A2 Service V1 Pod A3 Service V1 B V1 Service A Canary Rollout Pod 4 Service B V2

Istio: Traffic Steering Pod 1 Service Pod A2 Service V1 Pod A3 Service V1 B V1 Service A A/B Testing Pod 4 Service B V2

Istio: Traffic Mirroring (Dark Launch) https://launchdarkly.com/blog/why-leading-companies-dark-launch/

Istio: Traffic Mirroring (Dark Launch) Service B V1 Service A Service B V2

Istio DSL A bit of code

Istio Routing API: Traffic Splitting split-95-5.yml apiversion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: split-95-5 spec: hosts: - service-b http: - route: - destination: host: service-b subset: v1 weight: 95 - route: - destination: host: service-b subset: v2 weight: 5 Service A Pod 1 Service Pod 2 AService Pod 3 V1 AService V1 B V1 Pod 4 Service B V2 istioctl create -f split-95-5.yaml

Istio Routing API: Traffic Steering apiversion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: route-rule-chrome-firefox spec: hosts: - service-b http: - match: - headers: user-agent: regex: *.Chrome.* route: - destination: host: service-b subset: v1 - match: - headers: user-agent: regex: *.Firefox.* route: - destination: host: service-b subset: v2 Service A Pod 1 Service Pod 2 AService Pod 3 V1 AService V1 B V1 Pod 4 Service B V2 istioctl create -f split-browser.yaml

Istio Routing API: Traffic Mirroring apiversion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: route-rule-mirror spec: hosts: - service-b http: - route: - destination: host: service-b subset: v1 mirror: host: service-b subset: v2 Service A Service B V1 Service B V2

Istio Resiliency: Http Timeout apiversion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: timeout-rule spec: hosts: - service-a http: - route: - destination: host: service-a subset: v1 timeout: 5s 00:30 istioctl create -f timeout-rule.yaml

Istio Resiliency: Http Retry apiversion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: retry-rule spec: hosts: - service-a http: - route: - destination: host: service-a subset: v1 retries: attempts: 3 pertrytimeout: 2s istioctl create -f retry-rule.yaml

Istio Fault Injection: Http Delay apiversion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: delay-rule spec: hosts: - service-a http: - fault: delay: fixeddelay: 7s percent: 100 match: - headers: cookie: regex: ^(.*?;)?(user=jason)(;.*)?$ route: - destination: host: service-a subset: v2 istioctl create -f delay-rule.yaml

Distributed Tracing Zipkin Backend Zipkin Adapter Stackdriver Adapter Custom Adapter Custom Backend Mixer Envoy Service A Trace Headers: x-request-id x-b3-traceid x-b3-spanid x-b3-parentspanid x-b3-sampled x-b3-flags x-ot-span-context Envoy Service B Trace Headers: x-request-id x-b3-traceid x-b3-spanid x-b3-parentspanid x-b3-sampled x-b3-flags x-ot-span-context Sidecar Service C

Distributed Tracing $ kubectl apply -f install/kubernetes/addons/zipkin.yaml $ kubectl apply -n istio-system -f https://raw.githubusercontent.com/jaeger tracing/jaeger-kubernetes/master/all-inone/jaeger-all-in-one-template.yml

Service Graph Service Graph Add-On $ kubectl apply -f install/kubernetes/addons/servicegraph.yaml https://istio.io/docs/tasks/telemetry/servicegraph

Security: Citadel Peer: Service-to-service mutual TLS Origin: End-user authentication with JWT apiversion: "authentication.istio.io/v1alpha1" kind: "Policy metadata: name: "example-3 spec: targets: - name: httpbin peers: - mtls: origins: - jwt: issuer: $SVC_ACCOUNT jwksuri: $JWKS principalbinding: USE_ORIGIN https://istio.io/docs/concepts/security/mutual-tls/

Why Service Mesh is a good option? Networking

Decouple Networking from Business Logic Networking Business logic

References Istio Docs and Tutorials: https://istio.io/docs/ Workshops: https://github.com/retroryan/istio-workshop https://github.com/redhat-developer-demos/istio-tutorial https://developers.redhat.com/boo ks/introducing-istio-service-meshmicroservices/

Thank you! Do you have any questions? dmitry.burlea@flixbus.com