megachangelog
Announcement

How Factory scaled its cloud backend to one billion monthly requests on Vercel

Factory demonstrates how to run an entire cloud backend on Vercel's Next.js platform, handling one billion daily API requests across routes, middleware, and webhooks with 350ms p95 response times. The company uses Droids for self-serve deployments and leverages Vercel's observability and Web Application Firewall for security without dedicated infrastructure.

Factory on Vercel

Non-technical teams were bottlenecked on engineering

Droids hit Vercel's APIs to build and deploy autonomously

Going self-serve exposed Factory's backend to a new category of threat

Observability and WAF handle protection at the network level

  • One billion backend API requests served daily

  • 350ms p95 response time

  • Scaled backend, internal tooling, and security without a dedicated infrastructure team

  • API routes handle the customer-facing API, which launched in its own section of their Next.js app

  • Middleware manages authentication and routing logic across every surface

  • Webhook handlers and log drain pipelines run alongside the web platform, feeding analytics downstream

  • Internal analytics dashboards that pull directly from Factory's analytics databases and software tools

  • Tailored, customer-specific demos that solutions engineers can build and deploy in minutes

  • Custom utilities for one-off internal workflows



mission is to bring autonomy to every phase of the software development lifecycle, from signals to production. Not to replace engineering judgment, but to automate the repetitive work around it, giving engineers more time to focus on the decisions that matter most. To deliver this enterprise-grade platform, Factory adopted their ideal operation model internally: remaining lean and agile by deploying Droids to manage routine workloads, so their engineers could focus strictly on building the product.Factory's

As Factory scaled from a simple web app into a multi-surface platform, serving everyone from individual developers to enterprises with tens of thousands of engineers, their backend scaled alongside them. Today, a single backend on Vercel powers every surface, handling one billion daily requests across API routes, middleware, and webhook handlers, without becoming a separate engineering project. Next.js

Most teams think of Next.js as a frontend framework. Factory runs its entire cloud backend on it:

As Factory grew rapidly, the same backend absorbed every new workload. None of it required standing up separate infrastructure or making a new vendor decision. The only areas that required tuning were memory limits and function duration. Both scaled up without incident. keeps functions warm across requests, removing the cold start penalty that makes traditional serverless a liability for latency-sensitive workloads. The result is a p95 response time of 350ms or below.Fluid compute

Three years in, the trajectory has been smooth growth without the overhead that typically comes with it.

When an account executive needed an internal analytics dashboard or a solution architect needed to deploy a customer prototype, the request went to engineering. Every context switch cost the team shipping product, and they pointed their own product at Vercel to solve the problem.

Factory's non-technical teams now use their own Droids in the Factory Desktop App or CLI to build what they need and deploy directly to Vercel. Droids reach Vercel programmatically to handle configuration, builds, and deployments end-to-end. Engineers set guardrails and review high-stakes decisions, and Droids handle everything else. That workflow produces dozens of deployments a day across the team, and a growing library of internal tools:

When Factory opened self-serve signups, attacks from automated traffic followed. Bots created fraudulent accounts, and requests flooded in from bad IPs. The team needed route-level protection at the network layer quickly.

gives the team visibility into what's hitting the API, surfacing traffic patterns and problematic IPs as they appear. The handles enforcement: the team blocks bad actors with route-level rules, while rate limiting and DDoS protection run continuously beneath the surface.Vercel ObservabilityWeb Application Firewall

Factory uses their own Droids to build Factory. Every internal automation is a future product feature, stress-tested on their own infrastructure first. That loop is about to run at a different scale.

Factory is growing rapidly as it continues to implement and expand its pioneering vision towards autonomous software factories at scale.

Factory is the platform enterprises use to build and operate their software factory: a 24/7 system that continuously turns signals into production software across the entire lifecycle. It's model-agnostic, deploys anywhere from cloud to fully private, and keeps engineers in control as the governance layer. Factory was founded in 2023 by Matan Grinberg and Eno Reyes and is headquartered in San Francisco. About Factory:

Read more

Next.js as a full-stack backend for cloud SaaS: API routes, middleware, and backend logic at scale

Shipping internal tools without pulling engineers off product

Securing a consumer-facing product with minimal security overhead

What's next

case-studynextjsapiscaleserverlesssecurity

Source: original entry ↗