CDN CDN CDN Cơ bản Entry កម្រិតចាប់ផ្តើម ~7 phút đọc · ~937 từ ~7 min read · ~738 words

DNS và đám mây cam: proxy Cloudflare giải thích đơn giản DNS and the orange cloud: Cloudflare proxy explained simply DNS and the orange cloud: Cloudflare proxy explained simply

Đám mây cam nghĩa là traffic website đi qua mạng Cloudflare trước khi tới server gốc — bạn nhận CDN, bảo vệ và nhiều tính năng hơn so với chỉ trỏ DNS. The orange cloud means site traffic passes through Cloudflare’s network before your origin — you get CDN, protection, and more than DNS-only pointing. The orange cloud means site traffic passes through Cloudflare’s network before your origin — you get CDN, protection, and more than DNS-only pointing.

Hình 1: Tổng quan luồng dữ liệu

Thiết kế kiến trúc hiệu năng web phân tán Designing a distributed web performance architecture Designing a distributed web performance architecture

Pattern L7: data flow, cache tiers, deployment models — giảm latency và cải thiện Core Web Vitals. A prescriptive pattern for building a Cloudflare-based L7 performance architecture that reduces latency, raises cache efficiency, and improves Core Web Vitals. A prescriptive pattern for building a Cloudflare-based L7 performance architecture that reduces latency, raises cache efficiency, and improves Core Web Vitals.

Thuật ngữ: Concepts: Concepts: CDN · Cache · Core Web Vitals · Smart Shield · Argo

Sơ đồ chính thức ↗ Official diagram ↗ Official diagram ↗ · Phân phối nội dung Content Delivery Content Delivery

DNS là gì — và vì sao nó không phải “toàn bộ website”? What DNS is — and why it is not “the whole website” What DNS is — and why it is not “the whole website”

DNS (Domain Name System) giống cuốn danh bạ của Internet: khi ai đó gõ tên miền của bạn, DNS trả lời “máy chủ nào đang phục vụ site này”. Đó là bước đầu tiên mỗi lần mở trang — nhưng DNS chỉ chỉ đường, không tự làm website nhanh hay an toàn hơn. DNS (Domain Name System) is the Internet’s phone book: when someone types your domain, DNS answers “which server serves this site.” That is the first step every visit — but DNS only points the way; it does not by itself make a site faster or safer. DNS (Domain Name System) is the Internet’s phone book: when someone types your domain, DNS answers “which server serves this site.” That is the first step every visit — but DNS only points the way; it does not by itself make a site faster or safer.

Trên Cloudflare, bạn thêm bản ghi DNS (thường là A hoặc CNAME) cho hostname như www hoặc api. Điểm quan trọng: mỗi bản ghi có thể ở chế độ DNS only (đám mây xám) hoặc proxied (đám mây cam). Hai chế độ này thay đổi đường đi của request — không chỉ địa chỉ IP hiển thị trong danh bạ. On Cloudflare you add DNS records (usually A or CNAME) for hostnames like www or api. The key detail: each record can be DNS-only (grey cloud) or proxied (orange cloud). Those modes change how requests travel — not only the IP shown in the directory. On Cloudflare you add DNS records (usually A or CNAME) for hostnames like www or api. The key detail: each record can be DNS-only (grey cloud) or proxied (orange cloud). Those modes change how requests travel — not only the IP shown in the directory.

Nhiều người mới nghĩ “đã trỏ DNS qua Cloudflare là xong”. Thực tế, nếu mọi bản ghi vẫn xám, bạn chỉ dùng Cloudflare như DNS manager: traffic đi thẳng tới origin, không qua cache edge, WAF hay lớp chống DDoS tích hợp. Bài trên blog.cloudflare.com về DNS và CDN thường nhấn mạnh sự khác biệt này. Many beginners think “I pointed DNS to Cloudflare, done.” In practice, if every record stays grey, you only use Cloudflare as a DNS manager: traffic goes straight to origin, without edge cache, WAF, or built-in DDoS layers. Cloudflare Blog posts on DNS and CDN often stress this distinction. Many beginners think “I pointed DNS to Cloudflare, done.” In practice, if every record stays grey, you only use Cloudflare as a DNS manager: traffic goes straight to origin, without edge cache, WAF, or built-in DDoS layers. Cloudflare Blog posts on DNS and CDN often stress this distinction.

