DEV Community

Kimani
Kimani

Posted on

What is a Serverless Architecture?

They say if you can't explain something to a kid you probably don't understand it yourself…right? I am sure they said that LOL!. Okay so in the simplest terms Serverless architecture is a way of building and running things like websites or apps where you don't have to worry about the underlying infrastructure, such as servers, and you can scale and adjust automatically as needed.

Serverless architecture allows applications to be hostless ie not hosted on a server. This means that instead of having to provision and maintain servers, you can simply run your code in response to events and automatically scale as needed.

Examples of services that use serverless architecture include AWS Lambda, Azure Functions, and Google Cloud Functions. These services allow you to run your code in response to events such as an HTTP request, a message on a message queue, or a change in a database, and automatically manage the underlying infrastructure for you. This can include things like automatic scaling, patching, and security.

Well you may ask what is the alternative to a serverless architecture?

The main alternative to serverless architecture is a traditional, or "serverful," architecture. In this approach, you would provision and manage your own servers, or use a virtualized infrastructure, such as a cloud-based virtual machine (VM), to run your applications and services. This approach gives you more control over the underlying infrastructure, but also requires you to manage and maintain that infrastructure, including tasks such as scaling, patching, and security.
In a traditional architecture, you would typically use a web server such as Apache or Nginx to handle HTTP requests and an application server such as Tomcat or Node.js to handle application logic. You would also have to manage the underlying operating system, including security updates, and scaling the infrastructure up or down as needed.
Another alternative to Serverless is Container-based architecture, where you would package your applications and services as container images, and run them on a container orchestration platform such as Kubernetes or Docker Swarm. This gives you many of the benefits of serverless, such as automatic scaling and patching, but also gives you more control over the underlying infrastructure than serverless.

In summary, the main alternative to serverless architecture is traditional, or "serverful," architecture, where you would provision and manage your own servers or use a virtualized infrastructure to run your applications and services. Another alternative is Container-based architecture, which gives you many of the benefits of serverless but also gives you more control over the underlying infrastructure.

I know I have taken you down the little rabbit hole there for a minute but I hope we have come out the other end together alright.
Thank you and stay tuned for more

Top comments (0)