Homepage > Journal > Serverless computing: examples and definition
Journal

Serverless computing: examples and definition

How you like that:

Lambda serverless? Does this term ring a bell? No? What about AWS serverless or Amazon serverless? Do you know what serverless, serverless architecture is? Well then, maybe you've heard of cloud computing services?

No? Okay. How about serverless computing, serverless technology, or microservices? Not either? Great! You may find this topic interesting. Why?

Because we aren't only discussing technology, but primarily services, which from the point of view of a customer (an owner of a web application, B2B web platform, etc.) means:

  • Less trouble (responsibility)
  • Less work (that's usually very expensive)
  • Fewer expenses (using serverless technologies means a significant cost reduction).

So, let's find out what serverless computing is all about.

We develop applications based on AWS services and AWS components.

Serverless cloud computing

Let's start by noting that we've had the opportunity to use cloud services for a long time. Instead of storing files, data, applications, and programs on our own computers, we use space provided by third-party providers (cloud providers) instead of buying more servers.

Cloud computing services also provide the necessary applications, infrastructure, and platform for work (such as programming).

Cloud solutions cover an extensive range of services (e.g., SaaS, FaaS, etc.), come in several types (public, private, hybrid), and offer several ways of migration (e.g., lift and shift).

Clouds provide permanent (no time restrictions) and unlimited (no space restrictions) access and use of their resources. At a relatively low cost, they also provide high data security, advanced technology, up-to-date technology (cloud computing services are constantly being developed), and convenience of use.

In summary, cloud computing considerably simplifies the handling of infrastructure management tasks.

Cloud computing is offered by major cloud providers such as:

  • Amazon (Amazon Web Services — the absolute world leader with more than 30% market share)
  • Google (Google Cloud Platform)
  • Microsoft (Microsoft Azure Functions)

We also have increasingly more opportunities to take up offers and solutions from companies looking for undeveloped niches in these services (e.g., Oracle Cloud, Alibaba Cloud).

In just a few years, the cloud computing service has become so popular that business customers of all sectors, from small businesses to global corporations, are increasingly using it.

In the cloud services package, based on the idea and technology of serverless (e.g., AWS—Amazon Web Services), we will find some well-known and already used ones.

Companies have tested their effectiveness and efficiency at every level and in most industries. Today, they've become standard in many cases (e.g., Amazon EC2, Amazon S3, Amazon DynamoDB).

What is serverless computing?

Serverless computing is a collective name for a range of cloud computing services.

The provider of such a solution, such a service (serverless is both a technology and a service), provides the production environment and is responsible for its performance, scalability, and security.

In other words, the issues that are the most stressful and require the most responsibility and resources (regarding finances, competence, and organization) are the "worries" of a cloud provider.

To create and develop a web application, we don't need to have the following:

  • Our own servers
  • Our own infrastructure

Nor do we need a large number of specialists. The provider also carries out maintenance work. If we don't want to buy servers, bear the cost of their configuration and amortization, and hire specialists responsible for managing them, the best solution is to use a serverless option.

AWS serverless
AWS Amazon — the world leader in services and serverless solutions.

Serverless architecture is gaining popularity (Amazon Web Services' increasing market share is proof of this) because it's much more efficient and less costly to develop, implement, and offer software.

Serverless architecture allows us to create web applications that are:

  • Flexible
  • Efficient (we can quickly adapt serverless apps to market changes)
  • Cheaper
  • Innovative.

Serverless services (e.g., AWS Lambda) come with automatic scaling, built-in high accesibility, and a pay-for-value, pay-as-you-go billing model.

Lambda also makes it possible to run code in response to events coming in from several hundred integrated AWS and SaaS sources.

Serverless computing also relieves us from the need to create, manage, maintain, and adapt infrastructure. In practice, we don't have to worry about the hardware (hardware), let alone the programming (software).

We don't have to concern ourselves with, for example, databases, security, or scalability. A cloud provider's responsibility is to deliver this service to multiple customers so that the unit price can be reduced.

When using serverless technologies, we pay only for the resources used, not for available options, data, or transfers (pay-as-you-go billing model). Sharing hardware, servers, and their infrastructure doesn't reduce the performance of this solution or the quality of the software we want to create.

For example, serverless (such as serverless AWS) is used to develop web applications. It reduces the cost of production and implementation while allowing us to maintain high efficiency.

Outsourcing some of the necessary work and responsibilities to an external cloud provider allows for the production of an application in much less time and with much less risk.

From the point of view of software developers, it's a solution that allows them to focus on the business logic, goals, functionality, usability, aesthetics, and reliability of software rather than on infrastructure security, scalability, or performance.

That's what serverless means; customers don't have to manage their servers.

They don't worry about the environment; they focus primarily on application development, leaving backend and infrastructure issues to the serverless service provider.

Advantages of serverless computing

Three things determine the success of cloud solutions:

  • Costs
  • Convenience
  • Security

That may seem like an oversimplification of the issue, but there is something to it. The cost differences can be mind-boggling compared to the benefits of serverless solutions. As I mentioned, the differences come from sharing solutions with other users and a different billing model.

In the pay-as-you-go billing model, fees are charged only for the effective execution of our code or actual data transfer. Providers don't charge costs during periods of inactivity. That means we get modern tools, solutions, and functions that speed up work at a relatively low investment cost, reducing the time it takes to produce our own solutions.

Another advantage of serverless computing is a shorter application/web platform development cycle. Entering the market quickly with huge competition and a multitude of solutions is a benefit that is hard to beat. Serverless solutions also have the advantage of being better prepared for the implementation and development of an application and its unexpected successes (automatic scalability).

Serverless computing is also much more attractive when looking at costs from the point of view of server load variability on a daily, weekly, or seasonal basis. Traditional billing models are rarely flexible and rarely provide precise charging. They completely fail to grasp and don't reflect their temporal variability. They offer subscription solutions that aren't beneficial from the customer's point of view.

Disadvantages of serverless computing

Every solution has disadvantages or inconveniences. Serverless functions are no exception. With serverless, the problem is the so-called cold start of our code. After a period of downtime, usually at least a few minutes of not using a serverless function, our function is removed from the service cache. Restarting it takes relatively more time than any subsequent startup.

image of the OneDrive website
Microsoft OneDrive. One of the three largest providers of serverless services.

The delay length depends on several factors, but nevertheless, the cold start phenomenon is considered a drawback to this solution. The impact of the cold start may or may not be significant, so its severity varies each time.

However, we can either completely eliminate or significantly counter problems with the cold start. How? I'll explain. Among the services, there is always a serverless functionality that operates infrequently and can't keep itself in a constant state of readiness.

To maintain readiness, we can use WarmUp solutions that trigger a given function at fixed intervals and don't let it "cool down." Of course, this can generate additional costs, and we should use this approach where it's really needed.

Serverless is also often criticized for a service recipient's overdependence on a cloud provider (vendor lock-in). Cloud infrastructures can differ, so switching providers can be cumbersome, time-consuming, and may require resources.

The situation is not hopeless, as open-source frameworks are constantly being developed to solve this problem or make it less burdensome.

Microservices in serverless computing

It's probably not an exaggeration to say that microservices are the essence, the "meat" of services and the approach to developing software and web applications through serverless services.

aws microservices
Amazon AWS — microservices allow us to create digital products consisting of small independent services.

Microservices are a way of creating an application architecture through a set of services that aren't strictly and entirely dependent on each other. This approach to building a digital product isn't new. Until now, it was known as service-oriented architecture. With the popularization and development of serverless services, this approach has returned.

Microservices are an ideal remedy for the problems that characterize monolithic architectures, in which all functions and processes operate as a single service.

While easier to build, monolithic web applications are less efficient, flexible, and easy to develop than those created using microservices. This is especially true for large and complex systems on which multiple development teams work in a web development company.

In the microservices architecture, an application is created as a collection of independent elements or functions responsible for a small piece of the functionality of an entire application. These services communicate with each other through APIs.

Their ability to be implemented without needing consistency in programming languages, databases, hardware, and infrastructure is also a vital feature. Distribution of such services is continuous and automated (continuous delivery/continuous integration).

Microservices are created in the spirit of SRP (Single Responsibility), meaning that a single microservice has one function, purpose, and task.

Further advantages and essential features of microservices include the following:

  • They are business-oriented (they focus more on solving business problems)
  • The flexibility of optimization (individual pieces of our application can be scaled according to current load and intensity of use)
  • Technological flexibility (they can be created using different technologies, languages, or frameworks)
  • Stability and resistance to malfunctions (in a monolithic architecture, the failure of a single component can cause the entire application to crash; in the case of microservices, there is no such problem, as only a given service fails)
  • The optimization of resource consumption
  • More straightforward scalability (services requiring more resources are separated and placed in different locations, and horizontal scaling is much easier than in the case of monoliths)
  • Vast applicability (we can easily reuse a well-written service in another application)
  • Increased discipline and code quality (writing applications requires team members to be more disciplined in maintaining a clear code, writing unit tests, and maintaining documentation)
  • Agile (they're ideal for small, unconnected, independent teams)

The software architecture of microservices has its limitations. It's more complex and requires the following:

  • Meticulous consideration of their division
  • Appropriate configuration
  • It raises many diagnostic problems related to identifying the actual source of an error

Examples of serverless computing

AWS Amazon

We can say that creating serverless applications, websites, and chatbots with the help of AWS Amazon is a bit like building a castle with Lego. The ready-made components, created by developers at Amazon Web Services, allow digital products to be made faster, more efficiently, and at a much lower cost.

The most crucial advantage of AWS Lambda (Lambda is one of the main services within the serverless tools available in AWS Cloud) is also the security of the developed software.

Like any serverless service, Lambda also allows us to produce fully functional software without creating, maintaining, and developing a standalone server infrastructure. Lambda users also highlight its flexibility. Lambda enables us to run code written in different programming languages.

Google Cloud Platform

YouTube, Google's search engine, and Poland's Allegro platform are the most famous examples of services using solutions available through the Google Cloud Platform. That is hardly surprising; the performance of Google's servers is considered the essential advantage of these cloud solutions.

With Amazon AWS and Microsoft Azure, Google Cloud Platform has formed a triangle of leaders that has set the standard for cloud solutions worldwide for years. Google Cloud Platform allows us to create, implement, test, and develop applications ourselves.

The platform offers various services and ready-made products that allow small businesses, large organizations, and corporations to operate. Google Cloud Functions is the leading service for building serverless solutions in Google Cloud.

Alibaba Cloud's website  - a serverless provider
Alibaba Cloud is a serverless service provider, and it is especially recommended for companies operating in China and other Asian markets.

Serverless computing: examples and definition. Summary

Serverless services bring tangible and measurable benefits to an organization in three key operational dimensions: financial, organizational, and security.

Looking at the benefits of cloud solutions from the financial perspective, we gain the following:

  • Payment for the actual use of resources, tools
  • Transformation of capital expenses into operational expenses
  • No amortization costs, employment costs
  • Cheaper implementation of new solutions
  • The ability to develop much more technologically advanced applications

The organizational advantage can be seen in the following:

  • Speed of goal achievement, task execution
  • Technological adequacy: it can handle any level of traffic
  • Lower risk of starting projects or changes

Serverless architectures are also attractive because of the level of security offered, particularly in terms of:

  • Protection against cyber attacks
  • Transferring responsibility for infrastructure security to the service provider
  • Easier creation of microservices.
How you like that:
Journal / JPG / Jarek - avatar
Author: Yaroslav Shatkevich
A programmer with 17 years of experience. Co-founder and CTO of The Story. Fascinated with planning programming works, author of numerous IT and DevOps specifications. Honored by Awwwards, awarded iF Design Award 2018. He works in Python, PHP, React and JavaScript technologies. He created over 90 web and mobile applications and dedicated systems.

Are you interested in working with us? Take a look at our Portfolio