Serverless Computing

What is Serverless Computing?

Serverless computing can be defined as the process in which the vendor offers backend services on an as-used basis which means the end-user needs to pay as per their consumption. In serverless computing the companies need not to worry about underlying infrastructure and reserve for a fixed number of services or amount of bandwidth as the services are on auto-scaling.

Serverless Computing
Table of Contents

    If we talk about initial days, anyone who wants to design a web application, need to own physical hardware required to run a server which leads to an expensive and cumbersome environment. Then, the concept of cloud computing came in existence where the end-users are able to rent out fixed amount of server space.

    The companies or developers who rent these services often over purchase these units as they ensure that a spike in activities or traffic do not affect their applications in a negative manner. This means that much of the server space which gets paid for might go to waste.

    In order to overcome with this issue, the cloud vendors unveiled autoscaling models, but even with the auto-scaling models some of the unwanted spike in activities such as DDoS Attack ends up being very expensive.

    The application development process can be divided into two realms the frontend and the backend. The frontend is the visual layout which a user interacts with whereas the backend part is the one which is not visible t user, includes the server where the logic and data is persisted.

    Most of the serverless vendors provide storage and database services and different FaaS (Function-as-a-Service) platforms such as Cloudflare Workers.

    With the help of Faas, the end-user is able to execute their small pieces of code on the network edge which helps them in building a modular architecture and a more scalable codebase without spending a huge amount on maintenance of underlying backend services.

    Serverless Vendors

    In 2014, Amazon launched AWS Lambda, a platform based on Amazon’s cloud service with which the modern age of serverless computing started. In 2016, Microsoft announced to launch Azure Functions. In 2018, Google Cloud Functions finally reached production status which was been in beta since 2017.

    The three models have slightly different procedure methods, supported languages, advantages, and limitations.  Among all three platforms, AWS Lambda is most popular and prominent one and it obviously has more time to mature and evolve.

    Serverless Computing: Advantages & Disadvantages

    Serverless computing has been introduced to developers to similar to 60’s or 70’s, when everything was supposed to integrate together into a single system. For the CIOs the intent was to optimize the economic model of cloud computing by cost saving while maintaining the operational efficiency.

    Advantages

    Some of the advantages associated with serverless computing are stated below:

    Minimized time for production: The serverless computing model enables the user to minimize the steps involved in testing, deploying, and conceiving the code intended to moving the functionality to production stage from idea stage within few days instead of months.

    Improved utilization: In cloud-based model, in which AWS is a key player, users need to lease either containers (such as OCI containers or Docker), bare-metal servers or machines (virtual machines) that are reasonably self-contained entities.

    In this case customers need to pay for the resources they consume as well as the length of time these servers exist. Whereas, in Lambda model, the user leases the particular code only for the small length of time it is alive.  AWS charges based on gigabyte seconds which means size of the memory space reserved for the function.

    Simplified backend code: With the use of FaaS, developers are able to build simple functions which perform independently for some specific purposes, such as making API calls. Moreover, the model offers quicker turnaround which means rather than any complicated deploy process to roll out new features or bug fixes, developers can customize the code on a piecemeal basis.

    Separation of powers: Serverless model was designed to improve the developer’s productivity while taking care of dependencies, housekeeping, and bootstrapping in the background itself. In this model, the developers are freer to concentrate on the coding part more objectively. Producing code in object-oriented style helps the cloud platform to easily segregate into discrete functions and scale up and down.

    Disadvantages

    Rather than several benefits, the model has some drawbacks. The disadvantages associated with the serverless computing are as follows:

    Uncertain Service Level: SLAs (service level agreements) is yet to be ironed out for serverless and Faas which is normally used to categorize public cloud services. Although, Amazon offers explicit and clear SLAs for their other computing services, but for Lambda AWS has actually gone so far as to characterize the lack of SLAs. Practically, companies are facing difficulties in deciding what’s safe for it to promise as the performance patters of FaaS are so indeterminate.

    Untested code can be costly: In this model, it is possible that someone else’s code links to your code by the way of API since the user pays by the function invocation (the maximum arbitrary is 100 for AWS). In this case, a process can be spawn and maximum number can be invoked in a single cycle.

    Monolithic tendency: Lambda and other functions have set an example of creating small services with very less efforts dedicating in learning or understanding what they are. Since the companies are likely to deploy all their FaaS functions on a single platform, naturally they all share the same context. Sometimes this makes it difficult to scale up or down as the microservices are supposed to do.

    There are some incidences where developers have taken the unexpected step of melding their FaaS into a single function which actually worked against the whole point of the serverless principle. The developers might have built all their code as a single Docker container, and deployed in Amazon’s Elastic Container Service for Kubernetes or any other multitude of cloud-based containers-as-a-service (CaaS) platforms.

    What’s Coming Next for Serverless

    Though. Serverless computing in an emerging technology, but there are some drawbacks associated with it which might hamper the adoption rate of the technology. However, the companies are engaged in introducing innovations in order to overcome these challenges such as cold start.

    Usually, when the provider doesn’t get any calling function for a while, they shut down the function intended to avoid over-provisioning and reduce the energy consumption. The next time when the customer runs an application that calls the function, the vendor needs to restart hosting that function. This startup time increase the latency significantly which is termed as cold start.

    One the function is up and running, it will be run on warm starts which means the application will be served more rapidly on following request. However, if the user doesn’t request for a call function again, the function will once again go latent. This will result in cold start when the next user requests that function. Hence, cold start is a major drawback in serverless computing.

    At the time of TLS handshake, Cloudflare Workers has addressed this problem by spinning up function at the edge in advance in a very short amount of time, which results in an Faas platform with zero cold starts. With rising popularity of edge computing, the serverless architecture is anticipated to become more widespread.

    Also Read:

    What is eSIM? Pros & Cons Explained: All You Need to Know

    Top 5 CyberSecurity Companies in 2020

    Top 10 Technology Trends in 2020

    Open Source Technology

    BSIV vs BSVI

    If you have any concerns regarding serverless computing or if you want to add something in the above post, let us know in the comment box. Or, you can email us at exploreend2end@gmail.com.

    Happy Reading 🙂

    3 thoughts on “Serverless Computing”

    1. Pingback: Best Python Framework for Web Application in 2020 - Explore End2End

    2. Pingback: Home Automation | All You Need to Know - Explore End2End

    3. Pingback: Software-Defined Wide Area Network (SD-WAN) - Explore End2End

    Leave a Reply

    Your email address will not be published. Required fields are marked *