Ví dụ thực tế: blog cá nhân chỉ cần trỏ tên miền, chưa cần proxy — có thể để xám. Còn cửa hàng online, form đăng ký workshop, hoặc API công khai thường nên bật cam để hưởng lợi từ mạng toàn cầu của Cloudflare. Real example: a personal blog that only needs domain pointing might stay grey. An online store, signup form, or public API usually benefits from orange-cloud proxying on Cloudflare’s global network. Real example: a personal blog that only needs domain pointing might stay grey. An online store, signup form, or public API usually benefits from orange-cloud proxying on Cloudflare’s global network.

Hình 1: Tổng quan luồng dữ liệu

Thiết kế kiến trúc hiệu năng web phân tán Designing a distributed web performance architecture Designing a distributed web performance architecture

Pattern L7: data flow, cache tiers, deployment models — giảm latency và cải thiện Core Web Vitals. A prescriptive pattern for building a Cloudflare-based L7 performance architecture that reduces latency, raises cache efficiency, and improves Core Web Vitals. A prescriptive pattern for building a Cloudflare-based L7 performance architecture that reduces latency, raises cache efficiency, and improves Core Web Vitals.

Thuật ngữ: Concepts: Concepts: CDN · Cache · Core Web Vitals · Smart Shield · Argo

Sơ đồ chính thức ↗ Official diagram ↗ Official diagram ↗ · Phân phối nội dung Content Delivery Content Delivery

Đám mây cam thay đổi tốc độ và bảo mật thế nào? How the orange cloud changes speed and security How the orange cloud changes speed and security

Khi proxied, người dùng không nói chuyện trực tiếp với IP origin của bạn. Request đi qua điểm edge Cloudflare gần họ: có thể trả nội dung từ cache, áp quy tắc bảo mật, hoặc chuyển tiếp có kiểm soát về server gốc. Origin IP cũng ít lộ hơn trên Internet công cộng. When proxied, visitors do not talk directly to your origin IP. Requests hit a nearby Cloudflare edge: content may be served from cache, security rules may apply, or traffic is forwarded in a controlled way to origin. Your origin IP is also less exposed on the public Internet. When proxied, visitors do not talk directly to your origin IP. Requests hit a nearby Cloudflare edge: content may be served from cache, security rules may apply, or traffic is forwarded in a controlled way to origin. Your origin IP is also less exposed on the public Internet.

Về tốc độ: file tĩnh (ảnh, CSS, JS) có thể được cache gần người dùng — trang mở nhanh hơn, origin đỡ tải. Về bảo mật: WAF, rate limiting, và lớp chống DDoS có thể hoạt động trước khi request chạm máy chủ của bạn. Đó là lý do “bật cam” thường là bước đầu trên lộ trình Application Services của hub này. For speed: static files (images, CSS, JS) can be cached near users — pages feel faster and origin load drops. For security: WAF, rate limiting, and DDoS protection can act before requests reach your server. That is why orange-cloud is often step one on this hub’s Application Services track. For speed: static files (images, CSS, JS) can be cached near users — pages feel faster and origin load drops. For security: WAF, rate limiting, and DDoS protection can act before requests reach your server. That is why orange-cloud is often step one on this hub’s Application Services track.

Proxy không thay thế việc bạn cập nhật phần mềm, sao lưu, hay cấu hình HTTPS đúng trên origin. Nó thêm một lớp mạnh ở “cổng vào” — giống có bảo vệ và quầy phân phối trước kho hàng thật. Proxying does not replace patching software, backups, or correct HTTPS on origin. It adds a strong layer at the front door — like security and a distribution desk before the real warehouse. Proxying does not replace patching software, backups, or correct HTTPS on origin. It adds a strong layer at the front door — like security and a distribution desk before the real warehouse.

DNS only vs proxied: khi nào dùng cái nào? DNS-only vs proxied: when to use which DNS-only vs proxied: when to use which

