Serverless, the future of computing
Tags: serverless, cloudcomputing, azure, azurefunctions
Published: 2020-09-19 07:08:24

This article is part of [#ServerlessSeptember](https://dev.to/azure/serverlessseptember-2020-content-collection-443k). You'll find other helpful articles, detailed tutorials, and videos in this all-things-Serverless content collection. New articles from community members and cloud advocates are published every week from Monday to Thursday through September.
 
Find out more about how Microsoft Azure enables your Serverless functions at https://docs.microsoft.com/azure/azure-functions/

**Introduction**

The ability to handle data to take certain actions and offer services is paramount in our present reality in the computing world.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/hgxd9qzvid32ihg3lmhb.jpeg)

Over the years, companies have been developing applications and deploying them on servers -on-premises. What this means is that companies will have to figure out how many servers, storage, and database power they need ahead of time, and deploying all of the hardware and software it takes to run the application. Suppose you didn’t want to deal with all of that and were looking for a new model that handled the entire underlying infrastructure deployment for you, serverless is the answer.

Serverless computing is embraced slowly but surely getting the attention of web developers. This type of programming is completely changing the way applications are constructed, distributed, and run. You can build and use apps without thinking about servers.

**What is Serverless Computing?**
Serverless is simply a model where Cloud providers help in running and managing your server, thus, enabling you to focus on the important part of your application.

