O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

Serverless framework on kubernetes

Mais Conteúdo rRelacionado

Audiolivros relacionados

Gratuito durante 30 dias do Scribd

Ver tudo

Serverless framework on kubernetes

  1. 1. SERVERLESS FRAMEWORK FOR KUBERNETES Ta-Ching Chen, Fission Contributor
  2. 2. • Ta-Ching Chen (陳大慶) • Software Engineer/Kubernetes Education Consultant • Blog: https://tachingchen.com/tw/ • Email: hello@tachingchen.com HOLA!
  3. 3. Serverless computing allows you to build and run applications and services without thinking about servers. - AWS Lambda What is Serverless?
  4. 4. FaaS on Cloud Provider Vendor lock-in FaaS environment simulation Data privacy/protection Execution limits & restrictions
  5. 5. How about FaaS on Kubernetes?
  6. 6. Portability Flexible cost model (Optimization) DevOps pipelines integration FaaS on Kubernetes
  7. 7. • Open source Kubernetes-native FaaS framework • Backed by Platform9 • On-premises/Cloud support • Wherever you can run Kubernetes, you can run Fission • Tunable cost/performance tradeoffs • Designed to be easy use, productive and fast • Focus on core business logic development Fission - Serverless Framework for Kubernetes
  8. 8. • Declarative Config • Fission resources are K8S CRDs, can be stored in YAML/JSON files • Spec files allow us to recreate application in different fission clusters • Support Rich Event Sources • HTTP, Time, Kubewatch trigger • Message queue trigger: NATS, Kafka • Rich Environment Supportability • NodeJs, Go, Python, Java (JVM) ..etc • BYOE (Build Your Own Environment) • Build Automation • Builder manager creates a deployable package from source code Fission
  9. 9. • More Cool Features • Function Log Collection • Canary Deployment (Beta) • Record & Replay (Beta) • Fission Workflow • Function composition for serverless functions Fission upload video split video into frames car recognition human recognition results aggregation store end result
  10. 10. FISSION CONCEPTS BASIC FISSION OBJECTS & RELATION
  11. 11. • Functions • Source code (3rd-party dependencies) • Environments • Language runtime container • Triggers • HTTP, Timer, KubeWatch trigger • Message queue trigger: NATS, Kafka Three Core Objects
  12. 12. FISSION CONCEPTS HOW FISSION WORKS WITH KUBERNETES?
  13. 13. 第壱話 架 構、襲來
  14. 14. Function Pod - Specializing Process 1 2 3 4 5 6
  15. 15. FISSION CONCEPTS TUNABLE COST/PERFORMANCE TRADEOFFS
  16. 16. • Pool-based executor (Poolmanager) • Low-latency, small idle overhead • Pre-warmed pool of env containers • Functions loaded on-demand • New-deployment executor (Newdeploy) • High latency, small idle overhead • Autoscaling: Min, Max instances • Min: Idle cost v.s Burst tolerance • Max: Throughput v.s Cost Execution Strategies
  17. 17. • Careful configuration of resources limits • Autoscaling makes cluster more efficient • Public Cloud • Pay for what you use • Reserved/Spot/Preemptible VMs • On-premises • Resources should be proportional to actual demand Cost Optimization
  18. 18. DEMO TIME! HOW DEVELOPERS DELIVERY PRODUCT?
  19. 19. Make changes to production directly and expect it to work?
  20. 20. Short feedback loop, More iteration! DEVELOPMENT WORKFLOW
  21. 21. What fission can do for developers (you)?
  22. 22. DEMO CREATE / TEST A SERVERLESS FUNCTION
  23. 23. DEMO SHORT FEEDBACK LOOP WITH LIVE-RELOAD
  24. 24. DEMO (RE)DEPLOY APPLICATION WITH SPEC FILES
  25. 25. Repo: https://github.com/fission/fission-bank-sample Fission Bank Example
  26. 26. DEMO PEFORM CANARY DEPLOYMENT / ROLLBACK
  27. 27. What is Canary Deployment?
  28. 28. funcN-1: Red, funcN: Green Init weight: 100:0 Traffic Graph in Canary Deployment
  29. 29. Traffic Graph in Canary Rollback funcN-1: Red, funcN: Green Init weight: 50:50
  30. 30. Q&A
  31. 31. Get Started with Fission! Visit: fission.io Github: github.com/fission/fission Slack: slack.fission.io Facebook: Fission User Group Taiwan Workshop: 2018/11/03, Taipei

×