Lộ trình cho người muốn ship API hoặc tool mà không quản máy chủ. Đọc bài kiến thức, rồi làm lab hub, rồi lab chính thức nếu có.A path for people who want to ship an API or a tool without running a server. Read the knowledge lesson, do the hub lab, then the official lab when one exists.ផ្លូវសម្រាប់អ្នកចង់ ship API ឬ tool ដោយមិនដំណើរការ server។ អានមេរៀនចំណេះដឹង រួចធ្វើ lab hub រួច lab ផ្លូវការ បើមាន។
Không cần bài trước. No prerequisites. No prerequisites. Có thể bắt đầu bằng workers.dev. Muốn gắn domain riêng thì học Application Services trước.You can start on workers.dev. Learn Application Services first if you want your own domain.You can start on workers.dev. Learn Application Services first if you want your own domain.
Ý chínhMain ideasMain ideas
App mới chạy trên Worker. Site Git có sẵn thì dùng Pages. Dữ liệu đi qua binding (KV, D1, R2). AI chỉ làm sau khi secret và storage đã ổn.A new app runs on a Worker. An existing Git site uses Pages. Data goes through a binding (KV, D1, or R2). Add AI only after secrets and storage are in place.A new app runs on a Worker. An existing Git site uses Pages. Data goes through a binding (KV, D1, or R2). Add AI only after secrets and storage are in place.
Cách hoạt độngHow it worksHow it works
Worker là một chương trình nhỏ chạy trên mạng Cloudflare. Bạn không thuê máy chủ. Request vào Worker, Worker gọi binding nếu cần, rồi trả lời. Pages giữ file tĩnh từ Git và có thể gọi Function cùng runtime đó.A Worker is a small program that runs on Cloudflare’s network. You do not rent a server. A request hits the Worker, the Worker calls a binding if it needs data, then it answers. Pages keeps static files from Git and can call a Function on the same runtime.A Worker is a small program that runs on Cloudflare’s network. You do not rent a server. A request hits the Worker, the Worker calls a binding if it needs data, then it answers. Pages keeps static files from Git and can call a Function on the same runtime.
Kiến trúcArchitectureArchitecture
Thứ tự học: (1) Worker với C3 và Wrangler, (2) Pages chỉ khi site đã nằm trên Git, (3) chọn KV, D1 hoặc R2, (4) log và Turnstile, (5) Workers AI. Durable Objects, Queues, Workflows và Hyperdrive là nhánh sau, mỗi cái một việc.Learn in this order: (1) a Worker with C3 and Wrangler, (2) Pages only when the site already lives in Git, (3) pick KV, D1, or R2, (4) logs and Turnstile, (5) Workers AI. Durable Objects, Queues, Workflows, and Hyperdrive come later, one job each.Learn in this order: (1) a Worker with C3 and Wrangler, (2) Pages only when the site already lives in Git, (3) pick KV, D1, or R2, (4) logs and Turnstile, (5) Workers AI. Durable Objects, Queues, Workflows, and Hyperdrive come later, one job each.
Sơ đồDiagramsDiagrams
Ứng dụng fullstackFullstack applicationsFullstack 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.
API serverless toàn cầuServerless global APIsServerless 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
Dùng lộ trình này khi bạn muốn ship API, tool nội bộ hoặc MVP mà không quản máy chủ.Use this path when you want to ship an API, an internal tool, or an MVP without running a server.Use this path when you want to ship an API, an internal tool, or an MVP without running a server.
Khi nào không dùngWhen not to use itWhen not to use it
Đừng bắt đầu API mới bằng Pages Functions. Đừng gọi model trước khi secret nằm trên Worker, không nằm trong code gửi xuống trình duyệt.Do not start a new API with Pages Functions. Do not call a model before the secret lives on the Worker, not in code sent to the browser.Do not start a new API with Pages Functions. Do not call a model before the secret lives on the Worker, not in code sent to the browser.
Gói và giới hạnPlans and limitsPlans and limits
Workers Free đủ để học Hello World. Số liệu kiểm tra 2026-11-15: 100.000 request/ngày và 10 ms CPU trên Free. Gói Paid có trần CPU cao hơn; mức phí tối thiểu ghi trên trang pricing, bài này không báo giá. Nguồn: https://developers.cloudflare.com/workers/platform/limits/ https://developers.cloudflare.com/workers/platform/pricing/Workers Free is enough to learn Hello World. Numbers checked 2026-11-15: 100,000 requests per day and 10 ms of CPU on Free. Paid has a higher CPU ceiling; the monthly minimum is on the pricing page, and this lesson is not a quote. Sources: https://developers.cloudflare.com/workers/platform/limits/ https://developers.cloudflare.com/workers/platform/pricing/Workers Free is enough to learn Hello World. Numbers checked 2026-11-15: 100,000 requests per day and 10 ms of CPU on Free. Paid has a higher CPU ceiling; the monthly minimum is on the pricing page, and this lesson is not a quote. Sources: https://developers.cloudflare.com/workers/platform/limits/ https://developers.cloudflare.com/workers/platform/pricing/
Không phải báo giá. Đối chiếu docs và dashboard. Kiểm tra lần cuối: 2026-11-11.Not a price quote. Check the docs and the dashboard. Last checked: 2026-11-11.Not a price quote. Check the docs and the dashboard. Last checked: 2026-11-11.
Thuật ngữGlossaryGlossary
WorkerWorkerWorkeri
Chương trình chạy mỗi khi có request, không cần máy chủ riêng.A program that runs when a request arrives, without a server of your own.A program that runs when a request arrives, without a server of your own.
BindingBindingBindingi
Dây nối từ Worker tới KV, D1, R2 hoặc AI. Tên binding nằm trong wrangler.jsonc.The link from a Worker to KV, D1, R2, or AI. The binding name lives in wrangler.jsonc.The link from a Worker to KV, D1, R2, or AI. The binding name lives in wrangler.jsonc.
Hiểu User → Worker (hoặc Pages) → bindings (KV/D1/R2) → AI Gateway/model và thứ tự xây cho project mới.See User → Worker (or Pages) → bindings (KV/D1/R2) → AI Gateway/model and the build order for a new project.មើល User → Worker (ឬ Pages) → bindings (KV/D1/R2) → AI Gateway/model និងលំដាប់ build សម្រាប់ project ថ្មី។
Kết thúc bạn sẽ cóYou'll finish withពេលបញ្ចប់អ្នកនឹងមាន
Quyết định: app mới bắt đầu bằng Worker + C3; Pages dành cho Git site hiện có; AI/RAG sau khi secret và storage rõ.Decision: new apps start with a Worker + C3; Pages is for existing Git sites; AI/RAG only after secrets and storage are clear.ការសម្រេច: app ថ្មីចាប់ផ្តើមតាម Worker + C3; Pages សម្រាប់ Git site ដែលមានស្រាប់; AI/RAG តែប៉ុណ្ណោះបន្ទាប់ពី secret និង storage ច្បាស់។
Trước khi bắt đầuBefore you beginមុនពេលចាប់ផ្តើម
Node.js bản Current, Active hoặc Maintenance, và tài khoản Cloudflare. Không bắt buộc có domain.A Current, Active, or Maintenance Node.js release, and a Cloudflare account. A domain is optional.A Current, Active, or Maintenance Node.js release, and a Cloudflare account. A domain is optional.
Compute mặc định là Workers. C3 (`npm create cloudflare`) + Wrangler là lối vào.
User → Worker hoặc Pages → KV / D1 / R2 → (tuỳ chọn) AI Gateway → model.
Hub này là ví dụ Pages + Functions + D1. Project mới: Worker trước. Dừng sau Worker đầu tiên vẫn có giá trị.Default compute is Workers. C3 (`npm create cloudflare`) + Wrangler is the on-ramp.
User → Worker or Pages → KV / D1 / R2 → (optional) AI Gateway → model.
This hub is a Pages + Functions + D1 example. New projects: Worker first. Stopping after the first Worker still leaves something useful.Default compute is Workers. C3 (`npm create cloudflare`) + Wrangler is the on-ramp.
User → Worker or Pages → KV / D1 / R2 → (optional) AI Gateway → model.
This hub is a Pages + Functions + D1 example. New projects: Worker first. Stopping after the first Worker still leaves something useful.
Làm theo từng bướcFollow alongធ្វើតាមជំហាន
1Ghi quyết định platform.Write the platform decision.សរសេរការសម្រេច platform។
Nhập: Enter: បញ្ចូល៖ App mới → Worker. Site Git/framework có sẵn → Pages (Phần 2). Cần SQL → D1. File → R2. Flag → KV. AI → sau Phần 1–3.New app → Worker. Existing Git/framework site → Pages (Part 2). Need SQL → D1. Files → R2. Flags → KV. AI → after Parts 1–3.App ថ្មី → Worker។ Site Git/framework ដែលមានស្រាប់ → Pages (Part 2)។ ត្រូវការ SQL → D1។ File → R2។ Flag → KV។ AI → បន្ទាប់ពី Parts 1–3។
Checkpoint: Checkpoint: Checkpoint៖ Không bắt đầu bằng Pages Functions nếu bạn đang tạo API/service mới.Do not start with Pages Functions if you are creating a new API/service.កុំចាប់ផ្តើមតាម Pages Functions ប្រសិនបើអ្នកកំពុងបង្កើត API/service ថ្មី។
Nhét secret vào biến chữ thường hoặc frontend — lộ key.Putting a secret in a plaintext variable or in frontend code leaks the key.ដាក់ secret ក្នុងអថេរអក្សរធម្មតា ឬ frontend លេច key។
Chọn KV cho bảng quan hệ — consistency không đủ.Choosing KV for relational tables — consistency is not enough.ការជ្រើស KV សម្រាប់តារាង relational — consistency មិនគ្រប់គ្រាន់។
MẹoTipsគន្លឹះ
Official learning path: developers.cloudflare.com/learning-paths/workers/Official learning path: developers.cloudflare.com/learning-paths/workers/ផ្លូវសិក្សាផ្លូវការ: developers.cloudflare.com/learning-paths/workers/
Nhãn dashboard Workers & Pages gom một chỗ — tìm Workers để tạo service mới.Dashboard labels group Workers & Pages together — look for Workers to create a new service.Label dashboard ដាក់ Workers & Pages ជាមួយគ្នា — ស្វែងរក Workers ដើម្បីបង្កើត service ថ្មី។
Nguồn sự thật: tài liệu chính thức Cloudflare Developers (diễn giải, không sao chép nguyên văn). Nhãn menu dashboard có thể đổi — chọn mục tương đương gần nhất.Source of truth: official Cloudflare Developer docs (paraphrased, not copied verbatim). Dashboard labels shift — follow the nearest equivalent.ប្រភពពិត: official Cloudflare Developer docs (paraphrased)។ Dashboard labels ផ្លាស់ — តាម equivalent ជិតបំផុត។
Ví dụ chính thức từ Cloudflare Resources — gợi ý theo chủ đề bài học trong lộ trình này.Official examples from Cloudflare Resources — matched to this lesson within this path.Official examples from Cloudflare Resources — matched to this lesson within this path.
Trong phần 2, Kristian mở rộng trên môi trường hiện có được xây dựng trong phần 1, bằng cách cho bạn thấy cách tích hợp các mô hình AI mới và giới thiệu các thông số mới cho phép bạn tùy chỉnh cách images được tạo ra.
In part 2, Kristian expands upon the existing environment built in part 1, by showing you how to integrate new AI models and introduce new parameters that allow you to customize how images are generated.
នៅក្នុងផ្នែកទី 2 Kristian ពង្រីកលើបរិស្ថានដែលមានស្រាប់ដែលបានសាងសង់ក្នុងផ្នែកទី 1 ដោយបង្ហាញអ្នកពីរបៀបបញ្ចូលគំរូ AI ថ្មី និងណែនាំប៉ារ៉ាម៉ែត្រថ្មីដែលអនុញ្ញាតឱ្យអ្នកប្ដូរតាមបំណងពីរបៀបដែល images ត្រូវបានបង្កើត។
Hướng dẫn này cho bạn thấy làm thế nào để xây dựng và xuất bản một ứng dụng Worker tạo mã QR. Phiên bản cuối cùng của codebase có sẵn trên GitHub.
This tutorial shows you how to build and publish a Worker application that generates QR codes. The final version of the codebase is available on GitHub.
Học xong hoặc muốn đổi hướng?Finished or want a different path?Finished or want a different path?
Ba lộ trình độc lập — mỗi lộ trình chỉ gồm bài học và tài liệu trong phạm vi đó. Chọn lộ trình khác khi sẵn sàng, không cần học song song.Three independent paths — each includes only lessons and materials for that scope. Switch when you are ready; no need to study paths in parallel.Three independent paths — each includes only lessons and materials for that scope. Switch when you are ready; no need to study paths in parallel.