← All insights
Vercel & serverless6 min read
What to check before moving backend work to serverless
Serverless can remove infrastructure work, but runtime limits and workload shape still matter.
Match the runtime to the work
Short, stateless request handling is a natural fit. Long-running jobs, heavy startup work and connection-hungry workloads need more care. The platform should simplify the system rather than move its complexity somewhere less visible.
Design for the limits you actually have
Understand execution time, memory, region placement, concurrency and database connections before launch. These are architecture inputs, not details to discover during an incident.
- Measure cold-start sensitivity
- Plan database connection behaviour
- Keep background jobs separate where needed
- Add logs and traces before production
export default defineEventHandler(async (event) => {
const body = await readBody<{ email?: string }>(event)
if (!body.email) {
throw createError({ statusCode: 400, message: 'Email is required' })
}
return await subscribers.add(body.email)
})