DNS only (xám): Cloudflare chỉ trả lời câu hỏi DNS; traffic đi thẳng origin. Phù hợp hostname không cần HTTP proxy — ví dụ mail (MX), một số subdomain chỉ dùng cho dịch vụ bên thứ ba, hoặc giai đoạn thử nghiệm khi bạn chưa sẵn sàng đổi đường đi traffic. DNS-only (grey): Cloudflare only answers DNS; traffic goes straight to origin. Good for hostnames that should not be HTTP-proxied — e.g. mail (MX), some third-party subdomains, or a trial phase before you change traffic paths. DNS-only (grey): Cloudflare only answers DNS; traffic goes straight to origin. Good for hostnames that should not be HTTP-proxied — e.g. mail (MX), some third-party subdomains, or a trial phase before you change traffic paths.

Proxied (cam): HTTP/HTTPS qua Cloudflare. Dùng cho website, API công khai, và hầu hết hostname mà bạn muốn cache + bảo vệ. Lưu ý: một số cổng hoặc giao thức đặc biệt có thể cần cấu hình thêm hoặc không proxy được — đọc docs trước khi bật cam cho mọi thứ. Proxied (orange): HTTP/HTTPS through Cloudflare. Use for websites, public APIs, and most hostnames where you want cache plus protection. Note: some ports or special protocols may need extra config or cannot be proxied — read the docs before orange-clouding everything. Proxied (orange): HTTP/HTTPS through Cloudflare. Use for websites, public APIs, and most hostnames where you want cache plus protection. Note: some ports or special protocols may need extra config or cannot be proxied — read the docs before orange-clouding everything.

Chiến lược phổ biến: www và apex (root) proxied; mail và hostname nội bộ xám. api.example.com có thể cam nếu bạn muốn WAF; hoặc xám nếu chỉ team nội bộ truy cập qua VPN. Không có một nút “đúng cho mọi người” — phụ thuộc rủi ro và luồng người dùng. A common pattern: www and apex proxied; mail and internal hostnames grey. api.example.com might be orange if you want WAF, or grey if only internal VPN access. There is no single button “right for everyone” — it depends on risk and user flows. A common pattern: www and apex proxied; mail and internal hostnames grey. api.example.com might be orange if you want WAF, or grey if only internal VPN access. There is no single button “right for everyone” — it depends on risk and user flows.

Sau khi đổi chế độ, hãy kiểm tra đăng nhập, form, webhook và thanh toán. Đôi khi IP thật của origin thay đổi trong log vì bạn thấy IP Cloudflare — đó là bình thường khi proxied. After changing modes, test login, forms, webhooks, and checkout. Sometimes origin logs show Cloudflare IPs instead of visitors — that is normal when proxied. After changing modes, test login, forms, webhooks, and checkout. Sometimes origin logs show Cloudflare IPs instead of visitors — that is normal when proxied.

Lỗi thường gặp khi mới bật proxy Common mistakes when you first enable proxy Common mistakes when you first enable proxy

Một: bật cam cho hostname mail hoặc dịch vụ không dùng HTTP — site “lạ” hoặc chứng chỉ lỗi. Hai: quên mở firewall origin cho dải IP Cloudflare (nếu bạn chặn IP lạ) — origin từ chối request hợp lệ. Ba: cache quá mạnh lên trang đăng nhập hoặc giỏ hàng — dùng Cache Rules hoặc bypass cho đường dẫn nhạy cảm. One: orange-clouding mail or non-HTTP services — things break or certificates fail. Two: forgetting to allow Cloudflare IP ranges on origin firewalls — origin rejects valid traffic. Three: caching too aggressively on login or cart paths — use Cache Rules or bypass for sensitive routes. One: orange-clouding mail or non-HTTP services — things break or certificates fail. Two: forgetting to allow Cloudflare IP ranges on origin firewalls — origin rejects valid traffic. Three: caching too aggressively on login or cart paths — use Cache Rules or bypass for sensitive routes.

