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
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.
Đ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ế
| Runtime | Best fit | Watch out |
|---|---|---|
| Function | User waits, streaming matters, bounded input | Needs explicit maxDuration, cancellation, logs |
| Workflow / Queue | Retry, checkpoint, durable steps | Requires idempotency and state design |
| Sandbox | Browser, filesystem, tests, agent workspace | Needs permission and cleanup rules |
• 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
- Vercel Changelog: Functions can now run up to 30 minutes
- Vercel Docs: Configuring Maximum Duration
- Vercel Docs: Fluid Compute
- Vercel Docs: Functions usage and pricing
- Vercel Changelog: Workflow SDK supports TanStack Start
- Vercel Changelog: Sandbox can run up to 24 hours
- Reddit: long-running task questions on Vercel
- Reddit: Vercel runtime limit discussion for LLM apps