Part 2 of a series on deploying web apps to Cloudflare Workers covers setting up a PostgreSQL database with Hyperdrive for connection pooling. It explains why naively exporting a Node.js connection pool breaks in the Workers execution model (both performance and per-request lifecycle issues), how to configure Hyperdrive via the Wrangler file, and how to use TanStack Start's global request middleware to create a fresh database connection per request. Also covers pinning worker placement to the same AWS region as the database to minimize query latency.
Nguồn: https://master.dev/blog/cloudflare-workers-and-hyperdrive-with-tanstack-start. 8sync News chỉ tóm tắt và dẫn link; bản quyền nội dung thuộc tác giả và nguồn gốc.
Nhóm Cloudflare Images phát hiện lỗi điều kiện chạy (race condition) trong thư viện hyper HTTP (phiên bản 0.14–1.8) khi chuyển đổi sang sử dụng Unix sockets, khiến dữ liệu ảnh lớn bị cắt xén ngẫu nhiên do vòng lặp xử lý không chờ Poll::Pending từ poll_flush. Lỗi chỉ xuất hiện trong môi trường sản xuất với tải cao, không thể tái hiện bằng curl hay thử nghiệm cục bộ. Nhóm đã khắc phục bằng cách bổ sung 4 dòng lệnh vào poll_shutdown để đảm bảo dữ liệu được ghi hết trước khi đóng kết nối.
Lập trình viên cần đọc bài này để hiểu cách một lỗi race condition trong thư viện HTTP phổ biến (hyper) có thể gây ra vấn đề nghiêm trọng trong ứng dụng thực tế, đặc biệt khi kết hợp với các điều kiện concurrency và giao thức socket, và cách team phát hiện, debug và fix bằng cách quan sát syscall thực tế.
Sắc lệnh hành pháp 14409 của Mỹ yêu cầu các cơ quan liên bang và nhà thầu phải chuyển sang mã hóa hậu lượng tử (PQC) vào năm 2030 và xác thực hậu lượng tử vào năm 2031, nhằm ngăn chặn các cuộc tấn công "thu thập giờ đây giải mã sau". Cloudflare khuyến nghị cần làm rõ tiêu chuẩn "chuyển đổi", ưu tiên khả năng thích ứng mật mã (crypto agility) và thúc đẩy sự thống nhất toàn cầu về thuật toán NIST để tránh phân mảnh.
Lập trình viên nên đọc bài này để hiểu cách chuyển đổi sang các giải pháp mã hóa chống lượng tử (post-quantum) không chỉ là một yêu cầu pháp lý mà là một chiến lược bảo mật cấp hệ thống, giúp bảo vệ ứng dụng của bạn trước các mối đe dọa tương lai từ máy tính lượng tử trong thời gian ngắn nhất.
A practical guide to managing configuration, secrets, and multiple deployment environments (staging, production) in Cloudflare Workers. Covers plain vars in wrangler.jsonc, encrypted secrets via Wrangler CLI, local development with .dev.vars, and per-environment secret scoping. Highlights a key gotcha: named environment blocks do not inherit top-level config, so bindings and triggers must be explicitly repeated in each environment block.
Cloudflare is giving AI companies until September 15, 2026 to separate web crawlers used for traditional search from those used for AI training and agents. After that date, Cloudflare's default settings will block mixed-use crawlers from pages that host ads, affecting new customers, new sites, and all existing free customers. The policy aims to protect publishers' intellectual property and create a sustainable ecosystem where AI companies pay for content they use. Cloudflare is also evolving its Pay Per Crawl marketplace into a Pay Per Use model, allowing publishers to charge AI companies when their content creates value rather than just when it's fetched. Initial partners include Ceramic.ai and You.com. The announcement also calls out Google specifically for bundling search and AI crawling in ways that make it difficult for publishers to opt out without losing search visibility.
A step-by-step guide to hosting a PHP web project at zero cost using Wasmer (a WebAssembly-based cloud platform with sub-90ms cold starts), a free eu.org domain, and Cloudflare for DNS management. Covers creating a Wasmer account, deploying a PHP app from GitHub, setting up Cloudflare DNS with a CNAME record, and registering a free eu.org subdomain. The motivation is building a sustainable open-source project website that can outlive its creator without recurring costs.
Cloudflare is positioning itself as the economic infrastructure layer between publishers and AI companies. The company announced Pay Per Use (publishers get paid when content appears in AI answers, not just when crawled), new crawler classification rules requiring AI companies to separate indexing, training, and agent traffic, and an Answer Engine Optimization dashboard. Starting September 15, new and free-tier sites will block AI training and agent crawlers by default on ad-supported pages. Cloudflare argues its existing position between websites and the internet gives it a unique advantage to manage access, attribution, and payments in the emerging AI-driven web economy.
Cloudflare Workflows now supports saga-style rollbacks, letting developers attach compensation logic directly to each step.do() call. When a multi-step workflow fails, registered rollback handlers execute in reverse step-start order, each running through Workflows' durable step machinery with retries, timeouts, and lifecycle events. The post explains the API design decisions (fluent vs. builder vs. options object), how rollback handlers are stored as callable stubs, how replay rebuilds handlers after engine restarts, and the key behavioral rules around ordering and eligibility for failed steps.
A practical guide to monitoring Cloudflare Workers in production using console.log, the observability configuration in wrangler.jsonc, and live log streaming with wrangler tail. Covers enabling persistent searchable logs, live tailing for active debugging, sampling strategies for high-traffic workers, and the difference between logs (what happened) and traces (why it was slow).