Compute Compute
Workers Workers
Worker là serverless code chạy trên Cloudflare, thường dùng để build API, middleware, edge logic hoặc backend nhẹ. Hàm serverless chạy tại edge: API, middleware, rewrite request, cron, webhook. Ngôn ngữ JS/TS/Wasm; binding tới KV, D1, R2, AI. A Worker is serverless code on Cloudflare, used for APIs, middleware, edge logic, or lightweight backends. Edge serverless functions: APIs, middleware, request rewrites, cron, webhooks. JS/TS/Wasm; bindings to KV, D1, R2, AI.
Là gì? What is it?
Worker là serverless code chạy trên Cloudflare, thường dùng để build API, middleware, edge logic hoặc backend nhẹ. Hàm serverless chạy tại edge: API, middleware, rewrite request, cron, webhook. Ngôn ngữ JS/TS/Wasm; binding tới KV, D1, R2, AI. A Worker is serverless code on Cloudflare, used for APIs, middleware, edge logic, or lightweight backends. Edge serverless functions: APIs, middleware, request rewrites, cron, webhooks. JS/TS/Wasm; bindings to KV, D1, R2, AI.
Tại sao quan trọng? Why it matters
Bạn chạy code gần user mà không tự quản server — phù hợp API, automation và logic tại edge. Run code close to users without managing servers — great for APIs, automation, and edge logic.
Khi nào nên dùng? When to use it
- Khi bạn cần giải pháp Workers trên Cloudflare thay vì tự host When you need Workers on Cloudflare instead of self-hosting
- Khi team mới bắt đầu và muốn bản free/low-ops để thử When your team is starting out and wants a low-ops free tier to experiment
- Khi tài liệu chính thức gợi ý sản phẩm này cho use case của bạn When official docs recommend this product for your use case
Ví dụ đơn giản Simple example
Ví dụ: một team SME bật Workers cho website onboarding — họ thấy lợi ích ngay mà chưa cần kiến trúc phức tạp. Example: an SME team enables Workers for an onboarding site — they see value quickly without a complex architecture.
Đừng nhầm Workers với toàn bộ nền tảng Cloudflare — đây là một mảnh ghép; kết hợp với DNS/proxy và sản phẩm liên quan. Don’t confuse Workers with the entire Cloudflare platform — it’s one piece; combine it with DNS/proxy and related products.
Hình ảnh trực quan (Cloudflare Docs) Visual guides (Cloudflare Docs)
Fullstack applications Fullstack applications
Ví dụ fullstack trên Developer Platform — Workers/Pages, storage và AI services trong một kiến trúc thực tế. A practical example of how these services come together in a real fullstack application architecture.
Thuật ngữ: Concepts: Workers · Pages · D1 · R2 · KV · Durable Objects
Sơ đồ chính thức ↗ Official diagram ↗ · Serverless Serverless
Serverless global APIs Serverless global APIs
An example architecture of a serverless API on Cloudflare and aims to illustrate how different compute and data products could interact with each other. An example architecture of a serverless API on Cloudflare and aims to illustrate how different compute and data products could interact with each other.
Thuật ngữ: Concepts: Workers · D1 · R2 · Global API · Edge compute
Sơ đồ chính thức ↗ Official diagram ↗ · Serverless Serverless
Sản phẩm liên quan Related products
- Pages Pages
Pages là nền tảng deploy website và full-stack application trên Cloudflare. Deploy site tĩnh và full-stack (Astro, React, v.v.) kèm Pages Functions. Phù hợp frontend + API nhẹ; CI từ Git. Pages is Cloudflare’s platform for deploying websites and full-stack applications. Deploy static sites and full-stack apps (Astro, React, etc.) with Pages Functions. Great for frontends and light APIs; Git CI.
- Durable Objects Durable Objects
Durable Objects dùng cho state nhất quán theo entity (chat room, session, counter, coordination). State có singleton/coordination (chat room, game session, rate limit toàn cục). Mỗi object có storage SQLite và WebSocket. Durable Objects provide consistent per-entity state for coordination (chat rooms, sessions, counters). Stateful coordination (chat rooms, game sessions, global rate limits). Each object has SQLite storage and WebSockets.
Tiếp theo Next step
Quay lại bản đồ sản phẩm hoặc chọn lộ trình học phù hợp. Return to the product map or pick a learning track.