Serverless & Databases - your options and best practices
summary
Serverless functions hit limits when databases expect long‑lived connections, so practical fixes matter: raise DB max connections (defaults ~100 for Postgres, ~150 for MySQL), throttle function concurrency, add read replicas or shard by user, or move connection creation outside the handler to reuse it (observed cold start drop to ~92 ms on warm invocations). For heavy scale use a queue, a connection pooler like RDS Proxy / PgBouncer, or a RESTish Data API, consider Fauna or NoSQL, and monitor cost and capacity continuously.
AI-written summary · about
chapters (13)
- 0:00Introduction to serverless
- 1:13Why serverless is great
- 5:04Serverless drawbacks and challenges
- 7:11Database connection problems
- 10:31Simple solutions for databases
- 14:07Static connection caching demo
- 16:17Using queues to decouple load
- 18:03Database connection proxying
- 19:31Ditching connections entirely
- 21:39Limitless Aurora overview
- 23:51NoSQL as an alternative
- 26:23Choosing the right approach
- 27:12Q&A session
related talks
06mWhat Is A Serverless Database?
25mServerless Databases: The Good, the Bad, and the Ugly
27mThe world's worst pool party: Connection management with Prisma
50mIntroduction to Serverless Databases for MySQL and PostgreSQL
49mYou Don't Want Serverless
14mMaking Postgres serverless
38mWhat is the right database for you?
51mServerless architectural patterns
