Serverless (FaaS – Function as a Service) là mô hình cloud computing nơi developer chỉ viết code (functions), không quản lý server infrastructure; provider tự động provision, scale, và bill theo actual invocations (pay-per-use). AWS Lambda, Google Cloud Functions, Vercel Functions là các giải pháp phổ biến.
Ưu điểm: zero infrastructure management, auto-scaling từ 0 đến hàng nghìn instances ngay lập tức, cost-effective cho sporadic/unpredictable traffic (không trả tiền khi idle), giảm operational overhead.
Nhược điểm: Cold Start latency — Node/Python thường < 100ms P50 nhờ AWS Lambda Provisioned Concurrency và SnapStart (GA 2023 cho Java), nhưng vẫn là vấn đề nếu không dùng tính năng này; execution time limit (Lambda tối đa 15 phút); vendor lock-in; stateless (mỗi invocation độc lập, phải dùng external store); không phù hợp cho long-running processes.
Phù hợp cho: webhooks, scheduled jobs (cron), event-driven processing (S3 trigger, SQS), APIs với variable traffic. Không phù hợp cho: latency-sensitive real-time APIs cần cold start <10ms, stateful applications.