Bốn: nghĩ DNS và CDN là hai sản phẩm tách rời hoàn toàn — trên Cloudflare chúng gắn chặt qua bản ghi proxied. Năm: không purge cache sau deploy — khách vẫn thấy bản cũ dù origin đã mới. Học purge sớm sẽ đỡ “sao mình sửa mà không đổi”. Four: treating DNS and CDN as totally separate — on Cloudflare they connect through proxied records. Five: skipping cache purge after deploy — visitors still see old content. Learning purge early avoids “I deployed but nothing changed.” Four: treating DNS and CDN as totally separate — on Cloudflare they connect through proxied records. Five: skipping cache purge after deploy — visitors still see old content. Learning purge early avoids “I deployed but nothing changed.”

Tuần đầu nên làm: bật cam cho hostname chính; xác nhận HTTPS và redirect www/apex; đọc bài CDN trên hub; theo dõi Analytics vài ngày. Khi ổn định, thêm WAF baseline và cache rules có chủ đích. First-week checklist: orange-cloud main hostnames; confirm HTTPS and www/apex redirects; read the CDN post on this hub; watch Analytics for a few days. When stable, add a WAF baseline and deliberate cache rules. First-week checklist: orange-cloud main hostnames; confirm HTTPS and www/apex redirects; read the CDN post on this hub; watch Analytics for a few days. When stable, add a WAF baseline and deliberate cache rules.

Hình minh họa Cloudflare Cloudflare visuals Cloudflare visuals

Sơ đồ Reference Architecture chính thức và (khi có) ảnh Dashboard — giúp đối chiếu khi học. Official Reference Architecture diagrams and (when available) Dashboard screenshots — useful while you learn. Official Reference Architecture diagrams and (when available) Dashboard screenshots — useful while you learn.

Hình 1: Cloudflare Image Resizing and R2

Tối ưu phân phối ảnh với Image Resizing và R2 Optimizing image delivery with Cloudflare image resizing and R2 Optimizing image delivery with Cloudflare image resizing and R2

Giải pháp tối ưu phân phối ảnh, mở rộng được và hiệu năng cao — Image Resizing kết hợp R2. Learn how to get a scalable, high-performance solution to optimizing image delivery. Learn how to get a scalable, high-performance solution to optimizing image delivery.

Thuật ngữ: Concepts: Concepts: Image Resizing · R2 · Transformations · Cache

Sơ đồ chính thức ↗ Official diagram ↗ Official diagram ↗ · Phân phối nội dung Content Delivery Content Delivery

Câu hỏi thường gặp Frequently asked questions Frequently asked questions

Đám mây xám có nghĩa Cloudflare không hoạt động? Does a grey cloud mean Cloudflare is not working? Does a grey cloud mean Cloudflare is not working?

Cloudflare vẫn quản lý DNS cho bản ghi đó, nhưng HTTP/HTTPS không đi qua proxy. Bạn không có cache edge và các lớp bảo vệ HTTP mặc định cho hostname xám. Đó là lựa chọn có chủ đích, không phải lỗi. Cloudflare still manages DNS for that record, but HTTP/HTTPS does not pass through the proxy. You do not get edge cache or default HTTP protection layers on grey hostnames. That is intentional, not a bug. Cloudflare still manages DNS for that record, but HTTP/HTTPS does not pass through the proxy. You do not get edge cache or default HTTP protection layers on grey hostnames. That is intentional, not a bug.

Có cần proxy cả apex (example.com) và www không? Should you proxy both apex (example.com) and www? Should you proxy both apex (example.com) and www?

Thường nên — và cấu hình redirect để chỉ còn một URL chính (www hoặc non-www). Nhiều site proxied cả hai rồi dùng Page Rule hoặc redirect rule để thống nhất. Kiểm tra form và cookie sau khi đổi. Usually yes — and set a redirect so one canonical URL remains (www or non-www). Many sites proxy both then use a redirect rule to unify. Test forms and cookies after changes. Usually yes — and set a redirect so one canonical URL remains (www or non-www). Many sites proxy both then use a redirect rule to unify. Test forms and cookies after changes.

Bật proxy có làm email (MX) bị lỗi không? Can enabling proxy break email (MX)? Can enabling proxy break email (MX)?

