What is serverless?

Serverless Computing

What is Serverless Computing? It’s a model where providers allocate the infrastructure for your application, and you just focus on writing the application’s code and business rules. The developer does not have to manage servers, operating systems, or infrastructure. The platform allows developers to write code that responds to events or triggers.

Examples of applications that can be built

  • Web Applications: You can build web applications using serverless architecture by leveraging AWS Lambda and API Gateway. Lambda can process the requests and generate responses, while API Gateway can act as a front-end for the application.
  • Mobile Backends: You can build mobile backends using serverless architecture by using AWS Lambda and Amazon API Gateway to handle requests and responses.
  • Chatbots: You can build chatbots using serverless architecture by using AWS Lambda to process incoming messages and generate appropriate responses.
  • Data Processing: You can use serverless architecture to process large amounts of data by leveraging AWS Lambda and services like Amazon S3, Amazon Kinesis, or Amazon DynamoDB.
  • IoT: You can build IoT applications using serverless architecture by using AWS Lambda to handle events generated by IoT devices and perform actions accordingly.
  • Batch Jobs: You can use serverless architecture to perform batch jobs, such as running ETL (extract, transform, load) pipelines or performing backups of data, by leveraging AWS Lambda and services like Amazon S3 or Amazon DynamoDB.

How might this architecture work for an API?

  • A user sends a request to the API endpoint, such as requesting a list of resources or updating a resource.
  • The request is routed to an AWS API Gateway, which acts as the front-end for the API.
  • The API Gateway triggers an AWS Lambda function, which is responsible for processing the request and generating a response.
  • The Lambda function reads and writes data from a data store, such as Amazon DynamoDB or Amazon S3.
  • The Lambda function generates a response based on the request and data from the data store.
  • The response is sent back to the API Gateway.
  • The API Gateway returns the response to the user.

Here’s a visual representation of this architecture:

What are the advantages?

I believe that when you use this architecture, the best advantages are:

  • Reducing costs
  • Improve scalability and reliability
  • Speed up development because you just need to focus on write the code

In this way, is making it a compelling choice for many applications.

And the disadvantages?

There are important disadvantages that you need to consider:

  • Delay before it start executing
  • Serverless functions have resource limits
  • Sometimes it’s more difficult to make debugging and troubleshooting
  • Network Latency: Because serverless functions are distributed across multiple locations, network latency can be higher compared to traditional server-based architectures.

What are the popular cloud providers?