What Serverless means
Serverless functions handle tasks like form submissions, payments or API calls and scale up automatically. They reduce server maintenance, though costs and limits need watching for heavy workloads. Many Next.js and Jamstack sites rely on them.
Why it matters for your website
Serverless lets a small site run things like form handling or payment webhooks without paying for a server that sits idle most of the day. It also scales up during busy moments without anyone having to step in.
A hypothetical yoga studio's site uses a serverless function to send each class booking to its email list and calendar, and it only runs when someone books.
Tips
- Use serverless functions for small, focused jobs like forms and webhooks.
- Set spending alerts with your provider so surprise traffic does not surprise your bill.
- Keep secrets like API keys in environment variables, never in front-end code.
Common mistakes
- Assuming there are no servers at all, then ignoring security and limits.
- Forgetting about cold starts and time limits for slow, long-running tasks.