Bản ghi MX không nên bật proxy HTTP. Chỉ bản ghi web (A/CNAME cho site) dùng đám mây cam. Giữ MX và các bản ghi mail ở chế độ DNS only theo hướng dẫn nhà cung cấp email. MX records should not use HTTP proxy. Only web records (A/CNAME for the site) use the orange cloud. Keep MX and mail records DNS-only per your email provider’s guidance. MX records should not use HTTP proxy. Only web records (A/CNAME for the site) use the orange cloud. Keep MX and mail records DNS-only per your email provider’s guidance.

Học tiếp trên hub (on-page backlinks) Keep learning on this hub (on-page links) Keep learning on this hub (on-page links)

Nguồn tham khảo (blog.cloudflare.com) Sources (blog.cloudflare.com) Sources (blog.cloudflare.com)

Nội dung được viết lại để dễ hiểu hơn; luôn đọc bài gốc trên blog.cloudflare.com và docs chính thức khi cần chi tiết kỹ thuật hoặc cập nhật mới nhất. Content is rewritten for clarity; always read the original posts on blog.cloudflare.com and official docs for technical detail or the latest updates. Content is rewritten for clarity; always read the original posts on blog.cloudflare.com and official docs for technical detail or the latest updates.

What is a CDN? Understanding Cloudflare Cache in plain language
CDN CDN CDN Cơ bản Entry កម្រិតចាប់ផ្តើម ~6 phút ~6 min ~6 នាទី

CDN là gì? Hiểu Cloudflare Cache như đang giải thích cho bạn bè What is a CDN? Understanding Cloudflare Cache in plain language What is a CDN? Understanding Cloudflare Cache in plain language

CDN giống mạng kho hàng gần người dùng. Cloudflare Cache giữ bản sao nội dung tĩnh gần bạn — trang mở nhanh hơn, server gốc đỡ “mệt”. Think of a CDN as warehouses near your users. Cloudflare Cache keeps copies of static content close by — pages load faster and origin servers work less. Think of a CDN as warehouses near your users. Cloudflare Cache keeps copies of static content close by — pages load faster and origin servers work less.

Đọc bài → Read post → អានអត្ថបទ →

What is a WAF? Cloudflare website protection explained for non-specialists
Bảo mật Security សុវត្ថិភាព Cơ bản Entry កម្រិតចាប់ផ្តើម ~7 phút ~7 min ~7 នាទី

WAF là gì? Bảo vệ website Cloudflare theo cách người không chuyên IT cũng hiểu What is a WAF? Cloudflare website protection explained for non-specialists What is a WAF? Cloudflare website protection explained for non-specialists

WAF giống bảo vệ cửa ra vào của website: xem ai đang gõ cửa, chặn hành vi đáng ngờ, rồi mới cho vào bên trong (origin). A WAF is like a doorman for your website: it checks who is knocking, blocks suspicious behavior, then lets safe traffic through to your origin. A WAF is like a doorman for your website: it checks who is knocking, blocks suspicious behavior, then lets safe traffic through to your origin.

Đọc bài → Read post → អានអត្ថបទ →

What is a DDoS? How Cloudflare protects your site in plain language
Bảo mật Security សុវត្ថិភាព Cơ bản Entry កម្រិតចាប់ផ្តើម ~7 phút ~7 min ~7 នាទី

DDoS là gì? Cloudflare bảo vệ website thế nào (không thuật ngữ nặng) What is a DDoS? How Cloudflare protects your site in plain language What is a DDoS? How Cloudflare protects your site in plain language

DDoS giống hàng nghìn người chen cửa hàng chỉ để làm tắc — không mua gì. Cloudflare đứng trước cửa, phân loại và chặn làn sóng request vô nghĩa trước origin. A DDoS is like thousands of people crowding your shop door just to block it — not to buy. Cloudflare stands at the door, sorting and blocking meaningless request waves before your origin. A DDoS is like thousands of people crowding your shop door just to block it — not to buy. Cloudflare stands at the door, sorting and blocking meaningless request waves before your origin.

Đọc bài → Read post → អានអត្ថបទ →

Xem tất cả bài blog Browse all blog posts Browse all blog posts

Chuỗi bài AI · Security · CDN · Workers · Developer Platform — viết lại cho người mới và trung cấp. AI · Security · CDN · Workers · Developer Platform — rewritten for entry and intermediate learners. AI · Security · CDN · Workers · Developer Platform — rewritten for entry and intermediate learners.