In serverless architecture, developers deploy backend code in the cloud infrastructure provided by the cloud providers. The key to serverless applications is event-driven architecture — small, decoupled services that publish, consume, or route events. Events are messages sent between services.
Serverless architecture (Baldini et al., 2017)
Serverless is a cloud computing model where you deploy code without managing servers. Instead of provisioning, scaling, and maintaining machines, you write short-lived functions that run on-demand.
In serverless, the cloud provider (like AWS, Google Cloud, or Vercel) handles the infrastructure. When an event triggers your code — an HTTP request, a cron job, a queue message — your function is executed in a managed environment. You only pay for the time your code runs, measured in milliseconds.
Serverless functions are typically:
Under the hood, these platforms often use lightweight containers or WebAssembly modules running inside secure, isolated environments — sometimes even Virtual Machines for compatibility or isolation.
A contact form on your website uses a serverless function to send emails via an API. It only runs when a user submits the form — saving you infrastructure cost and scaling to handle spikes without effort.