DEV Community

Cover image for What Exactly Is Serverless? A Simple Explanation for Beginners
Babatunde Adeniran
Babatunde Adeniran

Posted on

What Exactly Is Serverless? A Simple Explanation for Beginners

It is not uncommon for people to think that there are no application servers when they hear the term "serverless." A serverless application does not mean the absence of servers. Servers actually exist, but the difference is that you do not have the responsibility of managing them.

In a serverless application, your primary concern is your code and how well it performs. How the servers process your business logic is none of your business because AWS takes care of this. AWS does the heavy lifting by handling the patching and scaling of servers under the hood.

Now, let’s simplify this by explaining it in a beginner-friendly manner.

Serverless, what does it really mean?

Serverless means:

  1. Absence of server provisioning and management: In other words, you will never have to install server updates, handle an EC2 instance, or SSH into a machine.

  2. Automatic application scaling: Your application scaling is handled by AWS regardless of the number of requests you send through.

  3. Cost effectiveness: There are no idle costs as you are only charged for what you use. You don’t get charged if your application doesn’t run.

  4. High availability: Multi-AZ redundancy is taken care of by AWS.

Serverless is just efficient cloud computing.

Building Blocks of Serverless on AWS

There are so many AWS services that can be combined to build serverless applications on AWS. They include:

  • AWS Lambda: This is the heart of serverless on AWS. With this, you can run code without the need to provision servers. You are only saddled with the responsibility of uploading code, and AWS handles running this code in response to events like changes in the database, file uploads, and API requests.

  • API Gateway: This helps us create serverless REST or WebSocket API’s. With these API’s we can do many things, such as triggering lambda functions and handling user authentication. It is a weapon for building backend services.

  • S3: This is for serverless storage. It is an AWS-managed service that helps with the storage of videos and images. It can also be used to host static web pages.

  • AWS DynamoDB: I wrote about DynamoDB and the 'Access Patterns' Mindset in an earlier article. It is a serverless and fully managed database engine that scales automatically and is capable of handling millions of reads and writes every second.

  • AWS SQS and EventBridge: This helps with serverless event management and messaging. With these, we can efficiently build a complex infrastructure that communicates with each other and connects very well. These two make it possible to architect reliable and scalable workflows.

When should you use Serverless?

  • To build APIs

  • To run scheduled tasks

  • For Webhooks

  • To process files

  • For script automation

  • ETL jobs.

Basically, serverless is a great fit for event-driven workload. It is also a great fit for beginners with little or no idea of servers and DevOps processes. It is important to clarify that serverless does not mean you won’t handle architecture decisions, cost tracking, logging, and monitoring. These are still operational responsibilities you have to handle.

Wrapping Up!

Serverless is a big shift in how major cloud applications are built. So, it isn’t just a trend. It focuses greatly on scalability so that you don’t have to worry about capacity provisioning. Serverless focuses on speed and not configuration. It places great focus on cost reduction and business value. As a cloud beginner, it is a good starting point because it naturally teaches you event-driven design, and it allows you to deploy applications without much setup.

With serverless, you build more and do less infrastructure management.

Top comments (0)