Serverless in simple words: getting the most of it

Reading Time: 8 minutes

Software developers or Platform Managers? Focus on what you do best

Serverless has been generating a lot of buzz in tech and is being a game-changer for many organizations.

But you should be thinking why you should adopt serverless for your business. How could it impact your business in terms of the offering to your customers as well as in competitiveness.

Let’s understand why.

Practically at least one time in our career as software developers we were concerned with researching and learning about third-party solutions to deploy our applications. 

Starting with installing an operating system on the server and other tools needed to get it ready, and finally, run our precious code.

Of course, you need to take into consideration issues such as scalability or fault tolerances, in order to achieve the most robust environment possible.

Spending a lot of  time managing and caring for the server infrastructure, implies not talking about the logic of the business or the problem to be solved during the planning, and having  less time to  concentrate ourselves on the part of our job that makes the big difference: coding .

woman software developer stressed in front of her laptop
Photo by Yan Krukov (Pexels)

Rather than becoming professionals at managing a platform, software developers would rather dedicate their time and resources to applications and development. 

What does it mean? 

Developers end up doing much more than what they really need, and companies are often oversized, with a huge server capacity, which is never used, but they have the same just in case.

Sounds logic? 

Of course not, but this is a much more common situation than many can imagine.

And this is when we dive into our topic: serverless as the new alternative.

Zero administration now is possible! And this is one of the most exciting things about serverless.

But, what is Serverless?

Firstly, we should not be confused with the framework (Serverless Framework) called in the same way.

One thing is an architectural design pattern and the other one is the software that allows us to make this pattern possible.

Serverless was born to take programming to another level, allowing us to have our code distributed in different parts of the world and best of all paying for resources only when we’re using it.

programming code in red and blue
Photo by Rahul Pandit (Pexels)

It is the evolution of cloud-based servers, where the user doesn’t have to worry about provisioning the calculations needed to run, your application can scale up or down easily, and best of all, if you don’t use it you don’t pay (in the most common cases).

Serverless is a new cloud-native model with significant efficiency and productivity gains, since it is intended to be executed based on events, with quite complete security features compared to if we had to do it on our own.

We can see it as a quick solution to have our application working in a production-ready environment with a few lines of code.

In other words, we can say that serverless is a cloud-based architecture that offers the ability to provide on-demand computing.  It is not necessary to spend time managing servers, being able to have 100% of the time to solve the problem. 

The key player: Cloud Providers

Serverless Computing is based on a cloud provider that gives us a ready-to-use architecture, to run any app without worrying about defining what hardware features it should have; such as memory, operating system, or security. 

Amazon Web Services (AWS) AWS Lambda, Google Cloud Functions and Microsoft Azure Functions are all well-known examples of serverless services offered by cloud providers.

There are meaningful differences between the serverless offerings available within AWS, Azure, and Google Cloud, and each gives users distinct options for building serverless applications.

Datadog, Inc., the monitoring and security platform for cloud applications, released back in June the third edition of its The State of Serverless report, which is based on usage data from thousands of companies of all sizes and across all industries in Datadog’s global customer base.

Datadog’s research found that serverless technologies from all major cloud providers—AWS, Azure and Google Cloud Platform (GCP)—have continued to grow.

The report also found that the serverless usage growth trends are similarly robust across all major clouds.

It indicates serverless computing has gone mainstream, now used by more than half of the company’s customers across all of the “Big 3” cloud computing platforms: Amazon Web Services (AWS), Microsoft Azure and Google Cloud Platform (GCP).

Serverless: no servers, really?

When reading Serverless many might think that there is no server physically, but there are still servers involved!.

They are still needed, but they are not user-specified or controlled. Quite misleading I know…

“Just like wireless internet has wires somewhere, serverless architectures still have servers somewhere. What ‘serverless’ really means is that, as a developer you don’t have to think about those servers. You just focus on code.

authors of the Serverless Framework

It implies simply taking it out of the equation of the product we’re providing and focusing on solving the real problem; they are abstracted away from app development and its user, and that’s it.

The cloud platform selected should be responsible for providing, scaling, and maintaining virtual resources and the infrastructure necessary for the code deployment.

On the other hand, developers should only provide the code in the language they  are comfortable with and do it in containers.

Software developer sitting on a couch with a laptop
Photo by EKATERINA BOLOVTSOVA (Pexels)

Serverless applications behave the same way as traditional applications but run on different servers.

However, the user is not responsible for resolving hardware and software issues; routine tasks such as managing the operating system and file system, security patches, load balancing, capacity management, scaling, logging, and monitoring are all offloaded to a cloud services provider. 

“For me, serverless means activities/responsibilities related to servers are no longer on your radar.”

Ajay Nair, Product Manager of AWS Lambda

