Serverless functions

Last updated

Netlify Functions default to a roughly 10-second execution timeout suited to typical API requests, while Background Functions support significantly longer-running tasks (up to 15 minutes) for async work like processing a large file or calling a slow third-party API -- a genuinely distinct function type, not just a configuration toggle on a standard function.

  • Use Background Functions specifically for tasks that would exceed a standard function's timeout, rather than trying to force long-running work into a regular function
  • Keep standard Functions for typical fast API responses, reserving Background Functions for the genuinely slower async cases
  • Monitor Background Function execution time even within its longer limit, since a task creeping toward 15 minutes is a sign it may need a different architecture

Use cases

Intro for serverless use cases

  1. Build API endpoints with Netlify
  2. Process form submissions securely
  3. Transform images on upload
  4. Run background tasks on events
  5. Prototype new features quickly
  6. Experiment with edge functions
  7. Deliver dynamic content with low latency
  8. Integrate with CMS webhooks

Closing note on usage

Need help with Netlify?

Tell us what you're working with. We'll follow up to schedule a free consultation and map out the fastest path to real adoption.

Book a free consultation

Tell us about your team and the software you need help with. We'll follow up to schedule a time to talk.

Open the form on its own page

Get help