Compiled by Kiran Kumar, Business analyst at Powerup Cloud Technologies
Contributor Agnel Bankien, Head – Marketing at Powerup Cloud Technologies
What is Serverless Computing?
Servers have always been an integral part of computer architecture and today, with the onset of cloud computing, the IT sector has progressed dynamically towards web based architecture further leading the way to serverless computing.
Gartner estimated that by 2020, 20% of the world’s organizations would have gone serverless.
Using a virtual server from a cloud provider not only offloads their development team from taking care of server infrastructure but also helps the operations team in running the code smoothly.
Serverless computing, also known as serverless architecture or function as a service (FaaS) is a cloud deployment model offered by cloud service providers, to govern server and infrastructure management services of their customers.
This model provisions for allocation of resources, equipping virtual machines, container management and even tasks like multithreading which are built into the application code, thus reducing the responsibility and accountability of software developers and application architects.
As a result, the application developers can solely focus on building the code more efficiently while cloud providers maintain complete transparency with them.
Actual physical servers are nevertheless used by cloud service providers to implement the code into production; but developers are least concerned with regards to executing, altering or scaling a server.
An organization seeking serverless computing services is charged on a flexible ‘pay-as-you-go’ basis, where you pay for only the actual amount of resources utilized by an application. The service is auto-scaling and paying for a fixed amount of bandwidth or servers like before has become redundant.
With a serverless architecture, the focus is mainly on the individual functions in an application code, while the cloud service provider automatically provisions, scales and manages the infrastructure required to run the code.
Other Cloud Computing Models Vs. Serverless
Cloud computing is the on-demand delivery of services pertaining to server, storage, database, networking, software and more via the Internet.
The three main service models of cloud computing are Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS) with serverless being the newest addition in the stack. All four services address distinct requirements, supplement each other and focus on specific functions within cloud computing and therefore commonly referred to as the “cloud-computing stack.”
Serverless computing ensures server provisioning and infrastructure management is handled only by the cloud provider on-demand on a per-request basis with auto-scaling capabilities. It shifts the onus away from developers and operations, thus mitigating serious issues like security breach, downtime and loss of customer data that otherwise proves uneconomical.
In the conventional cloud computing set up, the resources are dedicatedly available irrespective of whether it is put to use or idle while serverless enables customers to pay only for resources being used, which means that serverless is capable of delivering the exact units of resources in response to a demand from the application.
To elaborate further, applications are framed into independent autonomous functions and whenever a request from a particular application comes in, the corresponding functions are instanced and resources are applied across relevant functions as needed. The key advantage of a serverless model is to facilitate whatever the application calls for, whether it is additional computational power or more storage capacity.
Traditionally, the process of spinning up and maintaining a server is a tedious and risky task that may pose high security threats especially in case of misconfigurations or errors. On the FaaS or serverless models, virtual servers are utilized with nominal operations to keep applications running in the background.
In other cloud computing models, resource allocation occurs in sections and buffers need to be accommodated for, in order to avoid failures in case of excess loads. This arrangement eventually leads to the application not always operating in full capacity resulting in unwanted expenses. However, in serverless computing, functions are invoked only on demand and turned off when not in use enhancing cost optimization.
Serverless Computing – Architectural impact
Rather than running services on a continuous basis, users can deploy individual functions and pay only for the CPU time when their code is actually executing. Such Function as a Service (FaaS) capabilities are capable of significantly changing how client/server applications are designed, developed and operated.
Gartner predicts that half of global enterprises will have deployed function Platform as a Service (fPaaS) by 2025, up from only 20% today.
The technology stack for an IT service delivery can be re-conceptualized to fit the serverless stack across each layers of network, compute and database. A serverless architecture includes three main components:
- API Gateway
where the API Gateway is nothing but a communication layer between the frontend and FaaS. It maps the architectural interface with the respective functions that run the business logic.
With the abdication of servers in the serverless set up, the need for distribution of network or application traffic via load balancers takes a backseat as well.
FaaS helps execute codes in response to events while the cloud provider attends to the underlying infrastructure associated with building and managing microservices applications.
DbaaS is a cloud based backend service that basically helps get rid of database administration overheads.
For serverless architectures, the key objective is to divide the system into a group of individual functions where costs are directly proportional to usage and not reserved capacity. All benefits of bundling and individual services sharing the same reserved capacity become obsolete. FaaS provisions for development of secured remote modules that can be maintained or replaced more efficiently.
Another major development with the serverless model is that it facilitates client applications to directly access backend resources like storage, with appropriately distributed authentication and authorization techniques in place.
Serverless Computing – Economic impact
The pay as you go model offers a considerable remunerative benefit, as users are not paying for idle capacity. For instance, a 300 milliseconds service task that needs to run every five minutes would need a dedicated service instance in the traditional setup, but with a FaaS model, organizations will be billed for only those 300 milliseconds out of every five minutes, resulting in a potential saving of almost 99.5%
Also, as different cloud services are billed according to its utilization, allowing client applications to connect directly to backend resources can optimize costs significantly. The costs of event-driven serverless cloud computing services rises with the increase in memory requirement and processing time and any service that does not charge for execution time adds to cost effectiveness.
Who should use a serverless architecture?
In the recent past, Gartner identified Serverless computing as one of the most emerging software infrastructure and operations architecture stating that going forward, serverless would eliminate the need for infrastructure provisioning and management. IT enterprises need to adopt an application-centric approach to serverless computing, managing APIs and SLAs, rather than physical infrastructures.
Organizations looking for scalability, flexibility and better testability of their applications should opt for serverless computing.
Developers wanting to achieve reduced time to market with building optimal and agile applications would also benefit from serverless architecture models.
The need to have a server running 24/7 is no longer relevant and the module-based functions can be called by applications only when required, thus incurring costs only while at use.
This in turn paves the way for organizations to have a product based approach where a part of the development team can focus on developing and launching new features without the hassle of having to deploy an entire server for the same.
Also, with serverless architecture, developers have the option to provide users with access to some of the applications or functions in order to reduce latency.
Running a robust and scalable server along with being able to reduce the time and complexity of the infrastructure is a must. With serverless, the effort required to maintain the IT infrastructure is nominal as most of the server related issues are resolved automatically.
One of the most preferred cloud serverless services is AWS Lambda, which tops the list when it comes to integrating with other services. It offers features like event triggering, layers, high-level security control and online code editing.
Microsoft Azure functions and Google Cloud functions that offer similar services by integrating with their own set of services and triggers are a close second.
There are players like Auth0, AWS Cognito UserPools and Azure B2C that offer serverless identity management with single sign-on and custom domain support while implementing real-time application features are provisioned by platforms like PubNub, Google Firebase, Azure SignalR and AWS AppSync.
Amazon S3 by AWS is a leader in file storage services and Azure Blog Storage is an alternative to it.
Azure DevOps and the combination of AWS Code Commit, AWS Code Build, AWS Code Pipeline and AWS Code Star services cater to the entire DevOps management with tools like CircleCI, Bamboo focusing mainly on CI/CD functions.
Thus, there are numerous serverless offerings in the market to evaluate and choose from, based on the platform that an organization is using with respect to their application needs.
How serverless has impacted cloud computing?
In a recent worldwide IDC survey of more than 3,000 developers, 55.7% of respondents indicated they are currently using or have solid plans to implement serverless computing on public cloud infrastructure.
While physical servers are still a part of the serverless set up, serverless applications do not need to cater to or manage hardware and software constituents. Cloud service providers are equipped to offer lucrative alternatives to configuration selection, integration testing, operations and all other tasks related to infrastructure management.
This is a notable shift in the IT infrastructure services.
Developers are now responsible primarily for the code they develop while FaaS takes care of right sizing, scalability, operations, resource provisioning, testing and high availability of infrastructure.
Therefore, infrastructure related costs are significantly reduced promoting a highly economical business set up.
As per Google trends, serverless computing is gaining immense popularity due to the simplicity and economical advantages it offers. The market size for FaaS services is estimated to grow to 7.72 billion by 2021.
Serverless computing Benefits and drawbacks
Serverless computing has initiated a revolutionary shift in the way businesses are run improving the accuracy and impact of technology services. Some of the benefits derived from implementing a serverless architecture are:
Reduces organizational costs
Adopting serverless computing eliminates IT infrastructure costs, as cloud providers build and maintain physical servers on behalf of organizations. In addition, servers are exposed to breakdown, require maintenance and need additional workforce to deploy and operate them on a regular basis, all of which can be excluded by going serverless. It facilitates enhanced workflow management, as organizations are able to convert operational processes into functions, thus, maintaining profitability and bringing down expenses to a large extent.
Serverless stacks act as an alternative to the conventional technology stacks by creating a responsive environment to develop agile applications without being concerned about building complicated application stacks themselves.
Optimizes release cycle time
Serverless computing offers microservices that can be deployed and run on a serverless infrastructure only when needed by the application. It enables organizations to make the smallest of application-specific developments, isolate and resolve issues and manage independent applications as well. According to a survey conducted, serverless microservices have proven to bring down the standard release cycle from 65 to just 16 days.
Improved flexibility and deployment
Serverless computing microservices provide flexibility, technical support and clarity needed to process data owing to which organizations can boost a more consistent and well structured data warehouse. Similarly, since remote applications can be created, deployed and fixed in serverless, it is feasible to schedule specific automated repetitive tasks to enhance quick deployments and reduce the time to market.
Event based computing
With FaaS, cloud providers are able to offer event driven computing methodologies where molecular functions respond to application needs when called for. Therefore, developers can focus only on building codes allowing organizations to escape the conditional time-consuming traditional workflows. It moreover reduces the DevOps costs and lets developers focus on building new features and products.
It is important for organizations to be mindful of the climatic and environmental changes in today’s times. With serverless computing, organizations can operate servers on demand rather than run servers at all times, ensure energy consumption is reduced and help decrease the amount of radiation shed from actual physical servers and data centers.
Serverless is highly scalable and accommodates growth and increase in load without any additional infrastructure. It is researched that 30% of the world’s servers remain idle at any point in time and most servers only utilize 5%-15% of their total capacity, which makes it best to opt for scalable serverless solutions.
However, organizations need to be wary of the downside of serverless computing as well.
- Not Universally suitable
Serverless is best for transitory applications and not efficient if workloads have to be run long-term on a dedicated server
- Vendor lock-in
Applications are entirely dependent on third party vendors with organizations having minimal or no control over them. It is also difficult for customers to change the cloud platform or provider without making changes to the applications.
- Security Issues
Major security issues may arise due to cloud providers conducting multi-tenancy operations on a shared environment in order to use their own resources more efficiently.
- Not ideal for testing
Some of the FaaS services do not facilitate testing of functions locally assuming that developers will use the same cloud for testing.
- Practical difficulties
A scalable serverless platform needs to initialize or stop internal resources when application requests come in or when there have been no requests for a long time. Usually when functions handle such first time requests, they take more time than usual triggering an issue called cold start. Additional overheads may be incurred for function calls if the two communicating functions are located on different servers.
Serverless computing is an emerging technology with considerable scope for advancement. In the future, businesses can anticipate a more unified approach between FaaS, APIs and frameworks to overcome the listed drawbacks.
As of today, serverless architecture gives organizations the freedom to focus on their core business offerings in order to develop a competitive edge over their counterparts. Its high deliverability and multi-cloud support coupled with the immense opportunities it promises, makes it a must-adopt in any organization.