Lộ trình đang học Current learning path Current learning path

Developer Platform Developer Platform Developer Platform

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 ផ្លូវការ បើមាន។

Về trang lộ trình Track home Track home

Phần 3: Chọn storage đúng Part 3: Pick the right storage ផ្នែក 3: ជ្រើសរើស storage ត្រឹមត្រូវ · Bài 1/4 Lesson 1/4 Lesson 1/4

Kiến thức Knowledge Knowledge Khoảng 12 phút About 12 min About 12 min

KV, D1 và R2 KV, D1, and R2 KV, D1, and R2

Nên đọc trước: Read first: Read first: Worker, C3 và Wrangler Workers, C3, and Wrangler Workers, C3, and Wrangler

Ý chính Main ideas Main ideas

Ba chỗ giữ dữ liệu, ba việc khác nhau. KV giữ cặp khóa và giá trị. D1 là SQL nhỏ. R2 giữ file. Chọn sai thì app chạy được lúc demo và hỏng lúc thật. Three places to keep data, three different jobs. KV keeps a key and a value. D1 is a small SQL database. R2 keeps files. The wrong pick works in a demo and breaks for real. Three places to keep data, three different jobs. KV keeps a key and a value. D1 is a small SQL database. R2 keeps files. The wrong pick works in a demo and breaks for real.

Cách hoạt động How it works How it works

KV đọc nhanh theo một key: cờ tính năng, session ngắn, bộ đếm. Nó không hợp giao dịch cần đúng từng dòng. D1 dùng câu SQL và migration. R2 giống kho file: PDF, ảnh, upload. Cả ba gắn vào Worker bằng binding. KV reads fast by one key: a feature flag, a short session, a counter. It is a poor fit for a transaction that must get every row right. D1 uses SQL and migrations. R2 is a file store: PDFs, images, uploads. All three attach to a Worker with a binding. KV reads fast by one key: a feature flag, a short session, a counter. It is a poor fit for a transaction that must get every row right. D1 uses SQL and migrations. R2 is a file store: PDFs, images, uploads. All three attach to a Worker with a binding.

Kiến trúc Architecture Architecture

Worker không giữ dữ liệu giữa các lần chạy. Binding là cửa ra ngoài. Một app thường dùng một kho chính: SQL thì D1, file thì R2, cờ thì KV. Đừng nhét bảng quan hệ vào KV. A Worker does not keep data between runs. A binding is the door out. An app usually has one main store: SQL in D1, files in R2, flags in KV. Do not put a relational table in KV. A Worker does not keep data between runs. A binding is the door out. An app usually has one main store: SQL in D1, files in R2, flags in KV. Do not put a relational table in KV.

Khi nào dùng When to use it When to use it

Đọc bài này trước khi tạo namespace, database hoặc bucket. Lab hub ở sau chỉ thao tác đúng loại bạn đã chọn. Read this before you create a namespace, a database, or a bucket. The hub lab after this page only operates the kind you already chose. Read this before you create a namespace, a database, or a bucket. The hub lab after this page only operates the kind you already chose.

Khi nào không dùng When not to use it When not to use it

Đừng dùng KV cho số dư tiền hoặc đơn hàng. Đừng dùng R2 cho một dòng cấu hình nhỏ. Đừng dùng D1 làm kho file. Do not use KV for a balance or an order. Do not use R2 for one small config line. Do not use D1 as a file store. Do not use KV for a balance or an order. Do not use R2 for one small config line. Do not use D1 as a file store.

Gói và giới hạn Plans and limits Plans and limits

Số trên Free, kiểm tra 2026-11-15. KV: 100.000 lần đọc/ngày, 1.000 lần ghi/ngày, 1 GB. D1: 5 triệu dòng đọc/ngày, 100.000 dòng ghi/ngày, 5 GB, 10 database. R2: 10 GB-tháng, 1 triệu thao tác Class A và 10 triệu Class B mỗi tháng. KV và D1: vượt hạn Free thì lời gọi lỗi. R2: cần bật gói R2 qua bước checkout trong dashboard; phần vượt free tier bị tính phí. Bài này không báo giá. Nguồn: https://developers.cloudflare.com/kv/platform/pricing/ https://developers.cloudflare.com/d1/platform/pricing/ https://developers.cloudflare.com/r2/pricing/ https://developers.cloudflare.com/r2/get-started/ Free-plan numbers, checked 2026-11-15. KV: 100,000 reads per day, 1,000 writes per day, 1 GB. D1: 5 million rows read per day, 100,000 rows written per day, 5 GB, 10 databases. R2: 10 GB-months, 1 million Class A operations and 10 million Class B operations per month. KV and D1: past the Free cap, calls fail. R2: you turn on an R2 subscription through the dashboard checkout flow; usage above the free tier is billed. This lesson is not a quote. Sources: https://developers.cloudflare.com/kv/platform/pricing/ https://developers.cloudflare.com/d1/platform/pricing/ https://developers.cloudflare.com/r2/pricing/ https://developers.cloudflare.com/r2/get-started/ Free-plan numbers, checked 2026-11-15. KV: 100,000 reads per day, 1,000 writes per day, 1 GB. D1: 5 million rows read per day, 100,000 rows written per day, 5 GB, 10 databases. R2: 10 GB-months, 1 million Class A operations and 10 million Class B operations per month. KV and D1: past the Free cap, calls fail. R2: you turn on an R2 subscription through the dashboard checkout flow; usage above the free tier is billed. This lesson is not a quote. Sources: https://developers.cloudflare.com/kv/platform/pricing/ https://developers.cloudflare.com/d1/platform/pricing/ https://developers.cloudflare.com/r2/pricing/ https://developers.cloudflare.com/r2/get-started/

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ữ Glossary Glossary

  • KV KV KV

    Kho khóa-giá trị. Đọc theo một key, không phải bảng SQL. A key-value store. You read by one key, not with a SQL table. A key-value store. You read by one key, not with a SQL table.

  • Migration Migration Migration

    File SQL đổi cấu trúc D1. Chạy local rồi mới chạy remote. A SQL file that changes the D1 shape. Run it locally, then on the remote database. A SQL file that changes the D1 shape. Run it locally, then on the remote database.

