Vercel Functions chạy tới 30 phút: cần quyết định gì trước khi đưa tác vụ AI dài lên serverless

Tech

Ngày 15/6/2026, Vercel công bố Functions cho Node.js và Python có thể chạy tới 30 phút với nhóm Pro và Enterprise. Thời lượng trên 800 giây đang ở beta và cần Fluid Compute. Điều này hữu ích cho LLM streaming, OCR, trích xuất, xử lý media và tự động hóa có giới hạn.

Vercel Functions chạy tới 30 phút: cần quyết định gì trước khi đưa tác vụ AI dài lên serverless
Quy tắc vẫn là kiến trúc: nếu người dùng đang chờ, Function dài kèm streaming có thể phù hợp. Nếu tác vụ cần tiếp tục sau lỗi, retry theo bước hoặc sleep dài, hãy dùng Workflow hoặc Queue. Nếu cần file, browser session, test runner hoặc workspace cho agent, dùng Sandbox.

Điều gì thay đổi

Ngày 15/6/2026, Vercel công bố Functions cho Node.js và Python có thể chạy tới 30 phút với nhóm Pro và Enterprise. Thời lượng trên 800 giây đang ở beta và cần Fluid Compute. Điều này hữu ích cho LLM streaming, OCR, trích xuất, xử lý media và tự động hóa có giới hạn.

Quy tắc vẫn là kiến trúc: nếu người dùng đang chờ, Function dài kèm streaming có thể phù hợp. Nếu tác vụ cần tiếp tục sau lỗi, retry theo bước hoặc sleep dài, hãy dùng Workflow hoặc Queue. Nếu cần file, browser session, test runner hoặc workspace cho agent, dùng Sandbox.

Quyết định thực tế

RuntimeBest fitWatch out
FunctionUser waits, streaming matters, bounded inputNeeds explicit maxDuration, cancellation, logs
Workflow / QueueRetry, checkpoint, durable stepsRequires idempotency and state design
SandboxBrowser, filesystem, tests, agent workspaceNeeds permission and cleanup rules
Checklist

Verify plan, runtime, beta availability and Fluid Compute settings.

Keep provider and database timeouts below the function maximum.

Add progress logs, correlation ids, cancellation and cost alerts.

Use idempotency keys before moving mutations into longer requests.

Rủi ro

Trước khi triển khai, kiểm tra plan, runtime, beta availability, maxDuration, timeout provider/DB, progress log, cancellation, rate limit và cảnh báo chi phí. Timeout dài hơn không thay thế durable state machine.

Community discussions around Vercel timeouts show that developers have long been balancing streaming, queues and separate workers for LLM and long API work. Treat those discussions as product signal, while relying on the official Vercel changelog and docs for the actual limits.

Nguồn