DEV Community

Cover image for What is Serverless Computing? (Definition)
gayenbutala
gayenbutala

Posted on

What is Serverless Computing? (Definition)

Serverless computing is a strategy of providing backend services on an as-used basis. A serverless provider lets users write and deploy code without the hassle of stressing about the underlying infrastructure.

A company that gets backend services from a serverless vendor is billed based on their bill and does not have to reserve and pay for a fixed bandwidth or several servers, as the service scales automatically. Note that physical servers are still used despite the serverless ecosystem, but developers should not be aware of them.

With serverless computing, developers purchase backend services from cloud service vendors on a pay-as-you-go basis, meaning they only pay for the services used. The primary goal of serverless computing is to make it easier for developers to write code designed to run on cloud platforms and perform a specific role.

Serverless does not mean "no servers"

Despite the name, there are definitely servers in serverless computing. "Serverless" describes the developer's experience with those servers - they are invisible to the developer, who doesn't see them, manage them, or interact with them in any way.

How serverless computing works

With serverless computing, developers don't have to manage machine instances in the cloud. Instead, they can run code on cloud servers without configuring or maintaining them. Pricing is based on the amount of resources an application consumes, not pre-purchased capacity units.

Let's assume developers host their applications on cloud-based virtual servers. In that case, they must set up and manage those servers, install operating systems, monitor them, and keep the software up to date.

The pros and cons

Pros

  • Serverless computing is able to increase developer productivity and reduce operational expenses. By offloading the ordinary tasks of provisioning and controlling servers, developers have more time to focus on their applications
  • Serverless helps foster DevOps adoption by reducing the need for developers to describe the infrastructure they need operations to provide explicitly
  • Streamlining application development is even further possible by incorporating core components from third-party BaaS offerings.
  • Operating costs are reduced in a serverless model because you can pay for cloud-based computing time as needed rather than running and managing your own servers all the time

Cons

  • Not activating your server or having the logic controlled by the server can have drawbacks
  • Cloud providers can have strict restrictions on how their components can be interacted with, which affects how flexible and customizable your systems can be. In the event of BaaS environments, developers may be responsible for services whose code is beyond their control
  • Relinquishing control of these elements of your IT stack also extends you up to vendor lock-in. Changing providers will also likely come with upgrading your systems to stick to the new vendor's specifications

What's next for serverless?

Serverless computing continues evolving as serverless providers develop solutions to overcome some drawbacks. One of these disadvantages is cold ignition.

Cold booting was a necessary trade-off for using serverless features until recently. Once the quality is up and running, it will serve subsequent requests much faster (warm starts), but if the process is not requested again for a while, the process will go dormant again. This means the following user will request a cold start of the function.

Top comments (0)