Application Services Application Services

Bảo vệ và tăng tốc website, application và API Protect and accelerate websites, applications, and APIs

Lộ trình này dành cho team đã có website, web app, mobile backend hoặc API public. Bạn sẽ học cách đặt Cloudflare phía trước application để cải thiện bảo mật, tốc độ, độ tin cậy và khả năng quan sát traffic. This path is for teams with a website, web app, mobile backend, or public API. You will learn to put Cloudflare in front of your application to improve security, speed, reliability, and traffic visibility.

Ai nên học lộ trình này? Who is this for?

Phù hợp nếu bạn là IT, Security, DevOps, developer vận hành production, hoặc chủ doanh nghiệp có website/app đang chạy thật. A good fit if you are IT, Security, DevOps, a developer operating production, or a business owner with a live website or app.

Mô hình tư duy Mental model

User → Cloudflare (DNS + proxy + security + cache) → Origin (server/app/API của bạn). Cloudflare xử lý gần user trước khi request tới origin. User → Cloudflare (DNS + proxy + security + cache) → Origin (your server/app/API). Cloudflare processes traffic near users before it reaches origin.

Sơ đồ kiến trúc tham chiếu Reference architecture diagrams

Figure 1: Data flow overview

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.

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

Sơ đồ chính thức ↗ Official diagram ↗ · Content delivery Content Delivery

Figure 1: How Cloudflare identifies, scores and processes traffic from bots.

Bot management Bot management

Luồng phát hiện, chấm điểm và xử lý bot traffic trên edge — nền tảng cho WAF, rate limit và Bot Management. Cloudflare has bot management capabilities to help identify and mitigate automated traffic to protect domains from bad bots.

Thuật ngữ: Concepts: Bot score · Super Bot Fight Mode · WAF · Rate limiting

Sơ đồ chính thức ↗ Official diagram ↗ · Bots Bots

Figure 1: Securing data from the user device, all the way to the website/API

Securing data in transit Securing data in transit

Bảo vệ data in transit với Gateway/DLP — inspect TLS traffic trước khi tới SaaS hoặc Internet. Data in transit is often considered vulnerable to interception or tampering during transmission. Data Loss Prevention (DLP) technologies can be used to inspect the contents of network traffic and block sensitive data from going to a risky destination.

Thuật ngữ: Concepts: Gateway · DLP · TLS · CASB · Inline inspection

Sơ đồ chính thức ↗ Official diagram ↗ · Security Security

Sau lộ trình bạn sẽ What you will achieve

  • Hiểu record DNS nào nên proxy và record nào để DNS only Know which DNS records to proxy vs DNS only
  • Cấu hình SSL/TLS không gây redirect loop Configure SSL/TLS without redirect loops
  • Bật baseline WAF/DDoS và rate limit cho path nhạy cảm Enable baseline WAF/DDoS and rate limits on sensitive paths
  • Tối ưu cache cho static mà không phá session động Optimize cache for static assets without breaking dynamic sessions
  • Đọc analytics để biết traffic bất thường Use analytics to spot abnormal traffic

Khái niệm cần nắm Key concepts

  • DNS
  • Proxy
  • SSL/TLS
  • CDN/cache
  • WAF
  • DDoS protection
  • Bot protection
  • Rate limiting
  • API security

Nội dung từng phần Module-by-module content

~30 phút ~30 min 2 bài 2 lessons

Phần 1: Đưa domain lên Cloudflare Part 1: Onboard your domain

Thiết lập nền tảng DNS và hiểu traffic sẽ đi qua đâu. Set up DNS foundations and understand where traffic will flow.

  1. 1

    Thêm domain và review DNS records Add domain and review DNS records

    Import hoặc tạo zone cho domain. Liệt kê A/AAAA, CNAME, MX và ghi chú record nào trỏ tới origin thật. Đừng proxy MX hoặc record nội bộ không cần qua Cloudflare. Import or create a zone. List A/AAAA, CNAME, MX records and note which point to your real origin. Do not proxy MX or internal records that should not pass through Cloudflare.

    Mẹo: Tip: Chụp screenshot bảng DNS trước khi đổi nameserver — tiện khi rollback. Screenshot your DNS table before changing nameservers — useful for rollback.

  2. 2

    Bật proxy (orange cloud) đúng record Enable proxy on the right records

    Proxy các record phục vụ HTTP/HTTPS public (website, API gateway). Giữ DNS only cho record chỉ dùng nội bộ hoặc dịch vụ đặc biệt. Proxy records serving public HTTP/HTTPS (website, API gateway). Keep DNS only for internal-only or special services.

~25 phút ~25 min 2 bài 2 lessons

