Skip to content
StackDecode
System Design
3. Client-Server ArchitectureAnimated

Serverless Architecture

Run code in managed functions without managing servers.

The idea

You deploy functions that run on demand and scale automatically, and you pay only for execution.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

ClientAPI gatewayFunctionQueueManaged DBStorage
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

A request reaches the API gateway.

step:
1/4
at:
Client
1/10

The green dot is a request moving through the system.

Step by step

  1. 1An event triggers a function
  2. 2The platform starts it
  3. 3It runs and returns
  4. 4The platform scales to zero when idle

Where it is used

Spiky workloads, glue code, APIs.

Watch out for

Cold starts, time limits and vendor lock-in.

Related