Friday, March 13

Is Function as a Service for your enterprise?

The name “serverless computing” means that the business or person that owns the software system does not have to provision servers or virtual machines for the back end code to run on. The provisioning of server is managed by service providers like AWS, Azure or Google and guarantees low latency content delivery network.

How does FaaS work?

Developers identifies a serverless architecture provider like Amazon Web Services (AWS) or Google Cloud to enable FaaS functionality for a web application. FaaS integration means some application code gets delivered from the 'Regional Edge Server' and availability and geographical distribution of Edge Servers is an important consideration. A user in India accessing a site that has FaaS code served from an server in Washington may encounter high latency that leads to high bounce rates. Taking example of AWS that has its global network divided as regions and within region edge locations that deliver service from the server closer to the web user delivering low latency and better user experience.So FaaS is very much closer to PaaS (Platform As A Service) , but there’s one difference. In FaaS, you don’t need to deploy the whole application in the cloud. Instead, you can deploy a part of it as a service.


Lets take example of few use cases for various vendors and their serverless offerings

Amazon Lambda

Lambda is a serverless computing offering from Amazon Web Services (AWS). Many of you will wonder what this is. Let me tell you that this offering from AWS will change the way application development and its cloud hosting is done.With Amazon Lambda, you can directly run your code without even managing the servers. For example, you upload an image in the server, now the Lambda function will work for you and will automatically resize the image according to the device a user is using, be it mobile, laptop, desktop or a tablet.To use Lambda services, you need to take a plan that will be “pay as you use.” This means you’ll need to pay only for what you are using.AWS Lambda also helps developers to scale the applications by running the required codes whenever someone triggers.
How does serverless computing works:
  1. Developer writes modular code for a functionality in the code editor.
  2. Developer deploy the code & configure it to be triggered by other AWS services or in-app  activities/events.
  3. Once code is deployed AWS Lambda will run the code when it gets triggered by an event or another service.
  4. On AWS Lambada you only pay for the compute time of the deployed code.

Google Cloud Functions

Google Cloud Functions is a serverless computing service launched by Google in 2018. Google cloud functions enable developers to write codes to extend and connect to cloud services i.e., Google’s public cloud. With Google cloud functions, website developers can call particular functions which can perform specific tasks which when triggered gives specific response. These responses are automatically triggered by the Google Cloud Platform (GCP). To provide a seamless experience to the developers, Google introduced the service Google Cloud Functions & made it easier for the developers to to  focus more on the coding part rather than developing infrastructure for the application. Scalability is also one of the significant throwbacks of this service. This service automatically scales the resources whenever they are needed and puts them aside when not. With the presence of conventional coding languages like JavaScript and Python, it is easier for the developers to develop the codes and upload them according to the functions.

Microsoft Azure Functions

Azure Functions is the FaaS launched by Microsoft. Microsoft Azure Functions are designed by keeping the developers in mind. This service helps the developers to accelerate the application designing and development process. Microsoft’s idea behind this FaaS is to eliminate the time consumed by the application infrastructure development process. Now when this is eliminated, the user can easily create the software application and upload its code.  The users now have to pay only for the time which is consumed by the function to run. Also, this service is hosted on Microsoft’s Public Cloud.

IBM Cloud Functions

Based on Apache OpenWhisk, IBM Cloud Functions is a polyglot functions-as-a-service (FaaS) programming platform for developing lightweight code that executes on demand. FaaS helps in developing lightweight codes that are executed when demanded. The service is very similar to that of AWS Lambda and Google Cloud Functions.

Some other popular examples of FaaS are Iron.io & Webtask.io

Summarizing

FaaS lets developers write and update a piece of code on the fly, which can then be executed in response to an event, such as a user clicking on an element in a web page. This makes it easy to scale code and is a cost-efficient way to implement microservices.

Advantages of using FaaS?

Improved developer velocity
With FaaS, developers can spend more time writing application logic and less time worrying about servers and deploys. This typically means a much faster development turnaround.

Built-in scalabilitySince FaaS code is inherently scalable, developers don’t have to worry about creating contingencies for high traffic or heavy use. The serverless provider will handle all of the scaling concerns.

Cost efficiencyUnlike traditional cloud providers, serverless FaaS providers do not charge their clients for idle computation time. Because of this, clients only pay for as much computation time as they use, and do not need to waste money over-provisioning cloud resources.

Drawbacks of FaaS?

Less system controlWhen a third party manage part of the infrastructure it is tough to understand the whole system and debigging becomes more challenging.
Testing becomes more complex  as it is  very difficult to incorporate FaaS code into a local testing environment, making thorough testing of an application a more complex task.
Monitoring become difficult as 

The idea of serverless architectures is appealing or developers. Having sai that FaaS cannot be a complete replacement for traditional application architectures.
To build a basic web application as FaaS, it would take a lot of functions. Application that are using microservices architecture are ideal for replacing potential microservice style architectures and background type services.

No comments:

Post a Comment

MUSTREAD : How can you use Index Funds to help create wealth? HDFC MF Weekend Bytes

https://www.hdfcfund.com/knowledge-stack/mf-vault/weekend-bytes/how-can-you-use-index-funds-help-create-wealth?utm_source=Netcore...