Phần 2: SSL/TLS và kết nối origin Part 2: SSL/TLS and origin connection

Tránh lỗi chứng chỉ và đảm bảo traffic mã hóa end-to-end phù hợp mô hình của bạn. Avoid certificate errors and ensure encryption fits your architecture.

  1. 1

    Chọn SSL/TLS mode phù hợp Choose the right SSL/TLS mode

    Full (strict) khi origin có cert hợp lệ. Tránh Flexible nếu origin chỉ nhận HTTPS. Kiểm tra redirect HTTP→HTTPS. Use Full (strict) when origin has a valid cert. Avoid Flexible if origin expects HTTPS. Verify HTTP→HTTPS redirects.

    Mẹo: Tip: Test bằng curl hoặc browser incognito sau mỗi thay đổi mode. Test with curl or an incognito browser after each mode change.

  2. 2

    Origin certificate và bypass Origin certificates and bypass

    Chặn truy cập trực tiếp IP origin nếu có thể (firewall chỉ cho phép Cloudflare). Điều này ngăn attacker bỏ qua WAF. Block direct origin IP access when possible (firewall allow Cloudflare only). This prevents attackers from bypassing the WAF.

~45 phút ~45 min 3 bài 3 lessons

Phần 3: Bảo mật baseline Part 3: Baseline security

WAF, DDoS, bot và rate limiting cho path quan trọng. WAF, DDoS, bots, and rate limiting for critical paths.

  1. 1

    Bật WAF managed rules Enable WAF managed rules

    Bắt đầu ở chế độ log/simulate nếu lo ngại false positive, sau đó chuyển block. Ưu tiên bảo vệ login, admin, API public. Start in log/simulate if worried about false positives, then move to block. Prioritize login, admin, and public API paths.

  2. 2

    Rate limiting cho login và form Rate limiting for login and forms

    Giới hạn request theo IP hoặc cookie cho /login, /signup, OTP, search. Giảm credential stuffing và abuse. Limit requests per IP or cookie on /login, /signup, OTP, search. Reduces credential stuffing and abuse.

  3. 3

    Bot protection cơ bản Basic bot protection

    Phân biệt bot xấu (scrape, spam) và traffic hợp lệ. Kết hợp challenge hoặc block theo score. Separate bad bots (scraping, spam) from legitimate traffic. Combine challenges or blocks by score.

~45 phút ~45 min 4 bài 4 lessons

Phần 4: Content delivery & tăng tốc website Part 4: Content delivery & website speed

