Function as a Service (FaaS) is a type of cloud service that allows you to develop, run, and manage reusable functions without needing to build and maintain a backend infrastructure.

DigitalOcean Functions is a FaaS platform.

Functions on FaaS platforms run in stateless and serverless containers. Serverless is an architecture that allows backend web services to be implemented on an as-needed basis. Serverless providers manage your application’s server configuration which minimizes overhead. Serverless functions can “scale to zero” implying that the function or endpoint consumes no resources as long as it is not being accessed.

Functions are stateless because the functions are not dependent on the state in memory or on a related storage disk.

FaaS can offer a more cost effective infrastructure solution as functions are only billed for the time that they’re accessed and running. Other cloud infrastructure pricing models require you to have a server(s) running indefinitely, which means you pay for each hour or minute the infrastructure is running despite whether users are accessing your application or not. With serverless functions, you are only billed for the seconds the function is running.