Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Fission: Serverless Functions for Kubernetes

358 views

Published on

"Serverless" functions allow users to easily create services from source code without dealing with the packaging, deployment, scaling, etc.

Fission is a serverless function framework built on Kubernetes. Users write functions and map them to HTTP routes. They don't have to deal with container images, registries or even learn Kubernetes in much detail.

Functions can be associated with HTTP routes, events, or timers. Functions consume CPU and memory resources only when running; they are started on-demand and killed when idle. Fission makes on-demand function loading very fast, by keeping an idle pool of containers running, in effect creating a distributed "threadpool".

Fission is useful for:
* Creating web app backends or REST APIs
* Implementing webhooks
* Writing event handlers

We'll demo the creation of a simple web app using Fission functions in Python.

We'll also show how tying together Kubernetes Watches and Fission functions make it very easy to write custom behavior triggered by changes to arbitrary resources on Kubernetes.

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

Fission: Serverless Functions for Kubernetes

  1. 1. Fission: Serverless Functions For Kubernetes Soam Vasani, Platform9 Systems
  2. 2. Serverless, adj.: Using someone else’s Kubernetes cluster. @ggreer on twitter https://twitter.com/ggreer/status/839171195920498688
  3. 3. Containers • Uniform • But also: heavy!
  4. 4. Resource Allocation • Rarely used services still need minimum resource alloc • Cluster capacity as function of deployment size vs. actual usage
  5. 5. What if? • What if we had the power of containers but very light dev workflows? • What if we could have cluster capacity as a proportion of actual service usage?
  6. 6. Functions as a Service • Short-lived stateless “functions” • Source / function / module level • Associated with an Event / HTTP / other trigger; activated on request only • Fast on-demand start (“cold start”)
  7. 7. Fission: FaaS on Kubernetes • Functions • Environments: “Generic” containers • Triggers
  8. 8. Fission: how it works • Pool of “generic” containers for each environment • Functions loaded on demand
  9. 9. Fission: how it works
  10. 10. Fission: how it works
  11. 11. Fission: how it works
  12. 12. Fission: how it works
  13. 13. Fission: how it works
  14. 14. Fission: how it works
  15. 15. Fission: how it works
  16. 16. Fission: how it works
  17. 17. Fission: how it works
  18. 18. Fission: how it works
  19. 19. Use cases • ~Small REST APIs • Web hooks • Kubernetes watch event handlers
  20. 20. Demos
  21. 21. Project Status • Open sourced Nov 2016 • Currently alpha; beta mid-late this year • Healthy community! • 1600 Github stars, 25 contributors, active Slack channel • Go, C#, PHP, Java support; Log aggregation/search, Web UI, many bug fixes
  22. 22. Roadmap • More powerful environments (packages, compile step) • Event queues • Better Kubernetes API & ecosystem integration • Observability: metrics, tracing, … • Kubernetes Volumes support • Secrets, Config maps • Unit testing • Debugging • Autoscaling
  23. 23. Thanks! Github: https://github.com/fission/fission Web: http://fission.io Slack: http://slack.fission.io Twitter: @fissionio @soamv
  24. 24. Roadmap — Environments v2 • Problems with single-file-loaded-at-runtime: • Multiple files, modules etc. • Compiled languages • Syntax errors in interpreted languages • Source and deployment packages; separate storage service • “Build” step — check syntax errors / gather deps / compile
  25. 25. Roadmap — API • Use ThirdPartyResources for state • Version-controllable specs • No extra DB to manage • Label-based route->function mappings (idiomatic Kubernetes) • Ingress • Hide TPRs and YAML files from users (as much as possible)
  26. 26. Roadmap — Ingress integration • Create ingress resources for HTTP triggers (optionally) • Allows fine-grained control over what routes are visible • Allows integrating with richer API gateways (e.g. traefik)

×