CDN, cache rules, Speed, Argo/Tiered Cache và đo lường — giảm tải origin, cải thiện LCP. CDN, cache rules, Speed, Argo/Tiered Cache, and measurement — less origin load, better LCP.

  1. 1

    CDN & cache hit/miss CDN & cache hit/miss

    Hiểu HIT tại PoP vs MISS về origin. Cache static assets; không cache HTML có session. Understand PoP HIT vs MISS to origin. Cache static assets; do not cache HTML with sessions.

  2. 2

    Cache Rules & purge Cache Rules & purge

    Bypass /admin, /checkout; TTL cho /assets/*; purge sau mỗi release frontend. Bypass /admin, /checkout; TTL for /assets/*; purge after each frontend release.

  3. 3

    Speed & Images Speed & Images

    Brotli, Early Hints, HTTP/3; resize ảnh WebP/AVIF tại edge. Brotli, Early Hints, HTTP/3; resize images to WebP/AVIF at the edge.

  4. 4

    Đo hit ratio & Core Web Vitals Measure hit ratio & Core Web Vitals

    Caching Analytics + Web Analytics — báo cáo trước/sau cho stakeholder. Caching Analytics + Web Analytics — before/after reports for stakeholders.

Trình tự học gợi ý Suggested learning order

  1. Add domain vào Cloudflare Add domain to Cloudflare
  2. Review DNS records Review DNS records
  3. Enable proxy cho các record phù hợp Enable proxy on selected records
  4. Configure SSL/TLS đúng cách Configure SSL/TLS correctly
  5. Bật baseline security Turn on baseline security
  6. Review caching behavior Review caching behavior
  7. Thêm WAF/rate limiting cho các path rủi ro Add WAF/rate limiting for risky paths
  8. Monitor analytics và logs Monitor analytics and logs

Script demo dashboard (thực chiến) Field demo scripts (dashboard)

Cấu hình theo nhu cầu khách hàng — đường dẫn menu, bước showcase và mẹo demo từ playbook SE. Mở rộng đầy đủ trên trang Script demo. Configure to customer needs — menu paths, showcase steps, and SE playbook tips. Full library on the Demo guides page.

Khi nào vào mục này: Khách cần rule theo field form (SĐT, mã đơn), loại file upload, hoặc JSON key trong API.

Vị trí trên dashboard

  • Security > WAF > Custom rules
  • Security > Events

Nên xem gì

  1. Ví dụ: chặn SĐT lạm dụng

    Expression mẫu: any(http.request.body.form["billing_phone"][*] == "...") — block account spam cùng một số.

    Security > WAF > Custom rules > Create rule

  2. Giới hạn loại file upload

    POST + body match filename — chỉ cho txt/pdf/docx; exe bị 403. Test bằng curl --data-raw.

  3. Payload logging (managed rules)

    WAF > Managed rules > Configure payload logging → key pair hoặc public key → Events > Decrypt payload (trong browser, key không gửi server).

    Security > WAF > Managed rules

Lưu ý

  • Sau khi tạo rule, kiểm tra Security Events để xác nhận match/block đúng ý (có thể dùng curl hoặc request thật).

Điểm cần nhớ

  • Body inspection cho abuse cụ thể; payload logging giải thích vì sao managed ruleset bắt request.

Tài liệu chính thức: WAF custom rules · Payload logging

Tài nguyên chính thức (Resource Hub) Official resources (Resource Hub)

Liên kết từ Cloudflare Resource Hub — docs, community, case studies phù hợp track này. Links from the Cloudflare Resource Hub — docs, community, and case studies for this track.

Học & tài liệu Learn & docs Gợi ý Recommended

Developer Documentation Developer Documentation

Tài liệu sản phẩm, tutorial và ví dụ cho mọi dịch vụ Cloudflare. Product docs, tutorials, and examples for every Cloudflare service.

Mở trên Cloudflare Open on Cloudflare
Học & tài liệu Learn & docs Trong hub In this hub Gợi ý Recommended

Learning Center Learning Center

Giải thích khái niệm và hướng dẫn thực hành cho kiến trúc web hiện đại. Concept explainers and practical guides for modern web architecture.

Xem trong hub View in hub
Học & tài liệu Learn & docs Trong hub In this hub Gợi ý Recommended

Reference Architectures Reference Architectures

Pattern kiến trúc và best practices — SASE, CDN, Workers, Zero Trust. Architecture patterns and best practices — SASE, CDN, Workers, Zero Trust.

Xem trong hub View in hub
Cộng đồng & cập nhật Community & updates Trong hub In this hub Gợi ý Recommended

Developer Changelog Developer Changelog

Cập nhật sản phẩm theo ngày — Agents, Workers, Cloudflare One, R2, security. Hub có bản tóm tắt chọn lọc. Daily product updates — Agents, Workers, Cloudflare One, R2, security. This hub includes a curated summary.

Xem trong hub View in hub
Xem toàn bộ Resource Hub trong hub View full Resource Hub in this hub

Reference Architecture Reference Architecture

Sơ đồ và tài liệu thiết kế chính thức từ Cloudflare Architecture Center — bổ sung lộ trình học trong hub. Official design diagrams and docs from the Cloudflare Architecture Center — complementing this track in the hub.

Kiến trúc tham chiếu Reference architecture Nổi bật Featured Track: Track: Application Services

Cloudflare Security Architecture Cloudflare Security Architecture

Cách mạng và nền tảng Cloudflare được thiết kế về security, vận hành và dịch vụ cho doanh nghiệp. How Cloudflare’s network and platform are designed for security, operations, and enterprise services.

Figure 1: Data flow overview
Kiến trúc tham chiếu Reference architecture Nổi bật Featured Track: Track: Application Services

CDN Reference Architecture CDN Reference Architecture

Thách thức web app truyền thống, cách CDN Cloudflare giải quyết, và thiết kế kiến trúc CDN. Traditional web app challenges, how Cloudflare CDN solves them, and CDN architecture design.

Hướng dẫn thiết kế Design guide Nổi bật Featured Track: Track: Application Services

Securely deliver applications with Cloudflare Securely deliver applications with Cloudflare

Bộ dịch vụ performance, security, reliability, development và Zero Trust cho ứng dụng. Performance, security, reliability, development, and Zero Trust services for applications.

Kiến trúc tham chiếu Reference architecture Track: Track: Application Services

Load Balancing Reference Architecture Load Balancing Reference Architecture

Global và local traffic management — cho team vận hành web, hosting và network. Global and local traffic management — for web, hosting, and network teams.

Xem tất cả tài liệu kiến trúc View all architecture docs

Ví dụ từ GitHub Cloudflare Examples from Cloudflare GitHub

Repo open source chính thức trên github.com/cloudflare — học bằng README và code mẫu. Official open source at github.com/cloudflare — learn from READMEs and sample code.

Ví dụ 4: Transform HTML tại edge Example 4: Transform HTML at the edge

lol-html + Workers — CSP nonce, rewrite URL — bảo mật Application Services. lol-html + Workers — CSP nonce, URL rewrite — Application Services security.

Pinned Pinned Hạ tầng & Core Infrastructure & Core Rust ★ 11,500

cloudflare/quiche

Implementation QUIC + HTTP/3 — giao thức hiện đại cho web nhanh và mã hóa. QUIC and HTTP/3 implementation — modern protocol for fast, encrypted web.

Gợi ý học / thử: Try this:

Đọc để hiểu vì sao HTTP/3 và QUIC liên quan performance Application Services. Read to understand how HTTP/3 and QUIC relate to Application Services performance.

Mở trên GitHub Open on GitHub
Hạ tầng & Core Infrastructure & Core Rust ★ 2,006

cloudflare/lol-html

Streaming HTML parser/rewriter với CSS selector — dùng trong Workers. Streaming HTML parser/rewriter with CSS selectors — used in Workers.

Gợi ý học / thử: Try this:

Thử rewrite HTML tại edge (nonce CSP, inject analytics) — liên kết bài CloudSecOp lol-html. Try edge HTML rewrite (CSP nonce, analytics inject) — pairs with the CloudSecOp lol-html post.

Mở trên GitHub Open on GitHub
Hạ tầng & Core Infrastructure & Core Go ★ 1,671

cloudflare/circl

Thư viện crypto tái sử dụng — post-quantum và curve hiện đại. Interoperable cryptographic library — post-quantum and modern curves.

Gợi ý học / thử: Try this:

Đọc overview để hiểu TLS/crypto layer — bổ sung khái niệm SSL/TLS trong lộ trình Application Services. Read the overview for TLS/crypto context — complements SSL/TLS in the Application Services track.

Mở trên GitHub Open on GitHub
Ví dụ & Demo Examples & Demos JavaScript ★ 697

cloudflare/speedtest

Component đo tốc độ mạng tới edge Cloudflare. Component to measure network speed against Cloudflare’s edge.

Gợi ý học / thử: Try this:

Nhúng widget speedtest vào trang demo → giải thích CDN/edge proximity cho stakeholder. Embed the speedtest widget on a demo page → explain CDN/edge proximity to stakeholders.

Mở trên GitHub Open on GitHub
Xem tất cả repo gợi ý View all suggested repos

Đọc thêm — kinh nghiệm thực tế (CloudSecOp) Further reading — field notes (CloudSecOp)

Bài viết từ cloudsecop.net — bổ sung lộ trình hub với context triển khai production, không thay tài liệu chính thức Cloudflare. Posts from cloudsecop.net — complement this track with production deployment context; not a replacement for official Cloudflare docs.

7 phút đọc 7 min read

lol-html: streaming HTML rewriter trên Workers — 3 production patterns lol-html streaming HTML rewriter on Workers

CSP nonce per request, rewrite analytics URL, A/B inject tại edge. Per-request CSP nonce, analytics URL rewrite, A/B inject at the edge.

  • Workers
  • HTML
Đọc trên CloudSecOp Read on CloudSecOp
9 phút đọc 9 min read

Pingora vs AWS ALB/NLB Pingora vs AWS ALB/NLB

Khi nào self-host reverse proxy bằng pingora-core thắng ALB managed. When self-hosted pingora-core beats managed ALB.

  • Pingora
Đọc trên CloudSecOp Read on CloudSecOp
Phần 18 Part 18 8 phút đọc 8 min read

Security cho Worker: secrets, CSP, Bot Management, Turnstile Worker security: secrets, CSP, Bot Management, Turnstile

Defense-in-depth: WAF, Turnstile, Access JWT, Zod validation, anti-pattern. Defense-in-depth: WAF, Turnstile, Access JWT, Zod validation, anti-patterns.

  • security
  • Turnstile
Đọc trên CloudSecOp Read on CloudSecOp
Phần 17 Part 17 9 phút đọc 9 min read

Observability cho Worker: Logs, Tail Workers, Analytics Worker observability: Logs, Tail Workers, Analytics

4 tầng: Workers Logs, Tail, Logpush, Analytics Engine — debug production. Four layers: Workers Logs, Tail, Logpush, Analytics Engine — production debugging.

  • observability
Đọc trên CloudSecOp Read on CloudSecOp
Xem tất cả bài gợi ý trong Tài nguyên View all suggested posts in Resources

Bước tiếp theo Next step

Áp dụng ngay qua tình huống thực tế và checklist. Apply what you learned via a use case and checklist.