Serverless Computing
Cloud computing services, specifically the Infrastructure as a Service (IaaS), offer virtual machines that can be deployed (or shut down) on demand and be managed over the Internet. While this saves the effort and cost of investing in your own hardware, there is still the effort and cost, albeit lower, of maintaining the virtual servers.
Serverless Computing takes this a step further where you can deploy the code you want as functions that are deployed on servers managed by the cloud service providers. You do not need to create and manage even a virtual server. The serverless computing solution works such that these functions can be invoked whene required by client applications and the required hardware and software server resources are activated for the time they are required to execute the function and deactivated once the function has completed execution.
Serverless is a misnomer, since servers, albeit virtual, are still required to execute the functions. The term should be more correctly interpreted as not needing to manage servers thus allowing developers to deploy code without needing to perform an any DevOps (server hardware and software provisioning, configuration, and related) tasks.
While there are some benefits to Serverless Computing, the primary one being the reduced dependency on DevOps teams, there are also some possible limitations.
- Writing, deploying, and debugging serverless functions can be a bit cumbersome given that you have to use the service providers interfaces in addition to your local IDEs.
- There can be a delay when a scalable serverless platform handles a function for the first time.
- Serverless functions that run continuously or are called very frequently may cost more than deploying them on a dedicated server.
- Each service provider generally has their own approach and requirements which could make it difficult to migrate from one provider to another if the need arises.
Lambda Functions
For this project we will use serverless computing from AWS, where the service is known as Lambda Functions to deploy the functions for the APIs this solution requires.
With AWS Lambda, you need to set up and configure the service and upload your code, organized as functions, in one of the language runtimes that Lambda supports. We will be using Node.js and Python for the Lambda functions in this solution.