---
title: Backends
description: Pick a backend runtime on Vercel, connect it to a frontend and agent tools, run background jobs, and prepare it for production.
url: "https://vercel.com/kb/architecture/backends"
last_updated: 2026-11-02
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# Backends

Pick a backend runtime on Vercel, connect it to a frontend and agent tools, run background jobs, and prepare it for production.

## Choose your runtime

Match the execution model to the workload, then start from a framework or a container.

### Match compute to the workload

Decide whether the work starts from a request, runs continuously, or needs a custom runtime.

- [Backends on Vercel: Python, containers, and Daemons](https://vercel.com/blog/backends-on-vercel-python-containers-and-daemons): See how Python GA, container images, and Daemons fit together, using a video-processing worker as the example.
- [How to choose between Functions, containers, and Daemons on Vercel](/kb/guide/vercel-functions-containers-daemons): Choose Vercel Functions for HTTP requests, container images for custom runtimes, and Daemons for continuous background workers.
- [6 types of backend workloads and where each one runs best](https://vercel.com/i/backend-workload-types): Map interactive APIs, queued jobs, durable processes, cron batches, realtime connections, and compute-heavy work to the right compute.
- [How Interfaze serves 50 million requests a month on Vercel](https://vercel.com/customers/how-interfaze-serves-50-million-requests-a-month-on-vercel): See how Interfaze runs its whole API on Fluid compute, hands model-written code to Sandbox, and fails over between model providers with AI Gateway.

### Start from an API framework

Pick from the zero-config Python and TypeScript frameworks, then ship your app with streaming, middleware, and cron jobs.

- [How to ship a FastAPI app on Vercel](/kb/guide/ship-a-fastapi-app-on-vercel): Deploy a FastAPI app to Vercel with zero configuration. Learn how the Python runtime, Vercel Functions, streaming, middleware, and cron jobs work together.
- [How to ship an Express app on Vercel](/kb/guide/ship-a-express-app-on-vercel): Deploy an Express app to Vercel with zero configuration. Configure response streaming, middleware, cron jobs, the Bun runtime, and observability.
- [Where should you host a Python API?](https://vercel.com/i/where-to-host-python-api): Compare Python API hosts by framework support, dependencies, and execution limits, and decide whether Python and Next.js share a deployment.
- [Backend frameworks on Vercel](https://vercel.com/docs/frameworks/backend): Browse every zero-config Python and TypeScript backend framework, from Express and FastAPI to NestJS and Nitro, each with a one-click deploy.

### Bring a container for native dependencies

Use a Dockerfile when a framework can't express your system libraries or runtime.

- [Run any Dockerfile on Vercel](https://vercel.com/blog/dockerfile-on-vercel): Learn when to choose a Dockerfile over framework detection and how the image builds and autoscales.
- [Deploy Python apps on Vercel using Docker](/kb/guide/vercel-docker-python-apps): Deploy a Dockerized Python application that depends on native software, OCR engines, or small local models, plus a Next.js frontend, on Vercel Services.
- [Container Images](https://vercel.com/templates/container-images/container-images-demo): Deploy Rust, Go, WebAssembly, and Laravel services from their own Dockerfiles behind one domain.

## Connect your services

Deploy frontend and backends as one project, wire them together privately, and expose endpoints to agents as MCP tools.

### Decide how to structure the project

Choose between a single framework, one project with Services, or separate projects in a monorepo.

- [Choosing how to structure your application on Vercel](/kb/guide/structure-your-application): Compare three ways to structure an application on Vercel (a single framework, one project with Services, or separate projects in a monorepo) and learn how to choose based on domains, deploy coupling, and languages.
- [Vercel Services: Run full stack on Vercel](https://vercel.com/blog/vercel-services-run-full-stack-on-vercel): See why Services deploy every frontend and backend together, keep backends private, and connect them through bindings.
- [The Complete Guide to Vercel Services](/kb/guide/vercel-services): Vercel Services let you deploy multiple frontends and backends in one project on a shared domain. Learn how to define services in vercel.json, route requests by path prefix, and connect services with generated environment variables.

### Connect a Next.js frontend to a Python backend

Call a private FastAPI backend from Next.js and review both apps at one Preview URL.

- [How to deploy a Python backend with Vercel Services](/kb/guide/python-backend-on-vercel): Deploy a Python backend with a Next.js frontend on Vercel. Learn how to configure both apps with Vercel Services, use a separate database for each environment, and review changes at a Preview URL.
- [Python on Vercel](https://vercel.com/academy/python-on-vercel): Wire a Next.js storefront to a FastAPI backend through a service binding and deploy both as one project.
- [7 Python backend use cases for Next.js](https://vercel.com/i/python-backend-nextjs-use-cases): See when Python earns its place next to Next.js, from AI tools and document extraction to model predictions, and when a feature should stay in Next.js.
- [eve Agent with Python](https://vercel.com/templates/eve/eve-agent-with-python): Deploy an eve agent with a Next.js frontend and a FastAPI backend as one project with Vercel Services.

### Build an MCP server

Design MCP tools around complete tasks instead of thin API wrappers, then host, secure, and test the server on Vercel.

- [How to perform large-scale data analysis with Vercel Sandbox and MCP](/kb/guide/large-scale-data-analysis-vercel-sandbox-mcp): Use Vercel Sandbox and an MCP server built with \`mcp-handler\` to let AI agents run DuckDB SQL and Python on large datasets without loading data into the model's context.
- [How Vapi built their MCP server on Vercel](https://vercel.com/customers/vapi-mcp-server-on-vercel): See how Vapi rebuilt its voice agent MCP server with Vercel's MCP adapter to support Streamable HTTP, with Fluid compute reusing instances across connections.
- [The second wave of MCP: Building for LLMs, not developers](https://vercel.com/blog/the-second-wave-of-mcp-building-for-llms-not-developers): Design MCP tools around complete user intentions instead of thin API wrappers, so models stop re-solving the same orchestration every conversation.

## Run background work

Move work out of the request lifecycle and plan for retries, coordination, and recovery.

### Hand off independent jobs to a queue

Publish jobs from your API and process them with retries and idempotent consumers.

- [Queues vs. workflows: when should you use each?](https://vercel.com/i/queues-vs-workflows): Decide when independent jobs belong in a queue, when dependent steps need a workflow, and when to combine them.
- [Process background jobs in Python with Vercel Queues](/kb/guide/python-and-vercel-queues): Move slow and failure-prone work out of your Python request handlers, with typed topics, consumer groups, and built-in retries.
- [Python Queue Subscribers Starter](https://vercel.com/templates/python/python-queue-subscribers-starter): Deploy a FastAPI app that publishes to Queues and Python subscribers that store results in Runtime Cache.
- [Python Celery Starter](https://vercel.com/templates/python/python-celery-starter): Run existing Celery tasks with Vercel Queues as the broker and track jobs from a FastAPI dashboard.

### Make dependent steps durable

Use a workflow when later steps depend on earlier results and progress must survive crashes and deploys.

- [A new programming model for durable execution](https://vercel.com/blog/a-new-programming-model-for-durable-execution): Learn how Vercel Workflows keep long-running functions durable without a separate orchestrator.
- [Build durable workflows in Python on Vercel](/kb/guide/python-and-durable-workflows): Keep long-running Python jobs alive through crashes and deploys with steps, retries, sleeps, and hooks.
- [Build Durable Workflows](https://vercel.com/academy/workflow-foundations): Build a pizza order tracker with the Workflow SDK and learn steps, sleeps, hooks, retries, and failures.
- [How Delphi ships 100 times a day with its Python backend on Vercel](https://vercel.com/customers/how-delphi-ships-100-times-a-day-with-its-python-backend-on-vercel): See how Delphi moved its Python backend off AWS, running durable agents and ingestion on Workflows and Queues while shipping 100+ times a day.

### Run always-on workers

Use Daemons when a process must keep pulling work outside the request lifecycle.

- [The Complete Guide to Vercel Daemons](/kb/guide/vercel-daemons): Run background workers with Vercel Daemons. Learn how to deploy container images, configure resources, handle shutdowns, and manage instances.
- [Use Vercel Daemons with eve agents](/kb/guide/vercel-daemons-eve-agents): Connect eve agents to Vercel Daemons to process queued jobs, offload heavy work, and react to events. Includes code, authentication, and shutdown handling.
- [Running background workers on Vercel](/kb/guide/background-workers-on-vercel): Run background jobs on Vercel with waitUntil, Cron Jobs, Queues, Workflows, Daemons, or Sandbox. Compare the options and pick the right one for your workload.
- [Where should you host background workers?](https://vercel.com/i/where-to-host-background-workers): Host continuous background workers on a managed worker platform such as Vercel Daemons, a cloud container service, or a VPS you operate.

## Prepare for production

Manage connections, protect endpoints, roll out safely, and diagnose failures.

### Manage connections and latency

Avoid leaking database connections and find where requests spend time.

- [The real serverless compute to database connection problem, solved](https://vercel.com/blog/the-real-serverless-compute-to-database-connection-problem-solved): Understand why connections leak when functions suspend and how \`attachDatabasePool\` closes idle ones.
- [Connection Pooling with Vercel Functions](/kb/guide/connection-pooling-with-functions): Learn best practices for connecting to relational databases with Vercel Functions and Fluid compute
- [Investigate latency issues and slowness on Vercel](/kb/guide/investigate-latency-issues-and-slowness): Learn how to use Observability to investigate latency issues and slowness on Vercel.

### Control access to your endpoints

Restrict internal routes to known identities and throttle abuse on public ones.

- [Protecting against token theft](https://vercel.com/blog/protecting-against-token-theft): See why rate limits and auth walls don't stop attackers reselling your AI calls, and how a BotID check on every request does.
- [Choose between Vercel Passport and other Deployment Protection methods](/kb/guide/vercel-passport-vs-deployment-protection): Compare Vercel Passport with Vercel Authentication, Password Protection, and Trusted IPs to choose the right Deployment Protection method.
- [Use Vercel Passport with Node.js and Python backends](/kb/guide/vercel-passport-backend-frameworks): Secure internal apps and verify a visitor's identity with Vercel Passport in your backend, with examples for Express, Hono, Nitro, and FastAPI.

### Ship changes safely and diagnose failures

Roll out backend changes gradually and find out why requests fail.

- [How to gradually roll out new versions of your backend](/kb/guide/how-to-gradually-roll-out-new-versions-of-your-backend): Incrementally release updates to your backend to minimize impact of mistakes.
- [How to stop Vercel Functions from timing out](/kb/guide/what-can-i-do-about-vercel-serverless-functions-timing-out): Vercel Functions that time out usually trace back to a few causes. Learn how Fluid Compute fixes most of them and how to handle the edge cases.
- [Logs](https://vercel.com/academy/vercel-foundations/logs): Debug build and runtime errors by filtering function logs, then extend retention with drains.

## Reference Architecture

Choose a stack and work through the decisions behind it, with curated documentation, guides, templates, and courses to help you build.

- [Agent stack](/kb/architecture/agents): Build and operate agents with models, tools, and durable workflows.
- [Web applications](/kb/architecture/web): Choose rendering, data, authentication, and caching approaches.
- [Backends](/kb/architecture/backends): Choose a runtime, connect services, and run background work.

[Browse all stacks](/kb/architecture)
