Yoichi Kawasaki, Microsoft
@yokawasa
2 0 10 12 2 1 10 1
@yokawasa
https://github.com/yokawasa
/
Azure TSP / / /
J J s K B G
At 2 2 1 027C N e D A K k B o
n l b Ja G A K n pD
, Obc
https://www.slideshare.net/yokawasa/container-and-serverless-113315212
Cloud computing simplified: a Berkeley view on serverless computing
https://www2.eecs.berkeley.edu/Pubs/TechRpts/2019/EECS-2019-3.pdf
What is Serverless?
Serverlesscomputing
Wikipedia-ServerlessComputing
Serverless
AWS-https://aws.amazon.com/serverless/
Wikipedia
AWS
martinfowler.com
https://github.com/cncf/wg-serverless/tree/master/whitepapers/serverless-overview
Serverlesscomputingreferstotheconceptofbuildingandrunningapplicationsthatdonotrequireservermanagement.Itdescribesa
finer-graineddeploymentmodelwhereapplications,bundledasoneormorefunctions,areuploadedtoaplatformandthenexecuted,
scaled,andbilledinresponsetotheexactdemandneededatthemoment.
Serverlesscomputingdoesnotmeanthatwenolongeruseserverstohostandruncode;nordoesitmeanthatoperationsengineers
arenolongerrequired.Rather,itreferstotheideathatconsumersofserverlesscomputingnolongerneedtospendtimeandresources
onserverprovisioning,maintenance,updates,scaling,andcapacityplanning.Instead,allofthesetasksandcapabilitiesarehandledbya
serverlessplatformandarecompletelyabstractedawayfromthedevelopersandIT/operationsteams.Asaresult,developersfocuson
writingtheirapplications’businesslogic.Operationsengineersareabletoelevatetheirfocustomorebusinesscriticaltasks.
Aserverlesscomputingplatformmayprovideoneorbothofthefollowing:
1. Functions-as-a-Service(FaaS),whichtypicallyprovidesevent-drivencomputing.Developersrunandmanageapplicationcodewith
functionsthataretriggeredbyeventsorHTTPrequests.DevelopersdeploysmallunitsofcodetotheFaaS,whichareexecutedas
neededasdiscreteactions,scalingwithouttheneedtomanageserversoranyotherunderlyinginfrastructure.
2. Backend-as-a-Service(BaaS),whicharethird-partyAPI-basedservicesthatreplacecoresubsetsoffunctionalityinanapplication.
BecausethoseAPIsareprovidedasaservicethatauto-scalesandoperatestransparently,thisappearstothedevelopertobe
serverless.
https://github.com/cncf/wg-serverless/tree/master/whitepapers/serverless-overview
• Functions-as-a-Service (FaaS)
• Backend-as-a-Service (BaaS)
Serverless
Serverless
20
The UNIX Super Text
(December 1, 1992)
1970 1980 1990 2000 2010 2020
2006 2008 2010
Amazon EC2
Google
App Engine Microsoft
Azure
Oracle Cloud
2012
Google
Compute
Engine
Alibaba Cloud
2006.8 2008.4 2010.2 2012.5
2014 2015 2016 2017 2018
AWS Lambda
2014.11
Google Cloud
Functions
Azure
Functions
2016.2
2016.3
IBM
Cloud Functions
Serverless
Framework
2015.10
2016.12
OpenWhisk
(OSS) by IBM
Fn Project
(OSS) by Oracle
2017.10
Serverless
Whitepaper
by CNCF
2018.2
2019
2018.12
Oracle
Function
2018.7
Knative
by Google
Tech Adoption 2019 https://www.infoq.com/about-infoq
CHASM
FaaS
Serverless can also mean applications where server-
side logic is still written by the application developer,
but, unlike traditional architectures, it’s run in
stateless compute containers that are event-triggered,
ephemeral (may only last for one invocation), and fully
managed by a third party. One way to think of this is
“Functions as a Service” or "FaaS".
https://martinfowler.com/articles/serverless.html
Monolith Microservices
Infrastructure
Host OS
Hypervisor
Guest
OS
Guest
OS
Bins/
Libs
Bins/
Libs
App App
Infrastructure
Host OS
Container Engine
Bins/
Libs
Bins/
Libs
App App
HTTP
HTTPProxy
/bin/sh
/bin/sh
/bin/sh
Fork
https://www.amazon.co.jp/dp/product/4797310332/
(1999 9 1 )
Serverlesscomputingreferstotheconceptofbuildingandrunningapplicationsthatdonotrequireservermanagement.Itdescribesa
finer-graineddeploymentmodelwhereapplications,bundledasoneormorefunctions,areuploadedtoaplatformandthenexecuted,
scaled,andbilledinresponsetotheexactdemandneededatthemoment.
Serverlesscomputingdoesnotmeanthatwenolongeruseserverstohostandruncode;nordoesitmeanthatoperationsengineers
arenolongerrequired.Rather,itreferstotheideathatconsumersofserverlesscomputingnolongerneedtospendtimeandresources
onserverprovisioning,maintenance,updates,scaling,andcapacityplanning.Instead,allofthesetasksandcapabilitiesarehandledbya
serverlessplatformandarecompletelyabstractedawayfromthedevelopersandIT/operationsteams.Asaresult,developersfocuson
writingtheirapplications’businesslogic.Operationsengineersareabletoelevatetheirfocustomorebusinesscriticaltasks.
Aserverlesscomputingplatformmayprovideoneorbothofthefollowing:
1. Functions-as-a-Service(FaaS),whichtypicallyprovidesevent-drivencomputing.Developersrunandmanageapplicationcodewith
functionsthataretriggeredbyeventsorHTTPrequests.DevelopersdeploysmallunitsofcodetotheFaaS,whichareexecutedas
neededasdiscreteactions,scalingwithouttheneedtomanageserversoranyotherunderlyinginfrastructure.
2. Backend-as-a-Service(BaaS),whicharethird-partyAPI-basedservicesthatreplacecoresubsetsoffunctionalityinanapplication.
BecausethoseAPIsareprovidedasaservicethatauto-scalesandoperatestransparently,thisappearstothedevelopertobe
serverless.
https://github.com/cncf/wg-serverless/tree/master/whitepapers/serverless-overview
• Functions-as-a-Service (FaaS)
• Backend-as-a-Service (BaaS)
https://www.cncf.io/
• Events
• Workflows / Function Composition
• Event Orchestration / Chaining
• Function Signatures
CNCF Serverless WG / Proposals
https://github.com/cncf/wg-serverless/tree/master/proposals
CNCF Serverless WG
• ”
interoperability”
• FaaS Event-Driven etc.
•
• (HTTP, AMQP, MQTT, SMTP) OSS(Kafka, NATS)
(AWS Kinesis, Azure Event Grid), etc.
https://cloudevents.io/
https://github.com/cloudevents/spec/blob/master/json-format.md
: CloudEvent JSON (data )
https://docs.microsoft.com/en-us/azure/event-grid/ https://serverless.com/event-gateway/
Amazon Lambda
Azure Functions
IBM Cloud Functions
Google Cloud Functions
Alibaba Function Compute
Serverless
OpenWhisk
OpenFaaS
Kubeless
Fn
Fission
Knative
OSS Serverless Platform
OSS Serverless Framework
PublicCloud
• https://aws.amazon.com/jp/blogs/news/firecracker-lightweight-
virtualization-for-serverless-computing/
• https://github.com/firecracker-
microvm/firecracker/blob/master/docs/design.md
https://quarkus.io/
• https://developers.redhat.com/blog/2019/03/07/quarkus-next-
generation-kubernetes-native-java-framework/
• https://publickey1.jp/blog/19/javaquarkusjavajavared_hat.html
Kubernetes-based Serverless
• Knative
• KEDA
• Virtual Kubelet
From: Kubernetes
https://www.ibm.com/blogs/think/jp-ja/jniino-san-multicloud/
https://github.com/knative
•
•
•
•
•
•
•
https://knative.dev/docs/serving/ https://knative.dev/docs/eventing/
https://knative.dev/docs/build/
https://github.com/kedacore/keda
• Kubernetes HPA (Horizontal Pod
Autoscaler) Pod CPU
• KEDA Rabbit MQ Kafka Streaming
Azure Storage Queue Azure Service Bus
Queue HTTP
Pod
• KEDA Zero
HPA
Storage
Queue
ServiceBus
Queue
Kafka
RabbitMQ
HPA KEDA
1->N or N->1 0->1 or 1->0
…
K E D A
kubelet
kube proxy
Container
Container
runtime
Virtual Kubelet
• Alibaba Cloud ECI Provider
• Azure Container Instances Provider
• Azure Batch GPU Provider
• AWS Fargate Provider
• HashiCorp Nomad
• OpenStack Zun
https://github.com/virtual-kubelet/virtual-kubelet
https://www.slideshare.net/hiromasaoka/noops-125109991
Y
A
X B

今Serverlessが面白いわけ