Serverless architecture is an approach to software design that allows developers to build and run services without having to manage the underlying infrastructure. In a serverless architecture, the cloud provider allocates machine resources on demand, taking care of the servers on behalf of their customers. This means that developers can write and deploy code, while a cloud provider provisions servers to run their applications, databases, and storage systems at any scale.
Despite the name, servers are still used in serverless computing, but the server management is done by the cloud provider. By using a serverless architecture, developers can focus on their core product instead of worrying about managing and operating servers or runtimes, either in the cloud or on-premises. This reduced overhead lets developers reclaim time and energy that can be spent on developing great products which scale and that are reliable.
Some key features of serverless architecture include:
-
Function as a Service (FaaS): One of the most popular serverless architectures is Function as a Service, where developers write their application code as a set of discrete functions.
-
Managed services: Serverless uses the existing managed services available through the public cloud not just as a means to host an application but becomes an intrinsic part of the application and replaces manually configured infrastructure and sometimes even entire libraries of code with the managed services.
-
Scalability: Once deployed, a serverless application will respond to traffic and automatically scale up or down as needed.
Serverless architecture is best used to perform short-lived tasks and manage workloads that experience infrequent or unpredictable traffic. Most developers migrate to serverless in stages, slowly moving some parts of their application to serverless and leaving the rest on traditional servers.