DEV Community

KainatSana
KainatSana

Posted on • Updated on

Adopting a serverless mindset ☁️

As technology evolves, so does the way we approach software development and infrastructure management. One of the most recent and exciting developments in the world of cloud computing is the serverless computing model. So let's dive into it.

What is Serverless Computing?

Serverless computing is a model of cloud computing where the cloud provider manages the infrastructure and automatically provisions and manages the compute resources required to run your application. With serverless computing, you don't have to worry about managing servers, scaling infrastructure, or configuring load balancers. Instead, you can focus on building and deploying your application.

Suppose we are building an application where clients are talking to a server via HTTP request. Its hosted on EC2 and has a database for storing data.

Image description

It’s a pretty basic architecture but what will happen when you start getting more traffic?
You can scale vertically to some extend but after crossing instance limit you will have to shift to horizontal scaling by putting load balancer in front of it.

Image description

Then comes the cost management and configuration of auto-scaling groups. For fault tolerance you will have to deploy instances in multiple availability zones.
Then the next configuration and next....

First, you have your own code and all of the custom logic that’s unique to your business or product then comes all this configuration & management.

But there's very little that’s business specific about how you would approach most of these issues.

And this is exactly the kind of ‘undifferentiated lifting’ that can be offloaded to AWS allowing you to focus more on the things that are unique to your particular business.

Serverless relieves customer from all this management so customers can focus more on business logics.

Now lets consider this application again, HTTP requests can now be considered events that have some meaning to our service.
In the middle you have code that handles these events or what we would call “the handler”.

Image description

And then you have some set of backend services that handler interacts with.
This is the exact same configuration that AWS lambda(an AWS serverless offering) uses but lambda is relieving us from all server management with added benefits.

Let's summarize why we need serverless?

  • Serverless relieves us form server management that means you don't have to deploy and manage servers.

  • Provides flexible Scaling by automatically scaling or let you define capacity

  • Provides high availability automatically.

  • There is no idle capacity means you will be charged for only when your function runs.

Conclusion:
Adopting a serverless mindset can bring many benefits to your development team, including reduced infrastructure management, automatic scaling, reduced costs, and increased flexibility. With AWS Lambda, Amazon API Gateway, Amazon DynamoDB, and AWS Step Functions, you can easily build and deploy serverless applications on AWS.

By embracing serverless computing, you can focus on what really matters: building great applications that deliver value to your customers.

Reference Link [https://explore.skillbuilder.aws/learn/lp/92/serverless-learning-plan]

Top comments (0)