Homepage > Journal > Serverless – a business without a server
Journal

Serverless – a business without a server

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. Maybe about Serverless Computing, Serverless Technology, or Microservices? Not either? Great! You may find this topic interesting then. 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)
  • less expenses (using serverless solutions means a significant cost reduction).

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

 

We develop applications based on AWS services and AWS components.

Cloud Computing

Let's start with the fact 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, instead of buying more servers, we use space provided by third-party providers (Cloud Service Providers).

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.

Cloud Computing is now offered not only by major providers such as:

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

We have more and 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 are increasingly using it. From small businesses to global corporations.

In the package of cloud services, based on the Serverless idea and technology (e.g., AWS – Amazon Web Services), we will find some very well-known solutions.

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

What is Serverless?

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, requiring the most responsibility and resources (in terms of finances, competence, and organization), are the "worry" of a provider. And to put it even more simply, 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, then the best solution is to use a Serverless option.

aws serverless
AWS Amazon – the world leader in services, serverless solutions.

Serverless architecture is gaining popularity (Amazon Web Services' increasing market share is proof of this) because it's a much more efficient, less costly way to use, develop, implement, and offer software. Serverless allows us to create web applications that are:

  • flexible
  • effective (we can quickly adapt applications to market changes)
  • cheaper
  • innovative.

Serverless services (e.g., AWS Lambda) come with automatic scaling, built-in high availability, 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 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. They're the responsibility of a provider who delivers this service to multiple customers so that the unit price can be reduced.

When using Serverless solutions, we pay only for resources used, not for available options, data, or transfers (Pay-As-You-Go billing model). Sharing hardware, servers, and their infrastructure doesn't in any way reduce the performance of this solution and doesn't translate into a reduction in the quality of the software we want to create.

Serverless (such as Serverless AWS) is used, for example, to develop web applications. It reduces the cost of their production and implementation. At the same time, it allows us to maintain high efficiency.

Outsourcing some of the necessary work and responsibilities to an external provider makes it possible to produce an application in much less time, with much less risk.

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

And that's what Serverless means; customers don't have to manage the servers they use.

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

We can say that three things determined 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, to the benefit of Serverless solutions. The differences, as I mentioned, 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. During the period of inactivity, providers don't charge costs. That means that we get modern tools, solutions, and functions that speed up work at a relatively low investment cost, which in turn reduces the time to produce our own solutions.

Another advantage of Serverless 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 solutions are 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

Every solution has disadvantages or inconveniences. Serverless is 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 the 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, which is why its severity is variable each time.

However, we can either completely eliminate or significantly counter problems with Cold Start. How? I'll explain. Among the services, there is always such a function 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 the over-dependence of a service recipient on a service provider (Vendor Lock-In). Cloud infrastructures can be very different, 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

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 allows 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 absolutely dependent on each other. This approach to the process of 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 not as efficient, flexible, and easy to develop as applications created using Microservices. That is especially true in the case of 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 very important 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:

  • 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 require 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).

Unfortunately, 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.

AWS Amazon

We can say that creating web applications, websites, and chatbots with the help of AWS Amazon is a bit like building a castle with Legos. 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 AWS, Amazon, and Microsoft Azure, Google Cloud Platform has been forming a triangle of leaders that 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. The leading service for building Serverless solutions in Google Cloud is Cloud Functions.

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

 

Summary – Is it worth using the Serverless services?

Serverless services bring tangible and measurable benefits to an organization in three key dimensions of its operation – 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:

  • speed of goal achievement, task execution
  • technological adequacy, it can handle any level of traffic
  • lower risk of starting projects or changes.

Serverless solutions 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