Skip to content

Serverless, explained.

Your app runs when someone uses it. The cloud starts copies as requests arrive, and you pay for the time they run.

Scales with requestsNo servers to patch
One day of requestsIllustration
Servers sized for the peakSpike past the servers
  • Requests
  • Serverless capacity, follows requests
  • Fixed servers, sized for the peak
  • Paid for, sitting idle

Serverless vs a traditional deployment.

The servers still exist, but they become the cloud provider's job, and capacity comes per request instead of up front. Here is what changes for your team.

QuestionTraditional serversServerless
Who sets up the servers

You choose server sizes, set them up and keep enough of them running.

The cloud provides computing power when a request arrives. There are no servers to size.

Who patches them

Your team updates the operating system and runtime on every server.

The cloud keeps the machines underneath patched. You update your own code.

How it scales

You add servers ahead of busy periods, or tune autoscaling rules.

More copies of the app start as requests rise and stop as they fall.

What you pay for

Every server, every hour, busy or idle.

The requests served and the time your code runs. Databases and storage are billed as usual.

How deploys work

New code is copied onto running servers, often one at a time.

Each release is a new version. Traffic moves to it once it is ready, and the old one stays for rollback.

When a machine fails

The app is down until the server is repaired or a standby takes over.

Copies run across several data centers in a region, so one failing machine does not take the app down.

When traffic spikes

Pages slow down or fail until more servers come online.

New copies start in seconds. A copy that starts cold answers its first request more slowly.

How a request is served.

Follow one visit from start to finish, including the start-up wait you may have heard about.

  1. A request arrives

    A visitor opens a page, or another app calls your API.

  2. A copy picks it up

    A copy of your app that is already running takes it. If none is free, the provider starts one.

  3. Your code answers

    It runs as it always has: reads the database, renders the page, sends the response.

  4. Then it waits, or stops

    The copy stays ready for the next request, and idle copies stop when traffic drops. SKE can keep some warm.

The trade-offs, and how SKE handles them.

Serverless has real limits. Each one has a well known answer, and SKE sets that answer up for you.

  1. Cold starts

    When a new copy of the app starts, its first request waits while it loads.

    SKE keeps copies warm

    Set how many copies stay ready, so visitors reach one that is already running.

  2. Time limits per request

    A request can only run for so long, so a big import or report can be cut off.

    Long work goes to queues

    Heavy jobs run in the background on their own workers, and recurring tasks run on a schedule.

  3. No lasting local disk

    Each copy of the app is temporary, so files written to its disk disappear.

    State lives in managed services

    Databases, caches and file storage are created for you in your cloud account, or you bring the ones you have.

How warm copies, queues and storage work, in the docs

When it fits, and when it does not.

Most web apps fit well. A few kinds of work need a small change first, and a few are better left on servers.

A good fit

  • Web apps and APIs with traffic that rises and fallsCapacity follows the day, so quiet hours cost little.
  • Apps with background jobs and scheduled tasksQueues and schedules run without a server waiting for work.
  • Staging, QA and preview environmentsThey sit idle most of the day, and you pay for compute only while it runs.
  • Teams and agencies running many appsNo fleet of servers to size, patch and watch for each one.

Think twice

  • One request that runs for many minutesRequests have a time limit. Split the work into queued jobs instead.
  • Apps that must keep files on local diskEach copy is temporary. Files belong in storage or a database.
  • Steady, heavy traffic around the clockServers that are always busy can cost less than paying per request.
Not sure about your app?Describe it to us and we will tell you whether it fits.