These days most of the public Cloud Providers are offering #Serverless services also known as Function as a Service (FaaS). Serverless provider trying delivers more value to the business by minimising the time and resources spend by an organization on underline infrastructure requirement. Serverless provider gives a flexibility to users to write and deploy code instead of worrying about the deployment, scalability and manageability of the underline infrastructure required to run that code. and user is charged based on their computation.
Serverless architecture is not new, In 2008 Google offered Google App Engine ( GAE or simply App Engine) as a PaaS platform for developing and hosting web application on Google Managed Data Centres. Google App Engine primarily supports Go, PHP, Java, Python, Node.js, .NET, and Ruby applications. However AWS accelerated mainstream use of the serverless in 2014 with the introduction of AWS Lambda the first serverless computing offering by a public cloud vendor. Today, the serverless offering is primarily available cloud providers like Google Cloud Functions by Google, Microsoft Azure Cloud Function, IBM Functions but there are great number of serverless providers today supporting various technologies at different price points. Additionally softwares like OpenFasS, Kubeless, Apache OpenWhish, Knative and many more are available for on-premises deployment for the companies that don’t want to go to cloud but want some additional flexibility.
Next question which may come in mind is, how serverless computing is different from containers? When both the architectures are independent of underline infrastructure and enables developers to build applications with more flexibility and less overhead in comparison to traditional servers or virtual machines, what makes them different?
A container contains applications and all the dependencies required to run an application properly. You can run almost any kind of application in a container no matter where it is hosted.
In simple terms we can say, containers are a way to partition a machine or server into multiple environment’s. Each environment runs only one application in its own partition and doesn’t interact with application running in another partition. Every container share’s the machine’s kernel with other container but run as if it were the only system on the machine.
With all the benefits like lesser deployment time, low maintenance, no upfront cost and scalability, there may be scenarios where serverless architecture might not be right fit. Few of them are
Both serverless and containers can serve specific use cases. Serverless architecture is best for the use cases where development speed, cost optimization, manageability and scalability is primary requirements. Serverless is best suited for the apps that need not be always running but should be ready to perform tasks.
On the other hand, Containers are best for complex, long-running applications where you need a high level of control over your environment and you have the resources to set up and maintain the application. Containers are also very useful if you are planning to migrate monolithic legacy applications to the cloud. You can split up these apps into containerized microservices and orchestrate them using a tool like Kubernetes or Docker Swarm.