Lộ trình liên quan Related learning track Related learning track
Developer Platform Developer Platform Developer Platform
Build serverless app trên Cloudflare Build a serverless app on Cloudflare Build a serverless app on Cloudflare
Bạn muốn deploy app nhanh mà không cần quản lý server. You want to deploy an app quickly without managing servers. You want to deploy an app quickly without managing servers.
Kiến trúc gợi ý Suggested architecture Suggested architecture
User → Cloudflare Pages frontend → Pages Function / Worker API → D1 / KV / R2 User → Cloudflare Pages frontend → Pages Function / Worker API → D1 / KV / R2 User → Cloudflare Pages frontend → Pages Function / Worker API → D1 / KV / R2
Sơ đồ tham chiếu (Cloudflare Docs) Reference diagrams (Cloudflare Docs) Reference diagrams (Cloudflare Docs)
Ứng dụng fullstack 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. A practical example of how these services come together in a real fullstack application architecture.
Thuật ngữ: Concepts: Concepts: Workers · Pages · D1 · R2 · KV · Durable Objects
Sơ đồ chính thức ↗ Official diagram ↗ Official diagram ↗ · Serverless Serverless Serverless
API serverless toàn cầu Serverless global APIs Serverless global APIs
Ví dụ kiến trúc API serverless trên Cloudflare — compute và data product (Workers, D1, R2) tương tác thế nào. 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: Concepts: Workers · D1 · R2 · Global API · Edge compute
Sơ đồ chính thức ↗ Official diagram ↗ Official diagram ↗ · Serverless Serverless Serverless
Controls & stack Controls & stack Controls & stack
- Website: Pages (static-first, cực nhanh) Website: Pages (static-first, very fast) Website: Pages (static-first, very fast)
- API: Pages Functions hoặc Workers API: Pages Functions or Workers API: Pages Functions or Workers
- Relational data: D1 Relational data: D1 Relational data: D1
- Config/progress: KV Config/progress: KV Config/progress: KV
- File storage: R2 File storage: R2 File storage: R2
- Bot protection: Turnstile Bot protection: Turnstile Bot protection: Turnstile
- Analytics: Cloudflare Web Analytics Analytics: Cloudflare Web Analytics Analytics: Cloudflare Web Analytics
Lỗi thường gặp Common mistakes Common mistakes
Deploy production trước khi test preview URL Shipping production before testing preview URLs Shipping production before testing preview URLs
Mỗi PR có preview Pages — dùng để QA trước khi merge vào branch production. Each PR gets a Pages preview — use it for QA before merging to the production branch. Each PR gets a Pages preview — use it for QA before merging to the production branch.
Binding D1/KV/R2 thiếu trên production env Missing D1/KV/R2 bindings on production env Missing D1/KV/R2 bindings on production env
Binding có thể khác giữa preview và production trong Pages settings. Kiểm tra cả hai environment. Bindings can differ between preview and production in Pages settings. Verify both environments. Bindings can differ between preview and production in Pages settings. Verify both environments.
Worker chạy logic nặng không phù hợp isolate Heavy logic unsuitable for Worker isolates Heavy logic unsuitable for Worker isolates
CPU-bound dài hoặc dependency lớn có thể cần Containers hoặc tách service — đừng nhồi hết vào một Worker. Long CPU-bound work or huge deps may need Containers or a split service — do not cram everything into one Worker. Long CPU-bound work or huge deps may need Containers or a split service — do not cram everything into one Worker.
Tình huống khác (cùng lộ trình) Other scenarios (same track) Other scenarios (same track)
- Deploy static site với Pages Deploy a static site with Pages Deploy a static site with Pages
- Build ứng dụng AI trên Cloudflare Build AI applications on Cloudflare Build AI applications on Cloudflare
- Build nền tảng SaaS multi-tenant Build a multi-tenant SaaS platform Build a multi-tenant SaaS platform
← Tất cả tình huống lộ trình này ← All scenarios in this track ← All scenarios in this track · Ba nhóm tình huống All three groups All three groups
Next step Next step Next step
Tiếp tục hành trình học của bạn. Continue your learning journey. Continue your learning journey.