Serverless computing – Function as a Service

Function as a Service (FaaS) allows developers to build and run application packages as functions without having to maintain their own infrastructure.

Serverless architecture means that applications are hosted by a third-party service. There are still servers in serveless just developers do not take care of them. It simplifies deployment of production code. The biggest cloud vendors are Amazon, Google and Microsoft.

Traditional application hosting involves management of server infrastructure. With a serverless architecture, you focus purely on the individual functions in your application code.

Pros

  • No server management is necessary – This will lead to cost reduction
  • Pay as you go – You are only charged for time and memory that you use
  • Quick deployments and updates – Developers can update the application one function at a time¬†
  • Scaling – Serverless application will be automatically scaled if application usage increases
  • Decreased latency – Application is not hosted on an origin server and if it is possible application functions will be run on servers that are closed to the end user
  • Efficiency – Developers can be more focused on business of service

Cons

  • Debugging and monitoring testing – There is less number of tools available than in traditional servers
  • Testing – It is difficult to simulate the same environment as where production code is running
  • Vendor lock-in is a risk – Switching between vendors might be difficult since every vendor provide different features and workflows
  • Performances – As application is not constantly running, booting up the application will take some time and probably degrade performance
  • Security – Serveless is mistakenly considered more secure than traditional infrastructures¬†

When to use? 

Serverless comes up as a good solution when you have a small number of functions that need to be hosted, you want to reduce cost, free up developer resources and scale your application.