What is Serverless Architecture? Why Serverless? Who should use Serverless?

Ufuk Aytaş
5 min readDec 10, 2020

--

Recently, I have been working intensively on Azure services and serverless issues. I decided to create a series of articles for serverless approaches with Azure services. At the beginning of the article series, we will be taking a look at serverless architecture. In the ongoing process, we will examine Azure services and make demos with Azure Functions.

Topics we will examine in the rest of the series;

  • What is a serverless architecture? Why Serverless? Who should use serverless?
  • Azure Functions and Azure Durable functions
  • Running Azure Function in a docker container.
  • What is Azure Service Bus?
  • Using Azure Web API.

Note: I will update this section as new articles become available.

So let’s start…

Why Serverless?

Technological developments changed their needs. Increasing demand, load, and costs accelerated the development of new methods. Also, different services have entered our lives by developing Cloud technology and innovations. Let’s examine these in order now.

Source: alibabacloud.com

As we move to the left of the chart, we need a team with more control and managing the infrastructure. When we go to the right, we are abstracted from the infrastructure and infrastructure services are provided by Cloud providers.

(On-Premise) In the past years, companies were making serious hardware investments for physical servers. Hardware, operating system, network, security issues are under the responsibility of the infrastructure team. With the development of cloud technologies, virtual servers were created with virtualization technologies, and a hardware service leasing model was started.

IaaS (Infrastructure-as-a-Service) The entire infrastructure is moving to the Cloud, but teams are still setting up servers and having to deal with similar tasks. With the changing needs and the development of container technologies, Cloud providers provide services for the management of containers.

CaaS (Container as a Service) With this service, our containers are hosted and managed. The guest operating system is not needed and unnecessary cost items are reduced. Cloud providers manage containers for you.

Paas (Platform as a Service) In the ongoing process, Platform as a Service emerged, which saves some of the server operations. Responsibilities such as operating system, database, and network are under the responsibility of Cloud providers. You can simply select the language you will develop and upload your application.

Faas (Function as a Service) In 2014, Serverless or Faas was announced. A structure where developers are completely isolated from the server and focused only on business has entered our lives. In the serverless approach, functions work event-driven. Therefore, they need a trigger.

What is serverless?

Serverless is a structure where applications are hosted by cloud providers and eliminates the need for developers to manage servers, software, and hardware.

The term serverless gives the perception that our codes will work without a server. However, what is meant here is the responsibility of the infrastructure (needs such as purchasing/leasing/management of servers, scaling, network, operating system maintenance) instead of the responsibility of the developer, Cloud providers. This opens the way for us to build applications and services without infrastructure management.

Serverless architecture allows developers to focus more on the business. Usually, a function works in an event-driven approach. This trigger can be an HTTP call or it can be triggered by a scheduler, bus, queue, or file upload to the service.

We choose how Azure Function is triggered while building the application.

Microsoft Azure, Amazon Web Services (AWS) Lambda, Google Cloud Functions, IBM OpenWhisk are some of the most well-known providers of serverless solutions.

Serverless solutions;

Soure: Cloudflare

In serverless architecture, developers don’t need to worry about scaling to meet intense requests. This process is done automatically upon request. On the cost side, it is based on Pay as you go. To give a real-life example, we buy monthly packages from GSM operators, such as talk, SMS, internet. If we cannot reach these limits or even send no SMS, we pay the package fee in advance. However, the more we consume in the serverless approach, the more invoices are incurred. In this way, we will not be charged for the service we do not use. For example, imagine that you have 15Gb internet and 300 minutes of speech at the end of the month. You are only charged for these …

In the meantime, the application should be developed with a different perspective in the serverless architecture approach. It may not be the right choice for every problem. As developers, we have to decide.

Why serverless architecture?

To host our applications, we need to meet infrastructure needs. This means that it can be a virtual or physical server that needs to be managed, as well as the operating system or web server hosting required for the application to run. For example, we need to meet the operating system and necessary software needs for a VM we have purchased from cloud providers. This costs us time and administration.

However, in serverless architecture, we only focus on your code. Service providers solve hardware needs, operating system, software management for us. We only focus on the code we will write.

Who should use serverless?

Switching to serverless architecture may not be right for every project. Serverless may make sense if you have a small number of business transactions that you need to be hosted. If you want to develop a complex application in serverless architecture, you should design the architecture serverless. Sometimes faulty designs can incur high costs. If you already have an application, it will be more effective to move the application in Lift and shift logic and pass the small parts to serverless step by step.

See you in the next article…

--

--

Ufuk Aytaş

Software Architect & Developer @CorendonDutchAirlines, Husband, Dad, Fishing, Coffee addict :) #Serverless #Cloud, #Azure, #Dotnet