Top Banner
Serverless & FaaS Christian Bargmann @chrisbargmann github.com/cbrgm Oct 23, 2018 Hamburg University of Applied Sciences 1
32

Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Sep 07, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Serverless & FaaSChristian Bargmann

@chrisbargmanngithub.com/cbrgm

Oct 23, 2018Hamburg University of Applied Sciences

1

Page 2: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Outline

1. Basics of serverless & FaaS2. Motivation & Tradeoffs3. Cloud Providers & Open Source4. Research & Conferences5. Future work & resources

2B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 3: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Basics of serverless & FaaS

3B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 4: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

4

the serverless hype 2018

Page 5: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

First: What is FaaS?

“Event-triggered, stateless compute containers”

Functions as a Service (FaaS)

5B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 6: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Monolithic vs Microservice vs FaaS

6

Monolithic

Microservice

Microservice

Microservice

Function

Function

Function

Function

Function

Function

B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 7: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Serverless (Architectures)

“...rely solely on a combination of third party services, client-side logic and

service hosted remote procedure calls (FaaS)”

Source: https://martinfowler.com/articles/serverless.html

7B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 8: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Serverless (Architectures)

λ

“third-party services”

“service-hosted Function as a Service”

“client-side logic”

B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 9: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Serverless vs FaaS

Serverless vs FaaSDoes it mean the same?

9B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 10: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Serverless

Infrastructure

Serverless vs FaaS

10

Functions

Apps

Containers

Virtual Machines

Bare Metal Servers

B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 11: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Serverless vs FaaS

Serverless ≠ FaaS

11B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 12: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Motivation?

IaaS, PaaS, SaaS, BaaS, FaaS?Why yet another “ ? as a Service” ?

12B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 13: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Motivation?

“I just want to focus on writing business logic!”

13B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 14: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Motivation?

“I don’t want to ‘run’ things, they should just work!”

14B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 15: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Motivation?

“I want to scale to ‘it works’ !”

15B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 16: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Tradeoffs?

● Vendor Control / Lock-In● Denial of Service = Denial of Purse● Stateless● Maturity● UX as a Developer

16B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 17: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Cloud Providers & Open Source

17B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 18: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

FaaS at public cloud providers

18

Amazon Lambda Azure Functions Google Cloud Functions

IBM OpenWhisk on IBM Cloud Webtask (Auth0) stdlib

B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 19: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

FaaS Open Source

19

OpenWhisk riff project fn

OpenFaaS Kubeless IronFunctions

B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 20: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

OpenWhisk

20Source: https://medium.com/openwhisk/uncovering-the-magic-how-serverless-platforms-really-work-3cb127b05f71

Page 21: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

OpenFaaS on Kubernetes

21Source: https://www.weave.works/blog/getting-started-with-openfaas-kubernetes-operator-on-eksB.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 22: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Demo

22B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

https://github.com/cbrgm/kubeless-demo

Page 23: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Research & Conferences

23B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 24: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Research Aspects

24

● Cost - minimizing the resource usage of a serverless function (running & idle)

● Cold Start - scale to zero, not charging customers for idle time = Cold Start Problems

● Resource limits - handle load spikes, manage attack, resource quotas ...

● Security - running mutliple functions on a shared platform

● Scaling - scale functions without knowledge about the app

● Cross-Cloud - make functions work accross different serverless platforms

● Legacy-Apps - access (non)-cloud applications through serverless code

● Dev-Tools / IDEs - higher level developer capabilities, debugging serverless code

● Statefulness - manage state in stateless, serverless functions

● ...B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 25: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Research Aspects

25

● KubeCon / CloudNativeCon○ https://events.linuxfoundation.org/events/kubecon-cloudnativecon-europe-2018/○ 2018, Copenhagen, Seattle○ 2019, May 20-23 Barcelona, Nov 18-21 San Diego

● Serverless Conference ○ http://serverlessconf.io/○ 2018, Paris, San Francisco

● Continuous Lifecycle○ https://continuouslifecycle.london/

○ 2019, May 15-18 London

B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 26: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Research Aspects

26

Page 27: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Research Aspects

27

Page 28: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Future work and resources

28B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 29: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Future Work

● Future work together with Prof. Dr. Stefan Sarstedt: Make serverless available for education

● Allow students to host their own serverless functions using the ICC as a FaaS platform (OpenFaas, Kubeless + Istio…?)

29B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 30: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Resources

● https://www.youtube.com/watch?v=_1-5YFfJCqMKeynote: Serverless, Not So FaaS - Kelsey Hightower, Google

● https://martinfowler.com/articles/serverless.htmlServerless Architectures, Mike Roberts, Symphonia

● https://azure.microsoft.com/en-us/overview/serverless-computing/Serverless Computing - Take your mind off infrastructure and build apps faster

30B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 31: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

References

● Baldini, Ioana; Castro, Paul; Chang, Kerry (2017). Serverless Computing: Current Trends and Open Problems● Mohanty, Sunil; Premsankar, Gopika; Di Francesco, Mario. (2018). An evaluation of open source serverless

computing frameworks.● Fernandez, O. (2016). Serverless: Patterns of modern application design using microservices (Amazon Web

Services Edition) (in preparation). https://leanpub.com/serverless.● Ast, Markus; Gaedke, Martin (2017). Self-contained web components through serverless computing.● Cloud Foundry and Iron.io Deliver Serverless. Retrieved December 1, 2016, from

https://www.iron.io/cloud-foundry-and-ironio-deliver-serverless/.● Roberts, Mike. (2018). Serverless Architectures. online: https://martinfowler.com/articles/serverless.html● Hightower, Kelsey (2018), Serverless, Not so FaaS. online: https://www.youtube.com/watch?v=_1-5YFfJCqM

31B.Sc. Christian Bargmann, HAW Hamburg | @chrisbargmann

Page 32: Hamburg University of Applied Sciences Serverless & FaaS Oct …ubicomp/... · 2018. 10. 26. · Outline 1. Basics of serverless & FaaS 2. Motivation & Tradeoffs 3. Cloud Providers

Thanks! Feel free to ask question!

Christian Bargmann

@chrisbargmanngithub.com/cbrgm

Oct 23, 2018Hamburg University of Applied Sciences

32