Educate your boss about…serverless architecture

How can we have services hosted on servers without servers?
5 July 2022

Educate your boss about…serverless architecture (Photo by ALAIN JOCARD / AFP)

  • A serverless architecture is a way to build and run applications and services without having to manage infrastructure.
  • With a serverless architecture, you focus purely on the individual functions in your application code while your cloud provider dynamically manages the allocation and provisioning of servers.

For years, organizations have depended on traditional architectures – physical and virtual servers that provide access to services and information. Managementof infrastructure is a complex affair at various stages and requires expertstaff and sometimes, large expenditure. With the advent of cloud computing, especially over the last few years, more organizations are diverting towards a serverless architecture.

Serverless architecture does have servers, it’s just that the using company is not managing them directly any more. Services are created, typically, by a click or two on a provider’s web interface or via an API to the management interface. Creating a database, a storage pool, a web server, an API gateway or a proxy (to name a few examples) becomes simple. Once configured, the administrating user is given all necessary details (database admin credentials, access to required config files, and so on) to run the service without having to consider the underpinnings.

Time was when to run a public-facing service, an organization had to buy a physical machine, host it somewhere, hand install an OS, software and all dependencies, and configure peripheral yet essential software/hardware and network services like a firewall, storage, dedicated network access, and much more. When servers became virtualized, some of this overhead was taken away and managed by VPS providers, or core IT hardware teams. Administrators were handed access to blank slate virtual servers, and built services and applications on top.

Serverless takes the level of abstraction away from bare metal one step further. But it’s not just a step taken to ensure ease of use for administrators. Scalability has always remained a major issue and cause of concern when it comes to bare metal and virtual servers. When traffic ramps up, without some kind of underlying provision, there’s no way to automatically balance the load across several machines, for example. Typical serverless installations will come with the option to allow for peaks (and troughs) in demand, and will scale accordingly. In the back end, software monitoring ensures that extra resources are added when necessary so that the end-user, even at peak demand times, will always get a quick and timely service. A slow app in the hands of an end-user in 2022 is a “piece of garbage.”

What is serverless?

‘Serverless’ therefore mostly describes the developer’s experience. The servers and everything else needed is invisible to the developer, who doesn’t see them, manage them, or interact with them in any way. “Serverless lets developers put all their focus into writing the best front-end application code and business logic they can. All developers need to do is write their application code and deploy it to containers managed by a cloud service provider,” IBM said in a blog posting.

Provisioning the cloud infrastructure required to run the code and scaling the infrastructure up and down as demand changes is, in most ways, a wonderful thing. It does, however, have some potential drawbacks. Vendor lock-in is one possibility, as is the potential for a service to quietly rack up large bills as demnd peaks – or, as can happen, poorly constructed code or architecting gobbles more resources than is optimal. The cloud provider is responsible for all routine infrastructure management and maintenance such as operating system updates and patches, and security management, but users should read the documentation and T&Cs carefully to see exactly what is covered, and what is left to the user.

Typically, serverless architecture offerings fall into two groups, Backend-as-a-Service (BaaS) and Function-as-a-Service (FaaS). BaaS gives developers access to a variety of third-party services and apps, like authentication services, extra encryption, and cloud-accessible databases. With BaaS, serverless functions are usually called through application programming interfaces (APIs).

In general however, when developers refer to serverless, they are more often than not, talking about a FaaS model. Under the hood, most serverless applications and servers are run as containers, which allows providers to offer KPIs on uptime and reliability, thanks to container management systems that can replicate pods and individual containers if they fall over – with no effect visibible to end users.

“The cloud provider spins up and provides the required computing resources on demand when the code executes, and spins them back down again—called ‘scaling to zero’—when execution stops. The billing starts when execution starts, and ends when execution stops; typically, pricing is based on execution time and resources required,” IBM states.

Why should enterprises consider serverless architecture?

For enterprises in general, the primary concern is to reduce the effort and cost involved in managing and maintaining servers on-premise. Especially for small and medium enterprises, it is a daunting task to have in-house hardware. In fact, in a 2019 article by Forbes, it was reported that 80% of IT architects had to scale back ambitions for mobile applications because of the challenges in using data.

While serverless architecture has been around for a while now, lately there has been growing awareness about the benefits, emphasizing process agility and lower operational cost, faster setup, and easier operational management, among others. Serverless helps reduce costs for applications that see inconsistent usage, allowing for a as-and-when use model and not incurring charges when at rest. Businesses living through some highly disruptive times may favor an approach that allows more agility for the business.