Professional Documents
Culture Documents
Cloud Computing
Serverless Architecture
What is Serverless Architecture?
Serverless – a fancy word to hear These functions can start in very less time and can
especially when we have countless be executed anywhere, and after execution, they can
options for containers and servers be stopped, and resources are free in comparison to
available to choose from for application microservices where we have to keep them running
deployment. All this started with for long. One good example of serverless architecture
physical servers where one had to go or FaaS is AWS Lambda, and we will discuss it here
manually deploy the code on virtual in a while.
machines, where anyone can deploy or
recover it irrespective of geographical There is another perspective of serverless architecture
presence. Now we have containers which is BaaS (Backend as a Service), here in this model
with swift deployment times, higher application will call these cloud services via some API
availability, and recoverability. When all or connection or SDKs and use the capabilities in the
these capabilities are available with an application without actually implementing it. BaaS based
architecture having a server, then why services have their storage, code, file management, user
do we need Serverless at all and does it management and they also have their APIs which allows
mean “NO SERVER”? outside applications to integrate with them using these
APIs. Some BaaS even has a UI in between, so calling
Serverless architecture does not mean application has to handle this part and application which
that it can be executed sans server but it is calling BaaS also need to consider that most of these
is a service on its own, and it also means BaaS come with some contractual agreement made with
that developer no longer has to worry the vendor. This is a downside of BaaS since that will be
about the server on which code will having impacts in case if we like to move to another similar
get executed. Serverless architectures feature providing BaaS.
refer to applications that significantly
depend on third-party services (knows So, far we have discussed what serverless architecture
as backend as a Service or “BaaS”) or and FaaS and BaaS techniques which are based on this
on custom code that’s run in ephemeral architecture is. Now we will take a look at different
containers (Function as a Service or cloud vendors and what they are offering in Serverless
“FaaS”). Since it functions on its own, Architecture space.
it is often called as Faas(Function as a
Service), and serverless also means that
the organization need not purchase,
rent or provision servers.The need
to depend on virtual machines to
develop and deploy the code is no
more there. Instead, organizations can
build functions and trigger them based
on events. We can also understand
serverless architecture by comparing it
to a traditional microservice architecture
where large enterprise applications are
broken down into smaller services, and
then these services can be enhanced,
managed and scaled independently.
Now with the serverless architecture,
this is further be divided into functions.
Microsoft Azure - Serverless Architecture
Microsoft Azure is cloud computing service developed Azure Functions are capable of
and owned by Microsoft. Azure is used for building, integrating with different Azure services
testing, deploying and managing applications/services or even 3rd party services like GitHub
in the cloud through Microsoft managed data centers. or Twilio(communication services API).
In Serverless computing world, Microsoft Azure has By integrating means that these services
developed a feature called Azure Functions. Azure can trigger or can be used as providing
Functions are a small piece of code, or we can call it as a data to the Azure Functions.Azure
function which can be executed in cloud infrastructure. Functions support dependencies as well,
The way Azure Functions work is that developer will so while writing functions which have
create a function or piece of code without worrying some dependencies, Azure Functions are
about infrastructure and scalability. To create functions, capable of bringing these dependencies
a developer can choose languages like PHP, Python, while execution, common examples of
Java, and Node.js, etc. which is excellent as we no longer dependencies are NuGet and NPM. If you
need to worry about which programming language a look at pricing wise, Azure Functions are
developer can choose. only be charged for time duration they
are executing and the resources which are
Azure Functions can be used to do lots of prevalent used in executing these Functions.
scenarios which we perform in any enterprise
applications, some of these scenarios are executing Scalability is also not a concern since that
a batch process, calling an HTTP method, processing will be managed by cloud infrastructure
related to messaging infrastructures like queues or where your function will get executed.
topics can also be used to trigger a timer task based
on certain events. Azure functions can also support So, in a nutshell, Azure Functions are
web hooks, like for example if a code checked into a the perfect example of Serverless
GitHub repository, an Azure Function can be written to Computing where a developer can create
track that event and do some operation based on that any functions without worrying about
event which happened in GitHub repository so saying infrastructure or server where it will get
that Azure Functions can do data processing, help in executed and they can be very easily
integrating different systems, creating simple HTTP APIs deployed in Azure App Service platform
is a correct statement. in the cloud.
Google Cloud Platform - Serverless Architecture
Similar to Microsoft Azure Functions, Google also Google Cloud Functions can also be triggered
has come up with a feature called Google Cloud on HTTP/S, and this capability makes them
Functions in the space of Serverless Architecture. As more compelling since with this they also are
per the official documentation released by Google, integrated with API gateways or even web
Google Cloud Functions are lightweight, event-based hooks. Google Cloud Functions comes up with
and asynchronous. They allow developers to create a a local emulator which developer can use to
single small function which can be triggered based test function in local before actually deploying
on an event or this function could also possibly the function to cloud, also if a function has any
respond to an event, and again here this function can dependency, then it can be resolved by running
be developed and deployed without worrying about npm install in the cloud which can bring in
a server or a runtime environment. all the dependencies needed to execute the
cloud function.
Google Cloud Functions are written in Javascript,
and they can be executed in a NodeJS runtime or As far as scaling is concerned, we need not
environment in Google Cloud. Since it is written in worry when executing functions since Google
easy executable Javascript, it makes it portable and Cloud Platform manages it. A function can
testable. scale from a single execution a day to millions
of executions and for that developer does not
Google Cloud Functions are provided with a capability have to do anything, yes, of course, function
of easy integration with other Google Cloud Services execution will be billed as per the resources
like Google Cloud Storage, Google Cloud Pub/Sub, and time it takes to execute the function on
Google Cloud Dataflow, etc. An example of this would the cloud.
be, Google Cloud Function can be triggered based
on file upload in Google Cloud Storage, or it can be So, these cloud functions are capable of
triggered if some message is received on Pub/Sub integrating with all cloud services of Google
topic. Google Cloud Functions can also access the Cloud Platform, these are secure, easy to write,
authentication services of Google Cloud Platform so test and integrate and at the same time can be
no need to worry about any Google Cloud Function scaled as per the usage needs and frequency
getting unauthorized access or executed on the and these all together makes them a perfect
wrong resource. example of Serverless Architecture.
Amazon Web Services – Serverless Architecture
AWS defines Lambda as “AWS Lambda lets you AWS Lambda can easily be integrated with other
run code without provisioning servers. One pays AWS services like AWS API Gateway, Simple Storage
only for the compute time consumed - there is Service (S3), Kinesis, Athena or even with Dynamo
no charge when your code is not running. With DB. Due to this easy integration, AWS Lambda can
Lambda, one can run code for virtually any type be used in wide variety of applications like mobile,
of application or backend service with almost no desktop or even in data processing or analytics
administration. application; it can also be used with IoT backend.
Zillow, Localytics, Bustle and many other big and
Just upload your code and Lambda takes care of successful products are using AWS Lambda.
everything required to run and scale your code
with high availability. One can set up the code to Node.js, Java, C#, and Python are supported
automatically trigger from other AWS services by AWS Lambda which means a code can be
or call it directly from any web or mobile app. written in any of these programming languages
This indicates that this AWS service is a perfect and then can be executed as Lambda function
example of Serverless Architecture since it is all in the cloud on event triggers. AWS Lambda
code but no infrastructure. comes up with versioning and aliases so you can
always keep different versions of a single lambda
AWS Lambda is one of most famous and widely function and it can easily be monitored, logged
used service in Serverless Architecture space. and troubleshoot through AWS’s Cloud Watch.
No server management, flexible scaling, high There are certain limits regarding how much a
availability and no idle capacity or no cost when single lambda function can process request and
idle are key advantages of AWS Lambda which is response, and that can be looked in AWS Console.
no different than advantages provided by other
cloud players.
AWS – Serverless Web Architecture
World HQ: 605-17th Avenue East Moline IL 61244 USA | Toll Free: 877-766-8934 | Tel: 309-755-0433 | Fax: 309-796-1242 .
© 2018 YASH Technologies. All rights reserved. Referred products/ services may be registered trademarks of belonging companies.