Startup

Serverless edge

Vercel functions → Neon Postgres, with Upstash Redis as a cache. Every function invocation can open a database connection.

Serverless edge running in the ServerSloth simulator

What this architecture teaches

Serverless functions scale to hundreds of concurrent instances in seconds. Databases do not: Postgres accepts on the order of 100 connections.

Every concurrent invocation that reaches the database needs a connection, so a modest traffic increase exhausts them. The cache helps, but its misses alone exceed what the database can serve.

This is why serverless stacks use connection poolers (PgBouncer, Neon’s pooler, RDS Proxy) and HTTP-based database drivers.

What to look for

Components

Failure modes you will see