Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Michael Behrendt_We code the future together_Co...

Michael Behrendt_We code the future together_Codemotion Berlin 2019

Cloud Native is the modern architecture for the next 20 years of application development. Open Source technologies combined with Cloud have defined a new platform allowing developers to rapidly build and operate high scale applications. We will discuss the key role Kubernetes plays in this platform and the work underway to align 12-factor applications and serverless functions with Kubernetes through the Knative project. We will also talk about service meshes with Istio and how developers need to think differently about continuous delivery, the development process and application architectures.

About:
Michael is a Distinguished Engineer, Serverless / FaaS & IBM Cloud Functions Chief Architect for IBM.

Codemotion

November 12, 2019
Tweet

More Decks by Codemotion

Other Decks in Programming

Transcript

  1. The 20 Year Platform: Why Cloud Native will be relevant

    for you Michael Behrendt IBM Distinguished Engineer Chief Architect Serverless & IBM Cloud Functions 12-13 November, 2019
  2. 3 In every era, there is a dominant application architecture

    That architecture is usually supported by a platform The goal of the platform is to allow developers to focus on core application logic, instead of all the mechanics of running software I believe today we are seeing the emergence of the next dominant platform… The next 20 year platform
  3. Lets go back 20 years… 4 Circa 2000: n-tier Applications

    Monolithic Application Relational Database
  4. The weaknesses of n-tier started to show… 5 Circa 2000:

    n-tier Applications Monolithic Application Relational Database Circa 2005: Service Oriented
  5. Leading us, with the emergence of Cloud, to Microservices… 6

    Circa 2000: n-tier Applications Monolithic Application Relational Database Circa 2005: Service Oriented Circa Now: Microservice
  6. In every era there has been a platform… 7 Circa

    2000: n-tier Applications Monolithic Application Relational Database Circa 2005: Service Oriented Circa Now: Microservice
  7. Application Servers were the n-tier platform 8 Circa 2000: n-tier

    Applications Monolithic Application Relational Database Usually based on a single language – Driven by monolithic architecture Heavily opinionated application frameworks – JavaEE App Servers provided core horizontal functions – Scale, Availability, Security, Observability, Management, Deployment, Lifecycle, Development Tools, etc
  8. The Microservices Platform? 9 Designed for and Enabled By Cloud

    Multi-language – Driven by independent teams and desire to use the best tech for the job Minimal Application Frameworks – Solve most horizontal problems outside the core application logic Platform still must provide core functions – Scale, Availability, Security, Observability, Management, Deployment, Lifecycle, Development Tools Circa Now: Microservice
  9. The Microservices Unified Platform 10 Containers (Full K8s) Kubernetes (Container

    orchestration and resource management) containerD / CRI-O (Container runtime)
  10. Kubernetes Intelligent Scheduling Self-healing Horizontal scaling Service discovery & load

    balancing Automated rollouts and rollbacks Secret and configuration management Plus it is Polyglot and has no required application framework!
  11. 13 Challenges with Microservices • Security • Canary deployments •

    A/B testing • Retries and Circuit breaking • Rate limiting • Fault injection • Policy management • Telemetry
  12. 14 What is a ‘Service Mesh’ ? A network for

    services, not bytes – Observability – Resiliency – Traffic Control – Security – Policy Enforcement
  13. Think 2019 / DOC ID / Month XX, 2019 /

    © 2019 IBM Corporation 15
  14. UI Order container pod How does it work? 16 Without

    Istio: • when service A (UI) talks to service B (Orders), it can use the local kube dns to find and talk to it directly. • If there are multiple instances of the Order, it uses standard round robin.
  15. UI Order Policy container pod container check policies Request Interception

    17 Istio deploys a proxy, using a sidecar pattern, that sits next to each of the services • Service A -> Service B Client side a) Locally. envoy traps the requests, using IP Tables b) Envoy looks at that request, figures where we're going and then makes a client-side decision on where it is going to send that request c) Envoy will find the destination B host and send the request Server Side a) Checks policies in Mixer-Policy that this call is allowed, and responds to the B service request
  16. 18 Isn’t Kubernetes Complex? I just want to push some

    code… What about Serverless and Event-Oriented Applications?
  17. Introducing Knative • An opinionated and simplified view of application

    management • Heavily influenced by Serverless • Allowing developers to focus on coding • New Kubernetes extension resources (CRDs) 19
  18. Knative Sub Projects 2 Main Components • Serving is the

    runtime component • Host your application as K8s pods • Eventing contains tools for managing events • Between loosely coupled services 20
  19. KnServing - Services • Deploy app as pod/revision • Revision

    specific config • E.g. image, env vars, scale • Networking auto-setup • Revisions are scaled up/down • Based on load • Even down to zero • Updates create Revisions • Auto-migration to new • Traffic splitting based on % • Dedicated URLs to Revisions Kn Service Revision 1 Revision 1 Revision 1 Config Endpoint 90% 10% User Tag Tester Revision 1 Revision 1 Revision 1 Revision 1 Revision 2 Config Revision 3 Config Endpoint And Knative manages all of these resources for you! 21
  20. KnServices - Things to know • Container Images MUST run

    HTTP servers • Multi-threaded model - but configurable • Configuration options - for example: • Container Concurrency • Min / Max / Target Scale • Scaling: requests vs cpu • Simplified resource model • "Almost" the K8s pod spec apiVersion: serving.knative.dev/v1beta1 kind: Service metadata: name: echo spec: template: spec: containers: - image: duglin/echo 22
  21. The Microservices Unified Platform 23 Containers (Full K8s) Services &

    Functions Apps (12 factor) Knative (Serving, Eventing, Build Pipelines) Istio (Service Mesh) Kubernetes (Container orchestration and resource management) containerD / CRI-O (Container runtime)