This new way of operating allows developers to focus on solving the problem of the business itself and not think about storage, security, or scalability; developers can do their work without having to worry about servers at all. 

Benefits and Characteristics of Serverless:

We have been talking broadly about what it is and how the use of this pattern benefits us in our day to day.

Now we are going to go deeply into some benefits and characteristics that we must consider if we go down this path.

  • Serverless is free (or almost free)
Roll of american dollars tightened with band
Photo by Karolina Grabowska (Pexels)

In most cases, having a function under the serverless architecture can be free of charge in most popular cloud providers.

This is not to say that our application does not incur other expenses, the computing prices can be favored by using this architecture.

If we are already thinking of an application with thousands of users, available in a production environment, we will certainly have associated costs.

With serverless architecture, apps are launched only as needed. When an event triggers app code to run, the public cloud provider dynamically allocates resources for that code.

The user stops paying when the code finishes executing, so you only pay for what is needed, not always-on apps and servers as in other cloud computing models.

“A Serverless solution is one that costs you nothing to run if nobody is using it (excluding data storage).”

Paul Johnston, ex AWS Serverless Snr DA

 We just have to think that as long as our application is not running we won’t have a fixed cost. Resource costs are tightly aligned with usage levels.

  • Faster deployment and automatic scalability

You can rapidly deploy apps in hours because there’s no infrastructure construction to weigh you down. This enhances your competitiveness, as it reduces significantly your time to market.

Neon signage showing Time is Precious
Photo by Eunice Lui (Pexels)

With faster deployments also comes ease in scalability.

In addition it can also scale infinitely; serverless apps respond to demand and automatically scale up and down as needed.

  • We don’t have to wait to provide an infrastructure to be online.
wood-dawn-landscape-man
Photo by Tiut Vladut (Pexels)

By using this architecture you are able to have a solution to the business in a short time, giving the development team the possibility to focus on the business problem and not having to take care of definitions in regards to the servers they will need for the project.

DevOps team together with the Developers are responsible just for defining the services to be used for the selected cloud provider; they should not be worried about security updates, licenses, among other factors already mentioned.

You get increased developers productivity to drive business value. Your team is freed up to focus more on application development, UX, etc.

Operational costs are reduced as companies don’t need to have a server installed on-premise, which is often extremely expensive, as well as architectural administration

  •  Separate technologies from solutions
one black chess piece separated from red pawn chess pieces
Photo by Markus Spiske (Pexels)

Sometimes we must develop a certain solution in a particular language or have a security/legal policy that prevents us from physically having our application elsewhere.

This is when we can make use of serverless since we can create an application totally isolated from our main environment that suits that need without affecting other parts of our business.

  • Small and forgetful

When we think about the solution that our function should respond to using this architecture, we must think of something really small, since the response must be as immediate as possible and decoupled from the other steps of our business.

You should consider as well is that it is event-driven and it does not have a persistent state.  

anonymous female showing light bulb
Photo by Anete Lusina (Pexels)

Every time we call a serverless function it will not have information about previous invocations, it starts in a clean environment without the ability to save data temporarily or use it later in another step of our business. We need to store those results.

For this reason, having an application of this type, we must have a database or storage system to persist our operations.

This time we’re not going to go into much detail about it, we just want you to know that each application is born, executes the necessary code and dies (if you’re familiar with Docker containers, it’s something very similar to that concept).

Use cases for serverless

data codes  from serverless computing through eyeglasses
Photo by Kevin Ku (Pexels)

Serverless architecture is ideal for asynchronous, stateless apps that can be started instantaneously. For instance: Backend Services, Web application, Microservices, Batch Processing, Streaming

Likewise, serverless is a good fit when you will face infrequent or unpredictable surges in demand.

In the case of startups, it is a clear example of its use, since it allows us to have a solution online with a cost-efficient approach since in this case, we will not know in advance what the demand for the service we will be offering will be.

We must remember that if we already know that our application will have constant consumption for the whole day, for example, the serverless design may not be the most appropriate.

Final notes

With these article and its examples, you should better understand what serverless is and that you have a variety of options where you can create a serverless based solution.

Before reading this article you thought it could be only done to submit a contact form and send an email to the website administrator? I hope that if you got here you have changed your mind and you have more tools to be able to deal with serverless application.

You should now understand that serverless offers benefits to both business owners and developers

As a business leader as you start to stack up the various benefits of serverless, you should probably find a solid case for making the switch. However, it’s understandable that many C-suites will remain wary or even confused by the new technology, what they should consider to cover all aspects of computing because they don’t want to make mistakes on the get-go.

Or even having everything clear it could be challenging and expertise needed to adopt the serverless model.

This is where Switch Software, our Cloud experts and our Cloud Stack can an be your allies on this journey.

Let’s talk, we will be glad to help and advice you to thrive.

Author

Leave a Reply

Your email address will not be published.