“Serverless computing is a [cloud computing](https://en.wikipedia.org/wiki/Cloud_computing) [execution model] (https://en.wikipedia.org/wiki/Execution_model) in which the cloud provider runs the [server](https://en.wikipedia.org/wiki/Server_computing), and dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity.  It can be a form of [utility computing](https://en.wikipedia.org/wiki/Utility_computing)” (Wikipedia).

As you can see here, despite its name, the servers still exist. The model doesn’t remove servers; [the software only exists in the public cloud](https://www.colocationamerica.com/blog/future-of-data-centers-in-the-industry).

You can build them for almost any type of backend service or application. What it does is that it eliminates some tasks such as maintenance of operating system, capacity and cluster provisioning, and patching.

There are two types of serverless architecture:
1. Backend as a Service (BaaS) 
2. Function as a Service (FaaS) 

Serverless has different names according to each public cloud provider. Of course, when it comes to serverless offerings, there are “Big Three” which rule the market:
* In Amazon Web Service (AWS), it is known as Lambda
* In Google Cloud, it is known as Cloud Functions
* In Microsoft Azure, it is known as Azure Function

**Let’s look at  Backend-as-a-Service (BaaS) in details**
Similar to FaaS,  Backend-as-a-Service (or BaaS) is a type of serverless technology. Some will contend that BaaS takes it a step further as a NoOps offering. NoOps essentially refers to infrastructure that has been automated to the point that in-house developers have no hand in its operation.

Either way here is an easy way to look at BaaS: imagine your organization is developing a mobile app to connect employees to important information on the go. You might develop the basic application framework in-house, and outsource the functionality. This includes backend processes like access to cloud storage, syncing, and social collaboration.
An organization’s ability to offer backend services that link a mobile application to the cloud is referred to as BaaS.

**Now, Function-as-a-Service (FaaS)**

In the realm of pre-packaged services, Function-as-a-Service is also sometimes known as Framework-as-a-Service or FaaS, falls in between Software-as-a-Service and Platform-as-a-Service.

Think of FaaS as a ready-to-implement framework that can be easily directed to the needs of an organization. For further clarification, SaaS is ready to use out of the box while FaaS is not. However, FaaS does not require the resources to implement that you would need if you were using PaaS.

FaaS can be delivered in customizable templates, for instance, by industry vertical. FaaS uses containers to prime for the rapid deployment of applications on all platforms. For instance, developers can stack containers for scalability or write one container for iOS development and another for desktop applications. Consumers purchase FaaS from third-party vendors who handle server management. They are then charged for actual runtimes instead of pre-allocated units. 

**Benefits of Serverless Computing**

So, how important is Serverless to businesses and people in general?

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ibvtvkll76o86k58tgu0.jpeg)

The [benefits/advantages](https://devops.com/trends-and-benefits-of-serverless-computing/) of Serverless cannot be overlooked as it allows organizations and individuals to do less on-premises cron jobs thereby increasing efficiency and scalability.
* The first and foremost advantage is of not needing any hardware or physical space. When you do not need any infrastructure, you save more money (Capital Expenditure; CAPEX)
* Scalability at its peak - You can scale up or down your server space as per your requirements.
* High availability is another factor that makes having your server in the cloud an ideal solution.
* By paying for what you consume, you enjoy the flexibility of Operational Expenditure (OPEX) because you’re not paying for the server unit but for the consumption rate.
* Developers need to use code constructs that are within the serverless context, so they have to produce code that meets security compliance set by the public cloud providers.

**Why is Serverless the future of cloud computing?**
Serverless is the new paradigm shift in cloud computing where you run your applications and services without **independently provisioning or managing the servers**, hence, serverless. 
                               
With the serverless services, cloud providers such as Amazon Web Services, Microsoft Azure, Google Cloud, and Oracle Cloud Infrastructure (OCI)  are finally delivering on the true promise of the cloud — limitless capacity and automatic scaling with no configurations or set up to manage.

In this model, cloud providers take full responsibility for operating and managing the infrastructure, and in return helping businesses focus on their high valued applications.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/nh6iowr12q4z0yzt0duy.jpeg)

The cloud providers offer serverless compute time by providing “Function as a Service” (FaaS). With FaaS, every time your code is invoked, the FaaS provider runs your code on a server that is provisioned, optimized, and patched with the latest updates.

**Let’s get very Specific, Why Serverless?**
Whether you are a Developer, DevOps, or Product owner you want to take advantage of this modern-day technology serverless for building and architecting your next cloud application.

**Developer:** Just write code
* Write code and deploy your service without ever having to think about the number of machines to provision.
* High availability and horizontal scaling is out of the box with no additional architectural or configuration changes.
* Polyglots choose the optimal language for the problem at hand — Go, Javascript (NodeJS), Python, Java, C# where you don’t have to worry about installing runtimes and dependencies.
* The cost of operating a non-prod environment is very low as you never pay for idle time. Combined with the scale on-demand, this should enable developers to rapidly iterate on their new changes.

**DevOps Engineer:** No administration at all
* No patching/downtime notices — Imagine being 100% compliant with meltdown/spectre while everyone is busy taking servers down, and patching them.
* No more provisioning of resources based on current, peak and anticipated loads. No midnight pagers to handle surge of traffic.
* Run your scheduled cron jobs without the overhead of standing up or maintaining the one-off machines.

**Product Owner:** Offers agility and improved productivity at reduced costs
* FaaS has utility pricing, you pay only when your resource is used and not when resources are provisioned. This could mean significant savings for your business as you will no longer pay for idle resources or orphaned VMs and unused Containers.
* Developers and DevOps have fewer things to worry about leading to accelerated delivery.
* Your application is ready to scale on the first day of deployment.

**Time to go Serverless!**
Serverless computing is the way of the present and future for many types of simple applications. It’s an ideal approach for some organizations because it offers the following benefits:
* Efficient use of resources
* Rapid deployment
* Cost-effective solutions
* Focus on coding
* Familiar programming environment and languages supported
* Increased scalability

For these reasons, it’s easy to see why many companies are keying-in. At the same time, it is pertinent to understand that serverless architecture does have drawbacks that need to be considered before making any changes to your business model.

When you use a third party API the following concerns emerge:

* **Vendor control issues:** Developers give up control, especially in the case of BaaS systems.
* **Security concerns:** These arise as a result of leaving security in the hands of the public cloud providers.
* **Contract lock-in:** This occurs when consumers are unable to break contracts with their vendors.
* **Dependent relationship:** Consumers are dependent on vendors for debugging and monitoring.
* **Limitations:** Limits exist on processes to sidestep the pitfalls of overcomplicated architecture.
* **Response Latency:** Because consumers are only billed for runtime, code is powered down between requests. Response times can vary as a result.

Due to the above-mentioned challenges, serverless computing is often not typically ideal for high-performing, complex application builds.

**Conclusion**
The [future of cloud computing] (https://www.rightscale.com/blog/cloud-industry-insights/cloud-computing-trends-2018-state-cloud-survey#serverless) is serverless. In the coming days, changes will continue to evolve where there will be more architectural patterns to support more types of workloads.

Companies that have adopted serverless are seeing a [significant increase in agility, cost savings as well as operational benefits](https://www.serverless.com/blog/state-of-serverless-community). 

If your organization is already in the cloud, it is in your best interest to start identifying and piloting workloads to leverage serverless. For organizations that are yet to make it to the cloud, this could be your opportunity to [‘lift-n-shift’](https://www.netapp.com/us/info/what-is-lift-and-shift.aspx#:~:text=Think%20strategy%3A%20Lift%20and%20shift,data%20center%20to%20the%20cloud.)  your applications, and its associated data to a cloud platform and re-architect your on-premise solutions to leverage serverless.