The core concept of "Serverless computing" is using Functions as a Service (FaaS) where functions are only triggered on client request. Users will develop functions and simply deploy them without worrying about the underlying infrastructure. Management of this underlying infrastructure (physical servers, its networking, patching etc) is the responsibility of the vendor (cloud service provider) & it's completely transparent to the user.

While using serverless technology, a user doesn't have to pay any upfront cost or reserve any resources, but rather they pay for the resources they consume (pay as you go). For example, a function is created using FaaS to perform addition operation then that will only be charged for the resources it consumed for that particular time frame.

Multiple cloud provider offers their serverless services, such as AWS has lambda functions, Azure has logic apps, functions and so on.

Advantages of Serverless computing :

  • It's cheaper as you pay for only consumed resources (If process is intended to run for a short period of time).
  • Scaling is effortless & managed by cloud vendors.
  • More efficient use of available resources.
  • Independent function development allows it to perform a single task, which makes bug fixes and deployments easier & faster.

Does it mean serverless is without its cons? Nope!

  • It's hard for developers to replicate a serverless environment to see how their code will run.
  • For most of the applications, the backend is handled by a third-party vendor, and if an application stores any sensitive data in backend then that becomes a security risk.
  • Serverless is not meant for long-running processes as they may cost more than running the same deployment on a traditional server approach.

Mostly serverless technologies are used in web applications. These can be deployed on containers or as serverless deployment. Though containers are lighter compared to virtual machines, serverless deployments are all more lighter and simpler to manage, scale.

Let's take an example of the serverless approach. A website wants to host a video streaming platform. So they can host their website in S3 (assuming its static website) and they can use lambda functions to serve video content according to the user request. This eliminates the need of another server to serve users request of videos. Lambda also has the ability to scale up & down really fast according to user requests hence efficient and cost-effective.

Serverless focuses on the business value that is, It frees up the need for investing resources ( time, money, manpower) in infrastructure and manage it, and focuses on delivering better value for the customers.