Mở bảng thuật ngữ → Open the glossary → Open the glossary →

Làm lab Do the lab Do the lab

Lab nằm ở bài riêng. Đọc ý chính trước, rồi mở lab. Labs live on their own pages. Read the main ideas, then open a lab. Labs live on their own pages. Read the main ideas, then open a lab.

Ví dụ triển khai (Cloudflare Resources) Deployment examples (Cloudflare Resources) Deployment examples (Cloudflare Resources)

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.

Tutorial Tutorial Tutorial Developer Platform Developer Platform Developer Platform

Thêm React form với Formspree Add a React form with Formspree បន្ថែមទម្រង់ប្រតិកម្មជាមួយ Formspree

Tìm hiểu cách thêm React form với Formspree, một dịch vụ back-end xử lý và lưu trữ form.

Learn how to add a React form with Formspree, a back-end service that handles form processing and storage.

ស្វែងយល់ពីរបៀបបន្ថែមទម្រង់ React ជាមួយ Formspree ដែលជាសេវាកម្មផ្នែកខាងក្រោយដែលគ្រប់គ្រងដំណើរការ និងការផ្ទុកទម្រង់។

Tìm hiểu thêm Learn more ស្វែងយល់បន្ថែម
Tutorial Tutorial Tutorial Developer Platform Developer Platform Developer Platform

Thêm một site Add a site បន្ថែមគេហទំព័រ

Hướng dẫn này sử dụng Pulumi Infrastructure as Code (IaC) để làm quen với vòng đời quản lý tài nguyên.

This tutorial uses Pulumi infrastructure as code (IaC) to familiarize yourself with the resource management lifecycle.

ការបង្រៀននេះប្រើហេដ្ឋារចនាសម្ព័ន្ធ Pulumi ជាកូដ (IaC) ដើម្បីស្គាល់ខ្លួនអ្នកជាមួយនឹងវដ្តជីវិតនៃការគ្រប់គ្រងធនធាន។

Tìm hiểu thêm Learn more ស្វែងយល់បន្ថែម
Tutorial Tutorial Tutorial Developer Platform Developer Platform Developer Platform

Thêm HTML form với Formspree Add an HTML form with Formspree បន្ថែម HTML form ជាមួយ Formspree

Học cách thêm HTML form với Formspree — dịch vụ back-end xử lý và lưu dữ liệu form.

Learn how to add an HTML form with Formspree, a back-end service that handles form processing and storage.

រៀនរបៀបបន្ថែម HTML form ជាមួយ Formspree — សេវា back-end ដែលដំណើរការ និងរក្សាទុកទិន្នន័យ form។

Tìm hiểu thêm Learn more ស្វែងយល់បន្ថែម
Tutorial Tutorial Tutorial Developer Platform Developer Platform Developer Platform

Thêm mô hình AI mới vào sân chơi của bạn (Phần 2) Add New AI Models to your Playground (Part 2) បន្ថែមម៉ូដែល AI ថ្មីទៅក្នុងសួនកុមាររបស់អ្នក (ផ្នែកទី 2)

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 ត្រូវបានបង្កើត។

Tìm hiểu thêm Learn more ស្វែងយល់បន្ថែម

Xem thêm ví dụ trong lộ trình → More examples in this path → More examples in this path →

Tài liệu Cloudflare Developers Cloudflare Developer docs Cloudflare Developer docs

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.

Chưa chắc — làm bài chọn lộ trình Not sure — use the path selector Not sure — use the path selector · So sánh cả ba lộ trình Compare all three paths Compare all three paths