In our an earlier article, we discussed about the limitations and disadvantages of the Serverless Architecture (FaaS). Now, what are the real use cases of Serverless Architecture (FaaS) which a developer should think to use it? A Serverless Architecture helps us by offloading the computational efforts on Cloud Web Services. The functionality, scalability, and security goes to the backend provider. In return, we pay only for the time we use their services rather than to build own backup infrastructure. From the previous discussion on the earlier article – serverless is costly if inappropriately used. The other drawbacks, lack of IDE do limits the application of serverless at least at present. It is not cost effective to run whole WordPress site on serverless architecture. The cost of running WordPress site on serverless architecture will be double or more than running on own server. Furthermore, WordPress does not have all the plugins ready to use on serverless architecture.
Here, the importance of co-usage of microservices for decoupling capabilities going to find using FaaS pretty easy.
Use Cases of Serverless Architecture
When we have static content, rather an application is built on static infrastructure, then serverless can add more than just the cloud storage hosted static infrastructure can do. The easiest example is personal home page, which is the most economical use cases for serverless. We will never have to worry about the infrastructure provisioning or security of the server. Serverless PHP will do more than just an HTML site. Same principle can be applied for the mobile applications. We have to cut the pieces of personal home page to PHP part and HTML part and shift them to serverless and static content serving container. The result will be better than plain GitHub page. Web applications with single page application (SPA) on the frontend becoming common these days.
---
Serverless also good at handling batch scheduler or backup jobs from remote server, pulling the content and pushing it to cloud storage. Biggest advantage of this way of backup, batch scheduler usage is less need to worry about current status of main server. The cron job like works are excellent with serverless.
Extract, Transform and Load (ETL) style workloads often said as great example of situations to use serverless.
Internet of Thing (IoT) is a good field to use serverless. Indeed, many of the serverless providers has some way to add their IoT platform directly to their serverless platform. The illustration for OpenWhisk will give the idea what we are talking about.
Any application, which uses higher computing power only on load, such as a web video editor are suitable to fit inside the serverless architecture.