Code in the cloud and dream in the sky!
It is no secret anymore: successful organisations can release new products and services almost instantaneously and multiple times a day. Feature releases such as these can only be realised by companies with agile tools and processes that work. Especially in IT, agile infrastructure, development, and release processes are pivotal to deliver customers’ demands quickly.
Authors: Ekene Attoh & Sonja Noben
It simply is not enough to have an agile organisation if it still takes ages to provision new infrastructure, develop and then deploy new features. One way of achieving this agility from an IT perspective is by making use of serverless computing. This article explains the concept of serverless computing and demonstrates some of its strengths using a concrete fictional example.
What serverless computing is (not)
It goes without saying, serverless computing is not magic! Contrary to what its name attempts to make you think, there are servers involved in serverless computing.
In serverless (cloud) computing, the cloud service provider takes care of provisioning and managing the compute resources needed to run your job. So this model is serverless from your perspective, the client, but not serverless in the strictness sense.
In this model, most cloud service providers give you the flexibility to simply supply your code and run it for you. This means you can go from source code to a live application in literally minutes. Popular serverless computing services are AWS Lambda and Azure Functions.
Another myth that we should dispel is that serverless computing is suitable for any workload. This actually could not be further from the truth. Most cloud providers put certain hard limits on the applications you can run using their serverless models, such as execution time limits and memory allocation. These kinds of limitations mean that serverless computing is only suitable for certain use cases, and you can not run any application of your choosing using serverless computing. That being said, two significant advantages of serverless computing apart from not having to manage the compute yourself are:
- Pricing Model
Most cloud service providers adopt a pay-per-invocation model for serverless computing. This means that you only pay when your code executes. If your application is lying idle for months or even years, you do not incur any charges. You also do not have to carry out maintenance on the server as you would if you were running the application in your own data centres.
Most cloud service providers auto-scale your application. This means that if your application suddenly has a spike in traffic, the provider will simply spin up new instances of your application to handle the load.
GNI Renovation Loans
GNI has seen a recent spike in the popularity of their loans for home renovations. To access money from their renovation loan account, customers have to fill an online form stating the amount they wish to withdraw. They also have to provide an invoice with a valid TVA number, showing an amount that matches the one specified on the online form. It takes about three business days (and even longer on national holidays) for GNI to verify the request and release the customer’s money. This process has proven to be less than ideal for customers, especially when there is a time constraint on paying for goods and services for their renovations. GNI Engineering realised that they could speed up this process by creating a new service which does the following:
- Verify uploaded invoice
- Verify amount requested
- Verify customer loan account
- Request fund release
Management is eager to try this new initiative as recent customer surveys show that this process is the number one reason customer give as possibly getting a loan at a different bank. GNI Engineering has opted to create this new service using serverless computing. This will enable them to ship the feature quickly without going through multiple planning cycles to provide new infrastructure and networking components.
The serverless application is composed of a serverless function which is exposed to clients via an API Gateway. It is able to interface with internal GNI APIs as well as publicly available APIs. The flow of the application is as follows:
- Clients fill the online form stating loan amount and uploading an invoice
- API Gateway proxies the request to the serverless application
- The serverless application checks the invoice and verifies the TVA number is valid using a public (Government) API, and verifies the amount on the invoice matches the amount requested by the customer
- The serverless application verifies the customer is authorised to withdraw that amount using GNI APIs
- The serverless application request funds to be released to the customer’s account using GNI APIs
A system like this can reduce a three business-day process to literally minutes or even seconds when implemented correctly, thus removing the bottle-neck and freeing up resources in GNI for other things.
As you can see, serverless computing can bring agility to businesses by giving them the ability to shorten development and release cycles, providing value to their customers quickly. This model can be even more effective when combined with other methodologies such as Continuous Integration/Continuous Delivery(Deployment).
DigitalScaler can help get you started on your cloud journey, including allowing you to identify suitable use-cases for serverless computing and other paradigms that are available on the cloud and best suited for your business.