0 ratings0% found this document useful (0 votes) 22 views27 pagesServerless Computing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
|AIMDek
Agenda
* Introduction
* Serverless
* Architecture
* Characteristics
* Commercial Platform
* Benefits and Drawbacks
* Use Cases and Workloads
* API Composition
* Demo|AIMDek
Introduction
Serverless Computing (or simply serverless) is emerging as a new and compelling model for the
deployment of cloud applications
Conventionally, applications were written and run in servers which are allocated fixed resources.
Soon problems arose with sudden spikes of traffic as demands increased and the servers were
not able to handle the enormous amount requests. To address these problems, came Platform
asa Service (PaaS) in which providers offered scaling but it has its drawbacks.
It is a platform for rapidly deploying small pieces of cloud-native codeAIMDek
Introduction
There are many immediate benefits to not managing your
own servers:
ee | s a & e
rebooting or going down.
© You don't end up with snowflake servers, where you
don't know quite what's installed on them but they are
mission-critical to your organisation.
© You're not responsible for installing software on them.
Even if you use configuration management tools such
as Chef or Ansible to automate this, that’s still extra
code you have to maintain over time.|AIMDek
What is Serverless Computing?
© Serverless Computing is a cloud computing execution model in which the
cloud provider dynamically manages the allocation of machine resources,
and bills based on the actual amount of resources consumed by an
application, rather than billing based on pre-purchased units of capacity..
© The version of serverless that explicitly uses functions as the
deployment unit is also called Function-as-a-Service (Faas).AIMDek
What is Serverless Computing?
+ The Infrastructure-as-a-Service (laaS) model is where the developer has the
‘most control over both the application code and operating infrastructure in the
cloud
* The developer is responsible for provisioning the hardware or virtual machines.
* Can customize every aspect of how an application gets deployed and executed
* On the opposite extreme are the PaaS and SaaS models, where the developer is
unaware of any infrastructure.
* The developer has access to prepackaged components or full applications. The
developer is allowed to host code here, though that code may be tightly
coupled to the platform.|AIMDek
Serverless?
* Serverless can be explained by varying level of developer control
over the cloud infrastructure.
Serverless
Custom infrastructure «Sharad infrastructure Shared infrastructure
Custom Application Code Customer Application SharedServce Code
Hardware/VM Ful stack
Deployment Services
(Waas) (2as)
More Developer Less
Control@Amoek
Architecture
© Servers are still needed, but developers need not concern
themselves
© with managing those servers.
* Decisions such as the number of servers and their capacity are
taken care of by the serverless platform, with server capacity
automatically provisioned as needed by the workload.
© The core capability of a serverless platform is that of an
event processing system.
* The service must manage a set of user defined functions, take an
* event sent over HTTP or received from an event source.Architecture
The challenge is to implement such
functionality while considering
metrics such as cost, scalability, and
fault tolerance.
‘The platform must quickly and
efficiently start a fun
process
its input,
The platform also needs to queue
events.
|AIMDek
= ieServerless : Characteristics
Independent, server-side, logical functions : small, separate, units of logic that take
input arguments, process them in some manner, then return the result.
Cost : Typically its Pay As You Go
Simple Deployment : Thanks to the small size of deployment artifacts, in general,
deployments are simple and quick. Deployment artifacts are typically idiomatic of the
chosen runtime e.g. NuGet packages, npm packages, JAR files
Ephemeral : designed to spin up quickly, do their work and then shut down agai
Programming languages : Serverless services support a wide variety of programming.
languages - Node, Python.
Stateless : FaaS are stateless, not storing states ,as containers running code will
automatically destroy and created by platform.Horizontal Scaling becomes easy...AIMDek
Serverless : Characteristics
* Scalable by Default
+ Event Triggered :Although functions can be invoked directly, they are
typically triggered by events from other cloud services, such as
incoming HTTP requests,
* Simple Deployment Model.
+ Small Deployable Units and More focus on Business Value.
* Managed by third party.
* Nomore “Works on my Machine”|AIMDek
Commercial platforms
* Amazon’s AWS Lambda
© Google’s Cloud Functions
* Microsoft Azure Functions
* IBM Cloud Functions
* OpentambdaAIMDek
Amazon’‘s AWS Lambda
* Amazon's AWS Lambda was the first serverless platform it is a compute
service that lets you run code without provisioning or managing servers.”
* AWS Lambda executes code only when needed and scales
automatically, from a few requests per day to thousands per second.
* Pay only for the compute time.
* Can run code for virtually any type of application or backend service|AIMDek
Amazon’‘s AWS Lambda
* Currently AWS Lambda supports Node.js, Java, C#, Go and Python and
PowerShell
+ AWS Lambda automatically scales application by running code in response
to each trigger.
+ With AWS Lambda,we are charged for every 100ms|AIMDek
Google's Cloud Functions
Google Cloud Functions provides basic FaaS functionality to run
serverless functions written in Node js , Go, Python and Java.
Automatically scales, highly available and fault tolerant.
No servers to provision, manage, or upgrade
Pay only while your code runs.
eaeee ® Invokes cher serves e
Ch Servos oud Functions other APls » 9|AIMDek
Microsoft Azure Functions
© Microsoft Azure Functions provides HTTP webhooks and
integration with Azure services to run user provided functions.
* The platform supports C#, F#, Node.js, Python, java and PowerShell.
* Pay only for the time spent running your code with Consumption
plan.
* The runtime code is open-source and available on GitHub under an
MIT License. Ln ieee|AIMDek
IBM Cloud Functions (OpenWhisk )
* IBM OpenWhisk provides event-based serverless programming with
the ability to chain serverless functions to create composite
functions.
+ It supports Node.js, Java, Swift, Python, as well as arbitrary binaries
embedded in a Docker container.
* OpenWhisk is available on GitHub under an Apache open source
license. ad|AIMDek
OpenLambda
* OpenLambda is an open-source serverless computing platform. The
source-code is available in GitHub under an Apache License.
* The Lambda model allows developers to specify functions that run in
response to various events.
* OpenLambda will consist of a number of subsystems that will
coordinate to run Lambda handlers:|AIMDek
Benefits
* Compared to laaS platforms, serverless architectures offer different tradeoffs in terms
of control, cost, and flexibility.
© The serverless paradigm has advantages for both consumers and providers.
+ From the consumer perspective, a cloud developer no longer needs to provision
and manage servers, VMs, or containers as the basic computational building
block for offering distributed services.
‘+ The stateless programming model
the provider more control over the software
stack, allowing them to, among other things, more transparently deliver security
patches and optimize the platform.AIMDek
Drawbacks
* However, drawbacks to both consumers and providers.
* For consumers, the FaaS model offered by the platform may be too
constraining for some applications.
* For the provider, there is now a need to manage issues such as the
lifecycle of the user's functions, scalability, and fault tolerance in an
application-agnostic manner.|AIMDek
Current state of serverless platforms
There are many similarities between serverless platforms.
They share similar pricing, deployment,and programming models.
Current serverless platforms only make it easy to use the services in
their own ecosystem.
Open source solutions may work well across multiple cloud
platforms.Ovex
Use cases and workloads
* Serverless computing has been utilized to support a wider range of
applications.
* HTTP REST APIs and web apps: traditional request and response
workloads.
* Mobile back ends: ability to build on the REST API backend workload above
the BaaS APIs
* Multimedia processing: The implementation of functions that execute a
transformational process in response to a file upload|AIMDek
Event processing
* One class of applications that are very much suitable for is event-based
programming.
* Image processing event handler function by AWS
* The function is connected to a data store, that emits change events .
* New image file is uploaded, an event is generated.
* Inthe case of failure , the function can be executed again with no side
effects.
39 7 je-mee|AIMDek
API composition
* Another class of applications involves the composition of a number of APIs
* The application logic consists of data filtering and transformation.
Mobile App.
Laviong 3day weather
coordinates Forecast in india
Coordinate to ZIP Weather forecast Language translation
code service Service Service|AIMDek
Conclusions
It is an evolution of the trend towards higher levels of abstractions in
cloud programming models. Currently exemplified by the Function-
as-a-Service (FaaS) .
There are some drawbacks also to Serverless computing like vendor
lock-in and Vendor control.
The developers are dependent on vendors for debugging and
monitoring tools. Debugging distributed systems is difficult and
usually requires access to a significant amount of relevant metrics
to identify the root cause.Qanmrsx
Questions and Answers
9
? 7
ae Pr >‘ales@aimdshcon ‘ales@aindekcon
Tellamdek com Telo@simdek com hpelo@aimdekcom