Kubernetes and serverless technologies for high-performance applications Michael Hausenblas, Developer Advocate at Red Hat 2018-11-06, OpenADx workshop, Stuttgart
Hit me up on Twitter: @mhausenblas 4 Some terminology … boringis.cool/#lets-talk-about-serverless serverless query BigQuery, Amazon Athena, etc. databases & datastores Redshift, Azure Data Lake, etc. object storage S3, Google Cloud Storage, etc. Function-as-a-Service (FaaS) AWS Lambda, knative, etc. message queues SQS, Azure Service Bus, etc
Hit me up on Twitter: @mhausenblas 7 Function-as-a-Service concept • event-driven (i.e. needs trigger) • short-running (practically minutes) • stateless (externalize state/integrations) • cold start characteristics very important
Hit me up on Twitter: @mhausenblas 10 Use case examples • Migration of an email marketing tool for small business • Continuous Deployments • A ticketing system • The iRobots IoT service • Replacing cron jobs with AWS Lambda • Fetching nearby Pokemon Go data • Teletext.io • Calculating lineups for a fantasy game
Hit me up on Twitter: @mhausenblas 16 FaaS on Kubernetes landscape project backed by claim to fame started in Apache OpenWhisk ASF, Adobe, IBM, Red Hat large community, mature 2015 Azure Functions Runtime Microsoft ease of use late 2017 Dispatch VMware meta-framework late 2017 Fission Platform9 performance 2016 Fn Oracle supported languages/envs late 2017 Funktion Red Hat/Fabric8 integration 2017 Kubeless Bitnami UX, monitoring 2017 Nuclio iguazio performance mid 2017 OpenFaaS VMware large community, UX late 2016 Project Riff Pivotal event-centric late 2017
Hit me up on Twitter: @mhausenblas 17 Kubernetes kubernetes.io • Container lifecycle management • Declarative API + control loops • Robust, flexible, scalable • Extensible through plug-ins and custom resources/controllers Kudos to Lucas Käldström for this figure (source)
Hit me up on Twitter: @mhausenblas 18 • Extension to Kubernetes • Provides low-level building blocks: • knative/build: pluggable model for building artifacts from source code • knative/serving: event-driven compute model for serving containers • knative/eventing: universal subscription, delivery and management of events (triggers) Knative Kubernetes service mesh & operators Knative FaaS Kubeless, OpenWhisk, OpenFaaS, Azure Functions, Riff,… github.com/knative
Hit me up on Twitter: @mhausenblas 19 • CloudEvents (specification by the CNCF Serverless Working Group) • TriggerMesh (lifecycle management) • Gloo (function gateway) Other ecosystem components
Hit me up on Twitter: @mhausenblas 25 Distributed tracing and debugging • Roots: need to overcome limitations of “time-synced logs” • Specifications: OpenCensus and OpenTracing • Tooling: Zipkin, Jaeger, Stackdriver • A must-have in a microservices and/or FaaS setup
Hit me up on Twitter: @mhausenblas 28 Does non-public cloud FaaS make sense? Most of production deployments currently using proprietary (public cloud) offerings: • New Relic survey 11/2017 • TNS blog post 12/2017
Hit me up on Twitter: @mhausenblas 32 Handling many functions • A handful of functions? No problem • Breaking up a monolith into 200 functions? Hmmm … • So far, a rather under-developed space (e.g. ibm-functions/composer, TriggerMesh)
Hit me up on Twitter: @mhausenblas 33 • Platform-level • Kubernetes • public cloud providers • on-premises • Framework level (leaks, authn/authz) • DoS attacks • Integrations/data leaks Security considerations
Hit me up on Twitter: @mhausenblas 34 • Function-as-a-Service (FaaS) gives you • high development velocity • auto-scaling • pay-what-you-use • One tool in the toolbox, not a silver bullet (know your use cases) • Tradeoffs: convenience (lock-in) vs. control (effort) • Consider Function-as-a-Service as the “VBA of cloud native computing”? Summing up
Hit me up on Twitter: @mhausenblas 36 • The CNCF takes steps toward serverless computing • CNCF Serverless Working Group • FaaS on Kubernetes inventory • The State of OpenWhisk • Knative: Serving your Serverless Services • Many-faced threats to Serverless security