Cloudflare Workers has evolved into a powerful edge computing platform, enabling developers to run serverless code globally. This includes durable execution, dynamic code execution, a durable filesystem, and dynamic workflows via the Agents SDK. The platform now offers extended execution times with Workers Unbound, allowing for up to 30 seconds for HTTP requests and a private beta for Cron Triggers up to 15 minutes, enabling more intensive workloads at the edge. Pricing has also been optimized w. This evolution now includes the ability to inject a WebMCP bridge script at the edge, enabling websites to expose tools for AI agents without modifying origin code. This bridge registers tool packs, such as Content Credentials and Site MCP Server, which run entirely in the browser or communicate with an origin MCP server. Future packs will leverage Workers AI and AI Search.
2026
Give any website a WebMCP interface
8/6/2026
Introduced WebMCP support on Cloudflare, enabling websites to expose tools for AI agents via an injected bridge script. This involves using HTMLRewriter to add a script tag referencing a bridge.js served from the edge. The bridge composes tool packs (e.g., Content Credentials for C2PA metadata, Site MCP Server for origin communication) and registers them with `document.modelContext.registerTool`. The Content Credentials pack scans images for provenance metadata, and `inspect_image_c2pa` decodes full manifests. The Site MCP Server pack acts as a proxy to the origin's MCP server.
Introducing Kitesurf: The agent-first browser that runs in V8 isolates on Cloudflare Workers
8/6/2026
Introduced Kitesurf, a new agent-first browser built entirely on Cloudflare Workers. Kitesurf leverages V8 isolates, WebAssembly, dynamic workers, SQLite-based Durable Objects, worker-to-worker RPC, service bindings, and enhanced NodeJS compatibility to run a headless browser engine efficiently at the edge. It prioritizes agent needs like token count, context windows, scalability, performance, and cost over human-centric features like tabs and themes. The design emphasizes extensive testing with Web Platform Tests, integration testing, visual regression testing, Rust for performance-critical components, robust exception handling, strong isolation between components, and statelessness wherever possible. Key components include the Engine (handling CDP APIs and session state), PageScript (fetching assets using Dynamic Workers), and PageRenderer (responsible for rendering).
The next generation of MCP
8/6/2026
The Model Context Protocol (MCP) has been updated to a stateless protocol, removing the need for stateful connections and Durable Objects for MCP servers. This simplifies deployment, scaling, and cost by allowing MCP servers to run on request-scoped infrastructure like Cloudflare Workers. Elicitation has been reworked with Multi Round-Trip Requests (MRTR) to remove the dependency on open streams. MCP requests now leverage HTTP headers (Mcp-Method, Mcp-Name) for method and name, enabling easier gateway and WAF integration. Authorization has been tightened with preferred client registration methods (pre-registered clients, Client ID Metadata Documents, Dynamic Client Registration) and RFC 9207 issuer identification. A formal feature lifecycle (Active, Deprecated, Removed) has been introduced for MCP features, with Roots, Sampling, Logging, Dynamic Client Registration, and the legacy HTTP+SSE transport being deprecated.
Run CI/CD for millions of repos — on your platform, on Cloudflare
8/4/2026
Introduces the ability to run CI/CD pipelines on Cloudflare using Cloudflare Workflows and a new CI SDK. This enables automated builds, linting, testing, dependency caching, and conditional deployment directly on the platform. It leverages Artifacts for code storage and the Sandbox SDK for isolated execution. The post also details the integration with Wrangler for deployment and introduces self-healing CI capabilities using AI agents.
The Agent Development Lifecycle has arrived on Cloudflare
8/4/2026
Introduces the Agent Development Lifecycle (ADLC) as a successor to the SDLC for agent-driven software development. Details new tools and capabilities enabling agents to manage more of the SDLC: @cloudflare/ci for CI/CD, local OpenTelemetry traces for observability in development, Cloudflare Agents and Agent Traces for observing agent behavior, and a system for enforcing engineering standards using AI. Discusses the requirements for 'software factories' and how Cloudflare Workflows and Artifacts provide the necessary programmatic, scalable, reproducible, real-time, atomic, permissioned, and self-improving platform capabilities to support agents driving the entire development lifecycle.
Your agent can now debug Workers with local tracing
8/4/2026
Introduced automatic OpenTelemetry trace capture for local Cloudflare Workers development using `wrangler dev` and `vite dev`. This enables AI coding agents to automatically discover and query these traces via the Local Explorer API for debugging, identifying failures, and verifying fixes without manual instrumentation or code deployment. The trace data includes fetch calls, binding interactions, and handler lifecycle events.
Your agent needs a computer, not a container — introducing @cloudflare/computer
8/3/2026
Introduced @cloudflare/computer, an open-source library providing an agent runtime that abstracts compute primitives (isolates, containers) and offers a unified filesystem. This enables agents to be provisioned with a 'computer' rather than just a container, optimizing for efficiency and scalability. The library supports multiple execution backends (isolates via dynamic workers, containers) and provides tools for file manipulation and execution against a durable filesystem backed by SQLite.
Cloudflare Workers and Containers now support inbound TCP connections and gRPC
8/3/2026
Introduced the `connect(socket)` handler in the Workers runtime to accept inbound TCP connections, enabling full-duplex communication with containers and Durable Objects. Added support for gRPC applications by automatically converting between gRPC-web and gRPC protocols, allowing Workers to serve and call gRPC APIs without containers, and enabling gRPC servers to be deployed in Cloudflare Containers.
Workers RPC now works across Python and JavaScript
8/3/2026
Introduced cross-language RPC support for Cloudflare Workers, enabling seamless communication between JavaScript and Python Workers. This is achieved by leveraging Pyodide's FFI for standard type conversions and a custom workers-runtime-sdk package to handle Cloudflare Workers-specific objects. The system supports passing structured cloneable types, functions, and objects, with near-zero performance overhead.
How we found a bug in the hyper HTTP library
6/22/2026
This post details the debugging of a race condition in the hyper HTTP library that caused intermittent truncation of large image transformations when using the Cloudflare Images binding. The issue was traced to a timing-dependent interaction between hyper's buffer management and the kernel's socket buffers, particularly after a rearchitecture that replaced an intermediary service with a direct Unix socket connection. The fix involved a four-line code change in hyper to correctly handle buffer flushing and socket shutdown under specific concurrency conditions.
Temporary Cloudflare Accounts for AI agents
6/19/2026
Introduced Temporary Cloudflare Accounts for Agents, enabling AI agents to deploy Cloudflare Workers instantly using `wrangler deploy --temporary`. These temporary deployments last for 60 minutes, during which they can be claimed to become permanent. This feature aims to remove the friction of traditional account sign-up and authentication flows for AI agents, facilitating rapid iteration and deployment in agentic coding workflows.
Bringing more agent harnesses and frameworks to Cloudflare, starting with Flue
6/17/2026
This post introduces Flue, a new open-source framework built on the Cloudflare Agents SDK, designed for building production-grade AI agents. It details how Flue leverages Cloudflare's primitives: durable execution via `runFiber()`, `stash()`, and `onFiberRecovered()` for resilient agent turns; secure code execution using `@cloudflare/codemode` and Dynamic Workers; and a durable virtual filesystem with `@cloudflare/shell` for workspace tasks. The post positions this as a three-layer stack (framework, harness, runtime) for AI development.
VoidZero is joining Cloudflare
6/4/2026
This post announces the acquisition of VoidZero, the company behind Vite, Vitest, Rolldown, Oxc, and Vite+, by Cloudflare. It details how this acquisition will accelerate the evolution of Vite and related tools, with Cloudflare committing engineering resources and a $1 million ecosystem fund. A key technical contribution is the deepening integration of Vite with Cloudflare Workers, specifically leveraging the `workerd` runtime for local development via the Cloudflare Vite plugin and the Vite Environment API. This integration aims to provide a consistent development experience across local environments and Cloudflare's production platform. The post also outlines plans to move Cloudflare's internal application tooling, including its CLI, onto Vite as a foundation, aiming for a unified and Vite-like developer experience for the Cloudflare platform.
Announcing Claude Managed Agents on Cloudflare
5/19/2026
This post details the integration of Claude Managed Agents with Cloudflare's Developer Platform, specifically leveraging Cloudflare Workers, Sandboxes, Agents SDK, Browser Run, and Dynamic Workers. It introduces a new capability for running AI agent 'hands' on Cloudflare infrastructure, decoupling them from the 'brain' running on Anthropic's platform. Key technical contributions include: a default deployment template for enhanced security (proxies, credential injection, exfiltration prevention), improved sandbox control and observability (metrics, logs, SSH access, customizable images), lightweight sandboxing via V8 isolates for massive scale and cost reduction, secure private service connectivity using Cloudflare Mesh and Workers VPC, and enhanced browser control with audit trails and session recordings. It also highlights the integration of email tools and custom tool execution for agents.
Browser Run: now running on Cloudflare Containers, it’s faster and more scalable
5/13/2026
Browser Run has been migrated from shared Browser Isolation infrastructure to Cloudflare Containers, leveraging Durable Objects for global distribution and regional pools of pre-warmed containers to reduce latency. The state management for containers has been migrated from Workers KV to D1 and Queues to overcome scalability bottlenecks and achieve lower latency for state updates. This migration has resulted in a 4x increase in browser spin-up limits, a >50% reduction in Quick Action response times, and faster browser upgrades, enabling new features like WebGL and WebMCP.
Introducing Dynamic Workflows: durable execution that follows the tenant
5/1/2026
Introduced Dynamic Workflows, a library and pattern that enables dynamic loading and execution of Cloudflare Workflows code at runtime. This allows multi-tenant applications, agents, and CI/CD products to provide each customer or agent with their own isolated workflow code, managed by a central Worker Loader. This builds upon the concepts of Dynamic Workers for compute and Durable Object Facets for storage, extending dynamic deployment to durable execution.
Making Rust Workers reliable: panic and abort recovery in wasm‑bindgen
4/22/2026
This post details significant advancements in the reliability of Rust Workers by addressing WebAssembly panics and aborts. It introduces `panic=unwind` support for `wasm32-unknown-unknown` via the WebAssembly Exception Handling proposal, allowing Rust destructors to run and preventing instance poisoning. It also implements abort recovery mechanisms, including an abort hook (`set_on_abort`) and abort reentrancy guards, to detect and recover from non-unwindable errors like out-of-memory conditions. Furthermore, it introduces an experimental reinitialization mechanism (`--reset-state-function`) for wasm-bindgen libraries to allow for graceful recovery from aborts without requiring consumers to reimport or recreate instances.
Building the agentic cloud: everything we launched during Agents Week 2026
4/20/2026
This post announces a significant expansion of Cloudflare Workers and related services to support the 'agentic cloud'. Key new capabilities include Artifacts for Git-compatible storage, Sandboxes for persistent agent environments, Durable Object Facets for per-agent SQLite databases, and a rearchitected Workflows control plane. Security features like Cloudflare Mesh and Managed OAuth for Access are introduced. The agent toolbox is enhanced with Project Think, voice capabilities, Email Service beta, a unified inference layer, LLM optimizations (custom stack, Unweight), Agent Memory, AI Search, and Browser Run. For developer experience, a new CLI ('cf'), Agent Lee, Flagship feature flags, and a beta Registrar API are launched. The 'agentic web' is addressed with an Agent Readiness score and Redirects for AI Training. Network performance is improved via the FL2 architecture.
Agents that remember: introducing Agent Memory
4/17/2026
Introduced Agent Memory, a managed service for AI agents that provides persistent memory by extracting information from conversations and making it available for retrieval. This addresses the challenge of context rot in large language models by preserving important information without filling up the context window. Agent Memory offers operations for ingesting conversations, remembering specific details, recalling information, listing memories, and forgetting memories. It integrates with Cloudflare Workers via a binding and also offers a REST API. The service includes a multi-stage ingestion pipeline with deterministic ID generation, extraction, verification, classification, and storage of memories.
Introducing Flagship: feature flags built for the age of AI
4/17/2026
Introduced Flagship, a native feature flag service built on OpenFeature, Workers, Durable Objects, and KV. Flagship enables AI agents to safely deploy and test code in production by providing a mechanism to control the blast radius of new code paths. It offers local evaluation at the edge via a Worker binding and an OpenFeature-compatible SDK, eliminating external network calls for flag evaluation.
Project Think: building the next generation of AI agents on Cloudflare
4/15/2026
Introduced Project Think, a new set of primitives for the Agents SDK to build next-generation AI agents. Key components include durable execution with fibers for crash recovery and checkpointing, sub-agents for isolated execution contexts, persistent sessions with tree-structured messages for forking and compaction, and sandboxed code execution using Dynamic Workers and codemode for efficient and secure LLM-driven code execution. This significantly enhances the capabilities and scalability of AI agents on Cloudflare's edge.
Add voice to your agent
4/15/2026
Introduced an experimental voice pipeline for the Agents SDK, enabling real-time voice interactions for agents. This includes the `@cloudflare/voice` package with `withVoice` and `withVoiceInput` for full conversation and speech-to-text-only use cases, respectively. It leverages Workers AI providers (Deepgram Flux, Nova 3, Aura) for STT and TTS, and integrates with the existing Durable Object and SQLite-backed agent architecture. The pipeline supports streaming audio and text, and maintains conversation history across voice and text inputs.
Browser Run: give your agents a browser
4/15/2026
This post announces the renaming of Browser Rendering to Browser Run and introduces several new features designed to enable AI agents to interact with the web at scale. Key additions include: Live View for real-time observation of agent actions, Human in the Loop for manual intervention during agent execution, a Chrome DevTools Protocol (CDP) Endpoint for direct browser control and compatibility with existing CDP scripts and agent frameworks, MCP Client Support for AI coding assistants like Claude Desktop and Cursor, WebMCP Support for websites to declare agent-discoverable tools, Session Recordings for debugging, and increased concurrency limits (120 browsers). It also highlights the existing /crawl endpoint for web content scraping and support for Puppeteer, Playwright, and Stagehand.
Durable Objects in Dynamic Workers: Give each AI-generated app its own database
4/13/2026
Introduced Durable Object Facets, a feature of Dynamic Workers, allowing for the dynamic loading and instantiation of Durable Object classes within a Dynamic Worker. This enables a supervisor Durable Object to manage and load application-specific Durable Objects, each with its own isolated SQLite database, facilitating stateful AI-generated applications at the edge.
Agents have their own computers with Sandboxes GA
4/13/2026
This post announces the General Availability (GA) of Cloudflare Sandboxes and Cloudflare Containers, highlighting recent improvements to Sandboxes. These improvements include secure credential injection, PTY support for real terminals, persistent code interpreters, background processes with live preview URLs, filesystem watching, snapshots for quick recovery, and active CPU pricing. The post also provides a basic overview of Sandboxes and demonstrates their usage with code examples.
Dynamic, identity-aware, and secure Sandbox auth
4/13/2026
Introduced outbound Workers for Sandboxes and Containers, enabling programmatic egress proxies. This feature allows for flexible and safe authentication, observability, and control over requests originating from sandboxed environments. It supports zero-trust credential injection, dynamic network control, and seamless integration with other Cloudflare Developer Platform services like R2 and KV.
Welcome to Agents Week
4/12/2026
This post introduces the concept of AI agents as a new paradigm that breaks the traditional one-to-many application scaling model. It highlights the inefficiency of containers for agent execution and positions Cloudflare Workers' V8 isolates as a more suitable primitive due to their speed, efficiency, and scalability. The post announces the GA of container-based sandbox environments for agents that require them, while emphasizing the future direction towards isolates, new protocols (MCP), and identity models for agents. It also touches upon the need for new economic and governance infrastructure to support agent interactions with content creators and service providers.
How we use Abstract Syntax Trees (ASTs) to turn Workflows code into visual diagrams
3/27/2026
This post details how Cloudflare Workflows, a durable execution engine built on Cloudflare Workers, now generates visual diagrams of workflow code. It explains the use of Abstract Syntax Trees (ASTs) to statically derive the graph from code, even after minification by bundlers like esbuild, rspack, and vite. The post highlights the challenges of visualizing dynamic execution models and the solution using Rust Workers and the oxc-parser to convert minified JS into ASTs and then into a graphical representation for the dashboard.
Sandboxing AI agents, 100x faster
3/24/2026
Introduced the Dynamic Worker Loader API, now in open beta for paid Workers users. This API allows a Cloudflare Worker to instantiate a new Worker dynamically with code specified at runtime, providing a lightweight sandbox for AI agents. This leverages the existing isolate-based sandboxing mechanism of Cloudflare Workers, offering significantly faster startup times and lower memory usage compared to containers. The post also details how to define tools for agents using TypeScript interfaces and discusses HTTP filtering and credential injection capabilities.
We deserve a better streams API for JavaScript
2/27/2026
This post critiques the existing WHATWG Streams Standard API for JavaScript, highlighting its design decisions made in 2014-2016 that lead to usability and performance issues in modern JavaScript development. It details problems with excessive ceremony for common operations (e.g., reading streams to completion), the complexities and potential pitfalls of the stream locking model, and the limited practical benefit and high complexity of the BYOB (bring your own buffer) feature. The author proposes an alternative approach built around JavaScript language primitives that demonstrates significant performance improvements (2x to 120x faster in benchmarks) and better developer ergonomics, aiming to spark a conversation about the future of streaming APIs.
How we rebuilt Next.js with AI in one week
2/24/2026
Introduced vinext, a drop-in replacement for Next.js built on Vite, which deploys to Cloudflare Workers. vinext reimplements the Next.js API surface (routing, server rendering, React Server Components, server actions, caching, middleware) on Vite, offering significantly faster build times and smaller client bundles compared to Next.js with Turbopack. It supports Incremental Static Regeneration (ISR) out-of-the-box with a pluggable caching handler (defaulting to Cloudflare KV) and enables seamless use of Cloudflare-specific services like Durable Objects and AI bindings during development and deployment.
Building vertical microfrontends on Cloudflare’s platform
1/30/2026
Introduces a new Worker template for Vertical Microfrontends (VMFE) that allows mapping multiple independent Cloudflare Workers to a single domain. This enables teams to work in silos while presenting a single, seamless application to the user. It details how VMFE splits applications by URL path, allowing teams to own the entire vertical stack for a route. The post also covers techniques for creating visually unified experiences using CSS View Transitions and preloading with Speculation Rules, and explains zero-config request routing using service bindings and HTML rewriting.
Introducing Moltworker: a self-hosted personal AI agent, minus the minis
1/29/2026
This post introduces Moltworker, a middleware Worker and adapted scripts that allow running the self-hosted AI agent Moltbot on Cloudflare's Sandbox SDK and Developer Platform APIs. It details how enhanced Node.js compatibility in Workers, the Sandbox SDK for isolated code execution, Browser Rendering for web automation, R2 for persistent storage, and AI Gateway for managing AI provider interactions were leveraged to adapt Moltbot to run on Cloudflare's infrastructure. The post highlights the technical implementation of the AI Gateway integration, the use of Sandboxes with the Sandbox SDK for command execution and file management, and the mounting of R2 buckets for persistent storage. It also explains how Browser Rendering is used for web automation tasks and the integration of a CDP proxy for communication.
Building a serverless, post-quantum Matrix homeserver
1/27/2026
This post details the porting of a Matrix homeserver (Synapse) to Cloudflare Workers. It outlines the architectural changes, including the replacement of PostgreSQL with D1, Redis with KV, and filesystem with R2. It highlights the use of Durable Objects for atomic operations and state resolution, and the implementation of a full OAuth provider. A key contribution is the integration of post-quantum cryptography (X25519MLKEM768) for TLS connections, providing enhanced security for the serverless homeserver.
Astro is joining Cloudflare
1/16/2026
This post announces the acquisition of the Astro web framework by Cloudflare. It highlights Astro's focus on content-driven websites, its 'Islands Architecture', and its growing adoption by platforms and developers. The integration signifies Cloudflare's commitment to making Astro the best framework for content-driven websites, with Astro 6 bringing a new Vite-powered development server that runs on the Cloudflare Workers runtime (workerd), enabling direct use of Workers APIs like Durable Objects, D1, and KV during local development. This deepens the integration of web development frameworks with the edge computing capabilities of Cloudflare Workers.
2025
How Workers powers our internal maintenance scheduling pipeline
12/22/2025
This post details how Cloudflare Workers was used to build an internal maintenance scheduling pipeline. It addresses the challenge of managing complex, overlapping maintenance requests across a global network by creating an automated 'brain' that enforces safety constraints. The post highlights the use of graph processing inspired by Facebook's TAO to efficiently query data and an optimized fetch pipeline with request deduplication, caching, and backoff retries to overcome subrequest limits and achieve a ~99% cache hit rate.
Python Workers redux: fast cold starts, packages, and a uv-first workflow
12/8/2025
Introduced support for any Pyodide-compatible package in Python Workers, replacing limited built-in packages. Implemented dedicated memory snapshots for significantly faster cold starts (over 2.4x faster than AWS Lambda without SnapStart, 3x faster than Google Cloud Run). Developed tooling around `uv` called `pywrangler` to manage package installation and deployment. Added `pywrangler types` for generating type hints for Worker bindings. Detailed the technical implementation of memory snapshots for cold start reduction, including handling entropy and randomness.
Connecting to production: the architecture of remote bindings
11/12/2025
Introduced remote bindings for Cloudflare Workers, allowing local development environments to connect to deployed resources (R2, D1, KV, etc.) by routing binding calls through a remote proxy client and server. This leverages existing service binding architecture and JSRPC over WebSockets for communication, enhancing the local development experience by enabling testing against real production data and services.
A closer look at Python Workflows, now in beta
11/10/2025
Introduces Python Workflows, extending Cloudflare Workers' durable execution capabilities to Python developers. This allows for the creation of multi-step, orchestrated applications using an idiomatic Python SDK, leveraging Pyodide and CPython integration. The post details the technical implementation, including language bridging via FFI and the Pythonic SDK design, and demonstrates DAG execution with concurrent steps.
Async QUIC and HTTP:3 made easy- tokio-quiche is now open-source
11/6/2025
This post announces the open-sourcing of tokio-quiche, an asynchronous QUIC library that combines quiche and the Tokio async runtime. It details how tokio-quiche lowers the barrier to entry for integrating QUIC and HTTP/3 by providing IO integration code, and how it uses actors to drive the QUIC and HTTP/3 state machine. It also introduces the `ApplicationOverQuic` trait and the `H3Driver` for building QUIC applications, and explains the internal architecture with `InboundPacketRouter` and `IoWorker` actors.
Building a better testing experience for Workflows, our durable execution engine for multi-step applications
11/4/2025
Introduced new testing APIs (`introspectWorkflowInstance`, `introspectWorkflow`) within the `cloudflare:test` module for Workflows, enabling granular, isolated, and offline testing. These APIs leverage `vitest-pool-workers` and `workerd` to allow developers to mock step results and events, improving debugging and reducing friction in adopting Workflows. The implementation details the use of privileged local-only APIs and Remote Procedure Calls (RPC) to interact with the Workflow Engine DOs without invasive changes to Miniflare or vitest-pool-workers.
Unpacking Cloudflare Workers CPU Performance Benchmarks
10/14/2025
This post details the investigation and resolution of performance disparities observed in CPU-intensive benchmarks between Cloudflare Workers and Vercel. Key contributions include: 1. Identifying and fixing a scheduling issue related to sharding and warm isolate routing that caused requests to be blocked, impacting perceived performance without affecting billed CPU time. 2. Tuning the V8 garbage collector by adjusting the young generation size, which was previously set too rigidly based on outdated recommendations, leading to a ~25% performance boost. 3. Identifying and fixing unnecessary allocations and buffer copies within the OpenNext adapter and related frameworks (Next.js, React) that were contributing to high garbage collection overhead.
Code Mode: the better way to use MCP
9/26/2025
Introduces 'Code Mode' for Cloudflare Agents SDK, enabling LLMs to generate and execute TypeScript code to interact with MCP servers. This approach improves agent capabilities by leveraging LLMs' proficiency in code generation over direct tool calls, leading to better handling of complex tools and multi-tool sequences. The post details the conversion of MCP schemas to TypeScript APIs and the use of a secure sandbox for code execution.
Eliminating Cold Starts 2: shard and conquer
9/26/2025
Introduced 'Worker sharding' using a consistent hash ring to route requests to existing Worker instances, reducing cold starts. This technique leverages the global network to coalesce requests onto specific servers, ensuring Workers remain warm and minimizing eviction. The implementation uses a consistent hash ring data structure, similar to that used in Cloudflare's HTTP cache, to dynamically map Worker script IDs to server addresses, allowing for graceful handling of server additions or removals.
Cloudflare's developer platform keeps getting better, faster, and more powerful. Here's everything that's new.
9/25/2025
This post announces several significant updates and GA releases for the Cloudflare developer platform, primarily focusing on Cloudflare Workers and related services. Key updates include: enhanced Node.js API compatibility (e.g., `node:fs`, `node:https`, `node:dns`, `node:net`, `node:tls`, `node:crypto`, `process.env`), increased limits for Cloudflare Containers (memory, vCPUs, disk, concurrent instances), GA for Workers Builds with increased disk space (20GB) and CPU power (4 vCPU for paid plans), GA for Remote Bindings for local development (connecting to deployed resources), GA for R2 Infrequent Access storage class, and GA for Media Transformations (resize, clip, reformat video). New capabilities introduced include connecting to Planetscale Postgres, a new Cloudflare Email Service for transactional emails, Cloudflare Data Platform for distributed SQL queries, and VibeSDK for deploying AI vibe coding platforms. AI Search (formerly AutoRAG) now supports models from different providers (e.g., OpenAI, Anthropic) via AI Gateway and has expanded its scope beyond retrieval for LLM apps to general search infrastructure for AI experiences. The Browser Rendering API now supports Playwright and has increased concurrent headless browser limits (30).
Safe in the sandbox: security hardening for Cloudflare Workers
9/25/2025
This post details two key security hardening measures for Cloudflare Workers: 1. The deployment of internal modifications to V8 to use memory protection keys (MPK) to isolate V8 isolates from each other, protecting heap data and preventing cross-isolate memory access in most cases. 2. The adoption and integration of the V8 sandbox, a software-based security boundary that aims to prevent memory corruption attacks from escalating by removing pointers from the heap and utilizing compressed pointers.
A year of improving Node.js compatibility in Cloudflare Workers
9/25/2025
This post details the significant expansion of Node.js compatibility within Cloudflare Workers. It covers the implementation of a substantial subset of the Node.js standard library, including `node:console`, `node:crypto`, `node:dns`, `node:fs`, `node:http`, `node:https`, `node:net`, `node:process`, `node:timers`, `node:tls`, and `node:zlib`. Key technical details include: the implementation of HTTP client and server support using the Fetch API and existing request handling, the creation of a virtual file system for `node:fs` operations (ephemeral per Worker, shared within Durable Objects), and the use of the Workers Sockets API and fetch for `node:net`, `node:tls`, and `node:http`. The `node:dns` module is supported via subrequests to 1.1.1.1. All implementations are native to the Workers runtime, using TypeScript and C++.
Deploy your own AI vibe coding platform — in one click!
9/23/2025
This post introduces VibeSDK, an open-source AI vibe coding platform that leverages Cloudflare Workers for scalable deployment and isolated development environments. It integrates LLM models via Agents SDK, provides secure sandboxes for untrusted AI-generated code, and offers features like project templates, real-time previews, and exportable applications, all served on Cloudflare's global network with integrated observability and caching.
Cap'n Web: A new RPC system for browsers and web servers
9/22/2025
Introduced Cap'n Web, a new RPC protocol and implementation in pure TypeScript. Cap'n Web is designed for the web stack, supporting object-capability patterns, bidirectional calling, promise pipelining, and multiple transports (HTTP, WebSocket, postMessage()). It offers a schema-less, low-boilerplate experience, integrates with TypeScript, and has a human-readable JSON-based serialization. It is suitable for client-to-server and microservice-to-microservice communication, particularly for interactive web applications and complex security boundaries.
Introducing free access to Cloudflare developer features for students
9/22/2025
This post announces the 'Cloudflare for Students' program, offering 12 months of free access to Cloudflare's paid developer features, including increased usage allotments for Workers, Pages Functions, KV, Containers, Vectorize, Hyperdrive, Durable Objects, Workers Logpush, and Queues. It also highlights examples of student projects built using these features, such as an AI-powered text-based adventure game, a DNS lookup bot for Discord, and a placeholder image generation service.
Bringing Node.js HTTP servers to Cloudflare Workers
9/8/2025
Introduces support for the `node:http` client and server APIs within Cloudflare Workers, enabling the deployment of existing Node.js applications and frameworks. This is achieved by building on top of the web-standard `fetch()` API for client requests and implementing a bridge system for server requests that connects Node.js-style servers to the Workers request handling model. Details specific implementations for client APIs (`http.get`, `http.request`) and server APIs (`handleAsNodeRequest`, `httpServerHandler`), along with supported features and current limitations.
Cloudflare is the best place to build realtime voice agents
8/29/2025
Introduced Cloudflare Realtime Agents for orchestrating voice AI pipelines at the edge. Enabled piping raw WebRTC audio as PCM in Workers. Added Workers AI WebSocket support for real-time inference with models like PipeCat's smart-turn-v2. Integrated Deepgram for speech-to-text and text-to-speech on the global network.
Serverless Statusphere: a walk through building serverless ATProto applications on Cloudflare’s Developer Platform
7/24/2025
This post details the construction and deployment of a serverless ATProto application (Statusphere) on Cloudflare's Developer Platform. It specifically showcases the use of Cloudflare Workers (with Rust/WASM) for global code execution, Cloudflare KV for caching DID resolution and session data, D1 for distributed relational data storage, and Durable Objects for managing WebSockets and real-time coordination. The post also covers ATProto's identity and authentication mechanisms, including handle resolution, DID documents, Personal Data Servers (PDS), and OAuth flows, and how these are integrated with Cloudflare's serverless offerings. It also discusses the challenges of adapting ATProto's TypeScript libraries to the Workers runtime and suggests contributions to improve serverless support.
Orange Me2eets: We made an end-to-end encrypted video calling app and it was easy
6/26/2025
This post details the implementation of end-to-end encryption (E2EE) for the open-source video calling application Orange Meets, built on Cloudflare Workers and the Cloudflare Realtime SFU service. It explains the challenges of E2EE for real-time, high-bandwidth communication compared to text messaging, and how the Messaging Layer Security (MLS) protocol was adopted. The implementation involves using a Rust-based Web Worker compiled to WASM for encrypting/decrypting video frames via the WebRTC API's transform stream capabilities. It also addresses codec-specific issues, such as handling VP8 header bytes to prevent browser depacketizing errors, and outlines the process for new users to join encrypted rooms.
Building agents with OpenAI and Cloudflare’s Agents SDK
6/25/2025
This post details the integration of OpenAI's Agents SDK with Cloudflare's Agents SDK (built on Workers and Durable Objects) to create persistent, intelligent agents. It introduces the concept of separating agent cognition (OpenAI) from execution environment (Cloudflare), enabling multi-agent systems, human-in-the-loop workflows, and addressable agents. Key learnings include the stateful nature of Durable Objects for agent memory and the role of routing in agent identity and lifecycle management.
Containers are available in public beta for simple, global, and programmable compute
6/24/2025
Introduces Cloudflare Containers, a new capability that allows users to run containerized applications alongside Cloudflare Workers. This enables a wider range of applications, including media and data processing, backend services, and CLI tools, to be deployed globally at the edge. Containers are integrated with Workers for a simplified workflow, global deployment, and on-demand instance provisioning. The post details configuration options, development workflow with `wrangler dev`, production deployment with `wrangler deploy`, and built-in observability features. It also outlines pricing and future plans for higher limits, autoscaling, and enhanced communication between Containers and Workers.
We shipped FinalizationRegistry in Workers: why you should never use it
6/11/2025
This post introduces the availability of the FinalizationRegistry API in Cloudflare Workers, a feature that allows for callbacks when JavaScript objects are garbage-collected. It details the memory management differences between JavaScript and WebAssembly, explains the inherent issues with FinalizationRegistry due to non-deterministic garbage collection, and provides guidance on its safe usage, particularly in conjunction with WebAssembly. The post also points to newer JavaScript language features as a more reliable alternative for memory management.
Building an AI Agent that puts humans in the loop with Knock and Cloudflare’s Agents SDK
6/3/2025
This post introduces the integration of Knock's Agent Toolkit with Cloudflare's Agents SDK to build AI agents that incorporate human-in-the-loop approval workflows. It details how to expose tools to an LLM, wrap them with Knock's `requireHumanInput` for deferring execution until human approval, and handle asynchronous responses via webhooks. The example demonstrates a virtual card issuing workflow requiring administrative approval.
Let’s DO this: detecting Workers Builds errors across 1 million Durable Objects
5/29/2025
This post details the development of an automated error detection system for Cloudflare Workers Builds, a CI/CD product built on the Workers platform. It addresses the challenge of identifying and categorizing build failures by analyzing logs stored across over a million Durable Objects. The system uses Workers Queues to process build logs, static patterns, and normalized log lines to detect and group errors, enabling proactive fixes and improving the reliability of the Workers Builds product. It also highlights the 'Customer Zero' approach by using the Developer Platform to build and monitor its own services.
Bringing streamable HTTP transport and Python language support to MCP servers
4/30/2025
Introduced Streamable HTTP transport for the Model Context Protocol (MCP) to simplify AI agent communication with services, enabling bi-directional communication over a single endpoint and automatic connection upgrades. Added Python language support for building MCP servers on Cloudflare Workers, leveraging the Python MCP SDK and FastAPI-MCP for easier integration of Python-based services into the agent ecosystem. Enhanced backward compatibility for MCP servers to support both SSE and Streamable HTTP transports concurrently.
A global virtual private cloud for building secure cross-cloud apps on Cloudflare Workers
4/11/2025
Introduces Workers VPC and Workers VPC Private Links, enabling isolated environments for Workers and Developer Platform resources and bidirectional connectivity to external private clouds. This extends the edge computing capabilities of Cloudflare Workers by providing a global virtual private cloud solution for building cross-cloud applications.
Simple, scalable, and global: Containers are coming to Cloudflare Workers in June 2025
4/11/2025
Introduces Cloudflare Containers, a new capability that allows running arbitrary container images within the Cloudflare Workers platform. This extends Workers to support user-generated code in any language, CLI tools, and applications requiring significant memory or CPU. It leverages Durable Objects as programmable sidecars for container lifecycle management, enabling stateful workloads, autoscaling, and advanced routing/orchestration patterns via Workers acting as API gateways and service meshes. The feature is planned for open beta in June 2025.
Startup spotlight: building AI agents and accelerating innovation with Cohort #5
4/11/2025
This post details how Lamatic AI and Skyward AI leverage Cloudflare Workers, Workers for Platforms, Workers AI, Queues, KV, AI Gateway, Durable Objects, and R2 to build scalable AI agent platforms. Lamatic uses Workers for request processing and scaling, Queues for ETL and event-driven workflows, and KV for secure credential storage. Skyward uses Durable Objects for state management and the new AI agents framework for simplified agent communication, with AI Gateway for inference observability and R2 for long-term storage.
Workers AI gets a speed boost, batch workload support, more LoRAs, new models, and a refreshed dashboard
4/11/2025
This post significantly enhances the capabilities of Workers AI by introducing speculative decoding and prefix caching for 2-4x faster inference, an asynchronous batch API to handle large workloads efficiently, and expanded LoRA support for more customized responses. It also recaps new models, updated pricing, and a refreshed dashboard, further solidifying Workers AI as a robust platform for AI inference at the edge.
Make your apps truly interactive with Cloudflare Realtime and RealtimeKit
4/9/2025
This post introduces Cloudflare Realtime and RealtimeKit, significantly expanding the capabilities of Cloudflare Workers for real-time audio and video applications. RealtimeKit provides cross-platform SDKs and UI components to abstract WebRTC complexity, enabling developers to build interactive voice, video, and AI applications rapidly. The post also announces the General Availability of Cloudflare's SFU and TURN services with enhanced features like simulcast and advanced analytics, and a new partnership with Hugging Face for free TURN server access for FastRTC users.
Cloudflare Snippets are now Generally Available
4/9/2025
This post announces the General Availability (GA) of Cloudflare Snippets, a new capability that extends Cloudflare Rules with lightweight JavaScript code. Snippets allow for dynamic HTTP traffic control, such as header modification, custom response serving, and request retries, directly at the edge. The post details the evolution of Snippets from announcement to GA, highlighting key milestones and performance improvements. It also clarifies the distinction between Snippets and Cloudflare Workers, providing use cases and future roadmap items like integration with Secrets Store and enhanced debugging with Cloudflare Trace.
Introducing Cloudflare Secrets Store (Beta): secure your secrets, simplify your workflow
4/9/2025
This post introduces Cloudflare Secrets Store (Beta), a new centralized platform for managing sensitive values like API tokens and credentials. It integrates with Cloudflare Workers, allowing developers to create account-level secrets that can be shared across multiple Workers, addressing previous friction with per-Worker secrets. The post details the security measures, including encryption and RBAC, and outlines future plans for broader product integration and enhanced management capabilities.
Your frontend, backend, and database — now in one Cloudflare Worker
4/8/2025
This post announces significant improvements to Cloudflare Workers, enabling it to host full-stack applications. Key contributions include: general availability (GA) for static asset hosting, GA support for multiple JavaScript frameworks (React Router v7, Astro, Hono, Vue.js, Nuxt, Svelte), improved Node.js API compatibility (crypto, tls, net, dns modules), increased request CPU time to 5 minutes, GA for the Cloudflare Vite plugin with HMR support, GA for the Images binding, and the ability to connect to MySQL databases via Hyperdrive. It also highlights the convergence of Cloudflare Pages features into Workers, such as _headers and _redirects files, and improved Workers Builds integration with GitHub/GitLab for faster deployments and preview URL comments. The post positions Workers as the primary platform for building full-stack applications, superseding Cloudflare Pages for new development.
“Just use Vite”… with the Workers runtime
4/8/2025
Introduces the 1.0 release of the Cloudflare Vite plugin, enabling the Vite dev server to run Worker code within the native Cloudflare Workers runtime (workerd) using Vite's experimental Environment API. This allows for closer parity between development and production environments for Single-Page Applications (SPAs) and full-stack applications. It also announces official support for React Router v7 within this integration. The post details how to create new apps and update existing Vite SPAs with the plugin, and demonstrates the development workflow for client and server code iteration. It also highlights the ability to build, preview, and deploy Vite applications directly using Wrangler.
Deploy your Next.js app to Cloudflare Workers with the Cloudflare adapter for OpenNext
4/8/2025
Introduces the 1.0.0-beta release of the Cloudflare adapter for OpenNext, enabling Next.js applications to be deployed to Cloudflare Workers. Highlights supported features like caching, Partial Prerendering, Middleware, App and Pages routers, and Image Optimization. Mentions ongoing work to support the Node.js Edge runtime and composable caching. Details improvements in Node.js compatibility for Workers and unenv. Outlines plans for v2, focusing on reducing bundle size, improving performance, and multi-Worker deployments. Provides instructions for deploying a Next.js app to Workers using the adapter.
Skip the setup: deploy a Workers application in seconds
4/8/2025
Introduced 'Deploy to Cloudflare' buttons for Git repositories containing Workers applications. These buttons automate the cloning of the repository, provisioning of required Cloudflare resources (Workers KV, D1, R2), configuration of Workers Builds for CI/CD, and the addition of preview URLs for pull requests. This feature aims to drastically simplify the setup and deployment process for open-source Workers projects.
Cloudflare Workflows is now GA: production-ready durable execution
4/7/2025
This post announces the General Availability (GA) of Cloudflare Workflows, a serverless durable execution engine built on Cloudflare Workers. Workflows enable the creation of long-running, multi-step applications with automatic state persistence and retries. Key new capabilities include the `waitForEvent` API for human-in-the-loop interactions or waiting for external webhooks, and enhanced support for building AI agents. The post also details the pricing model, including new storage pricing, and provides a starter project for developers.
Piecing together the Agent puzzle: MCP, authentication & authorization, and Durable Objects free tier
4/7/2025
Introduced new Agents SDK capabilities for building remote MCP clients with built-in transport and authentication. Added integrations with Stytch, Auth0, and WorkOS for BYO OAuth provider support for MCP servers. Implemented hibernation for McpAgent to manage idle stateful servers. Made Durable Objects available in the free tier. Announced Workflows GA and AutoRAG.
Improve your media pipelines with the Images binding for Cloudflare Workers
4/3/2025
This post introduces the Images binding for Cloudflare Workers, allowing developers to programmatically transform, overlay, and encode images directly within the Workers environment. It addresses challenges with the previous `fetch()`-based approach by decoupling optimization from delivery, enabling transformations on local uploads, and allowing for more flexible optimization parameter ordering. The post also details the binding's architecture, its local development support via Wrangler, and provides an example of watermarking and encoding an image before uploading it to R2.
Build and deploy Remote Model Context Protocol (MCP) servers to Cloudflare
3/25/2025
Introduces the ability to build and deploy remote Model Context Protocol (MCP) servers to Cloudflare Workers. This includes the `workers-oauth-provider` library for OAuth integration, the `McpAgent` class in the Cloudflare Agents SDK for remote transport, the `mcp-remote` adapter for client compatibility, and an AI playground as a remote MCP client. The post details the MCP OAuth flow, the role of the MCP server as an OAuth Provider, and the security benefits of issuing custom tokens.
New URLPattern API brings improved pattern matching to Node.js and Cloudflare Workers
3/24/2025
This post details the contribution of Cloudflare's URLPattern API implementation to Node.js, enhancing interoperability between JavaScript runtimes. It explains the URLPattern API's functionality for URL matching and parameter extraction, its role in the WinterTC Minimum Common API, and the technical work involved in unifying implementations and fixing specification inconsistencies. The post also provides examples of using URLPattern for routing in Cloudflare Workers and discusses future standardization efforts.
Making Cloudflare the best platform for building AI Agents
2/25/2025
Introduced the `agents-sdk` JavaScript framework for building AI agents on Cloudflare Workers. Enhanced Workers AI with JSON mode support, improved tool calling capabilities, and longer context windows. The `agents-sdk` allows for real-time communication, state persistence via Durable Objects, long-running tasks, and integration with React applications via the `useAgent` hook.
2024
The forecast is clear: clouds on e-paper, powered by the cloud
12/31/2024
This post details a pet project that integrates an ESP32 microcontroller with an e-paper display, leveraging Cloudflare Workers for rendering and content delivery. It introduces a three-layer software architecture: the ESP32 for display, a Cloudflare Worker for rendering a website into a bitmap using the Browser Rendering API and Puppeteer, and a content server for the original website. The post highlights the use of the Browser Rendering API for generating screenshots and a custom dithering algorithm to convert PNGs to a monochromatic format suitable for e-paper displays. It also provides code examples for the ESP32 and the Worker, along with deployment instructions.
What’s new in Cloudflare: MASQUE now powers 1.1.1.1 & WARP apps, DEX now generally available with Remote Captures
12/27/2024
This post details the integration of MASQUE, an HTTP/3-based protocol, into Cloudflare's 1.1.1.1 and WARP applications for enhanced security and performance. It explains the technical underpinnings of MASQUE, QUIC, and HTTP/3, and how MASQUE's CONNECT-IP method enables tunneling UDP and IP traffic. Additionally, it announces the general availability of Digital Experience Monitoring (DEX) and introduces Remote Captures (PCAP and WARP Diag) for IT admins to remotely collect network traffic and diagnostic logs from end-user devices, streamlining troubleshooting and security analysis.
DO it again: how we used Durable Objects to add WebSockets support and authentication to AI Gateway
11/19/2024
This post introduces WebSocket support and authentication for AI Gateway, built using Durable Objects. It enables persistent, low-overhead communication with AI providers, abstracting away provider-specific protocols and enhancing security with API token authentication. The contribution also details the implementation of asynchronous event handling with the `eventId` field for improved message correlation in streaming scenarios.
Workers Builds: integrated CI/CD built on the Workers platform
10/31/2024
This post details the architecture and implementation of Workers Builds, a new CI/CD system built on the Cloudflare Workers platform. It describes the design choices, including the use of Durable Objects for scheduling and managing individual builds, a Client Worker with a RESTful API for configuration, and Hyperdrive for secure database access. The post highlights the use of Durable Object storage for build logs and the integration with Cloudflare's container platform for executing build jobs.
Build durable applications on Cloudflare Workers: you write the Workflows, we take care of the rest
10/24/2024
This post introduces Cloudflare Workflows, a new durable execution engine built on Cloudflare Workers. Workflows allows developers to build reliable, multi-step applications that automatically handle retries, state persistence, and scaling, abstracting away infrastructure management. It leverages Durable Objects and SQLite for state management, enabling complex use cases like post-processing file uploads, text extraction via Workers AI, and interaction with vector databases. The post also details the architecture of Workflows, highlighting its reliance on Workers, Durable Objects, and Account Controllers.
The story of web framework Hono, from the creator of Hono
10/17/2024
This post details the origin and evolution of the Hono web framework, highlighting its design principles (Trie tree router, Web Standards API), multi-runtime support (Cloudflare Workers, Deno, Bun, Node.js), and its adoption within Cloudflare for core products like D1, Workers Logs, KV, and Queues. It showcases how Hono simplifies application development on Cloudflare Workers by providing a more expressive API for routing, parameter extraction, and integration with Cloudflare bindings compared to vanilla JavaScript. The post also emphasizes Hono's small bundle size and extensibility through middleware.
Our container platform is in production. It has GPUs. Here’s an early look
9/27/2024
This post introduces Cloudflare's new container platform, which runs in production and supports GPUs. It details the platform's architecture, including a global scheduler built on Workers, Durable Objects, and KV, and local schedulers within each location. The platform is runtime-agnostic, supporting gVisor, Firecracker, and QEMU, with evaluation of cloud-hypervisor. It addresses challenges with GPU memory needs, container runtime support, and large image sizes for AI models. The platform powers Workers AI, Browser Rendering, and Workers Builds.
We made Workers KV up to 3x faster — here’s the data
9/26/2024
This post details significant performance optimizations for Workers KV, a key component used by many Cloudflare services. It introduces architectural changes to reduce latency by bypassing intermediary layers (Front Line), implementing tiered cache to minimize requests to storage backends, and adding an in-memory cache for the hottest keys. These optimizations result in up to 3x faster hot reads and up to 20ms faster overall KV operations, directly improving the performance of services like Cloudflare Pages, Queues, and Access.
TURN and anycast: making peer connections work globally
9/25/2024
This post announces the general availability of Cloudflare Calls TURN service, which leverages Cloudflare's anycast network to provide low-latency, globally distributed TURN servers for real-time communication applications. It details how TURN addresses connectivity and privacy challenges posed by NATs and ICE, and explains Cloudflare's specific implementation using anycast for client-server connections and internal backbone forwarding for relayed addresses to overcome stateful protocol challenges.
More NPM packages on Cloudflare Workers: Combining polyfills and native code to support Node.js APIs
9/9/2024
Introduced a hybrid model for Node.js API compatibility in Cloudflare Workers, combining native C++/TypeScript implementations for core APIs (like Buffer, AsyncLocalStorage, Crypto) with polyfills (via unenv) for others. This allows for broader NPM package usage, eliminates the need for the `node:` prefix for many modules, and optimizes Worker size by only polyfilling used APIs. This significantly enhances the ability to leverage the existing JavaScript ecosystem within the Workers runtime.
Cloudflare Zaraz adds support for server-side rendering of X and Instagram embeds
7/10/2024
This post introduces server-side rendering capabilities for X and Instagram embeds within Cloudflare Zaraz, leveraging Cloudflare Workers. It highlights how this approach eliminates third-party JavaScript and cookies, enhances privacy and security by preventing direct browser-to-third-party communication, and significantly improves performance by fetching and caching content server-side. The post details the implementation using Managed Components and provides examples of how to embed posts and the underlying technical process.
Using Fortran on Cloudflare Workers
5/7/2024
This post details the process of running Fortran code on Cloudflare Workers by compiling it to WebAssembly. It introduces a tool called Fortiche, which uses Flang and Emscripten to facilitate this compilation. The post provides examples of a simple addition subroutine and a handwritten digit classifier, demonstrating how to integrate Fortran code into a Cloudflare Worker.
Browser Rendering API GA, rolling out Cloudflare Snippets, SWR, and bringing Workers for Platforms to all users
4/5/2024
The Browser Rendering API is now generally available for all paid Workers customers, with the addition of session management for reusing browser instances to improve performance and reduce costs. Cloudflare Snippets are beginning a phased rollout to 5% of users, offering programmable HTTP request and response modifications. Asynchronous revalidation with stale-while-revalidate (SWR) is planned for the second half of 2024, built on a new Rust-based CDN architecture. Workers for Platforms is being made available to all developers on a $25 pay-as-you-go plan, with enhanced observability and platform control features like Custom Limits, Tail Workers, and Outbound Workers.
Cloudflare acquires PartyKit to allow developers to build real-time multi-user applications
4/5/2024
This post announces the acquisition of PartyKit, an open-source platform for real-time, collaborative, multiplayer applications. It highlights how PartyKit leverages Cloudflare's Durable Objects and WebSockets to make serverless computing stateful, simplifying the development of complex applications like multiplayer games, collaborative tools, and local-first applications. This acquisition represents a significant expansion of Cloudflare Workers' capabilities towards stateful edge computing.
Blazing fast development with full-stack frameworks and Cloudflare
4/5/2024
Introduced `getPlatformProxy()` API and Miniflare's magic proxy to bridge Node.js and workerd runtimes, enabling full-stack web frameworks to use Cloudflare's developer platform resources (D1, R2, KV) during local development with framework-specific dev servers. This significantly reduces development iteration latency by allowing developers to leverage framework tooling while accessing simulated Cloudflare services.
We've added JavaScript-native RPC to Cloudflare Workers
4/5/2024
Introduced JavaScript-native RPC to Cloudflare Workers, enabling direct, low-boilerplate communication between Workers and Durable Objects. This system supports structured clonable types, functions, objects with methods, and byte streams, with performance optimizations for same-thread calls and pipelining for network calls. It is built on Cap'n Proto and integrated into the open-source workerd runtime, emphasizing object-capability security.
New tools for production safety — Gradual deployments, Source maps, Rate Limiting, and new SDKs
4/4/2024
This post introduces several key features that enhance the production readiness and developer control within the Cloudflare Workers ecosystem. It announces Gradual Deployments, allowing for phased rollouts of code changes to Workers and Durable Objects, complete with version-specific observability and session affinity. It also introduces source-mapped stack traces for more effective debugging of minified code, a new Rate Limiting API for runtime control of API usage, and updates to Durable Objects. These additions empower developers to manage complex, mission-critical applications with greater safety and precision.
Announcing Pages support for monorepos, wrangler.toml, database integrations and more!
4/4/2024
This post announces several significant improvements to Cloudflare Pages, enhancing its integration with the broader Cloudflare developer platform and improving developer experience. Key contributions include: 1. Monorepo support for Pages CI/CD, allowing for path-based include/exclude controls to manage builds efficiently within monorepos. 2. The introduction of `wrangler.toml` for Pages project configuration, enabling configuration to be stored in source control and managed alongside code. 3. Direct, one-click integrations with several third-party databases (Neon, PlanetScale, Supabase, Turso, Upstash, Xata), simplifying database connectivity for Pages projects. 4. Enhancements to Next.js support, including an ESLint plugin for compatibility checks, `getRequestContext()` APIs for accessing Cloudflare-specific resources, and an overhauled local development workflow.
Cloudflare Calls: millions of cascading trees all the way down
4/4/2024
This post details the technical implementation of Cloudflare Calls, a new WebRTC infrastructure service. It explains how Cloudflare leverages its global network and Anycast architecture to provide a distributed SFU. Key technical details include using a single IP address per protocol for DTLS, ICE, STUN, SRTP, and SCTP, with L4 load balancing using the 4-tuple hash. It highlights the challenge of DTLS packets lacking connection identifiers and the need for every server to handle them, requiring certificates for decryption. The post also discusses the use of the HTTPS API for offer/answer exchange and its interaction with ICE connectivity checks, and the challenges of slow replies to ICE checks observed in earlier implementations.
How Picsart leverages Cloudflare's Developer Platform to build globally performant services
4/3/2024
Picsart migrated a critical, uncachable, large configuration service from a centralized backend to Cloudflare Workers and Workers KV. This involved distributing compute and data globally to reduce latency for end-users. Key technical contributions include optimizing data segmentation by storing platform and country-specific configurations in separate KV records to reduce parsing overhead on each request, and implementing a dual-write strategy for data consistency during the migration. This resulted in a significant improvement in the percentage of users receiving their configuration within the acceptable time budget.
Leveling up Workers AI: general availability and more new capabilities
4/2/2024
This post announces the General Availability (GA) of Workers AI, highlighting significant improvements in performance, reliability, and cost reductions for popular AI models. It details the expansion of GPU deployment to over 150 cities, introduces next-generation hardware plans, and expands the Hugging Face partnership with new models. Crucially, it introduces support for Bring Your Own LoRA fine-tuned inference and enables developers to write Cloudflare Workers in Python, significantly broadening the platform's capabilities for AI and general serverless development.
Bringing Python to Workers using Pyodide and WebAssembly
4/2/2024
Introduced first-class Python support for Cloudflare Workers by integrating Pyodide directly into the workerd runtime. This enables Python code to run on the edge without external compilation steps, leveraging existing Workers bindings and a subset of popular Python packages. The integration utilizes Pyodide's Emscripten backend for dynamic linking and its Foreign Function Interface (FFI) to bridge Python and JavaScript, allowing seamless interaction with the Workers environment and its APIs.
Why Workers environment variables contain live objects
4/1/2024
This post details how Cloudflare Workers' environment variables are implemented as live objects (bindings) rather than simple strings. It explains how these bindings simplify developer experience by eliminating boilerplate for accessing services like Workers KV and other Workers. Crucially, it highlights the significant security benefits, including immunity to SSRF attacks (with a caveat for origin-bound Workers), the impossibility of leaking API keys that are never exposed as strings, and the elimination of certificate management for intra-service communication. The post also discusses the design philosophy behind bindings, contrasting them with traditional ACL management and emphasizing their role in improving both developer experience and application security.
Improved Cloudflare Workers testing via Vitest and workerd
3/15/2024
Introduces a new Vitest integration for Cloudflare Workers, allowing tests to run directly within the `workerd` runtime. This enables more accurate unit and integration testing of Workers, including interactions with other Cloudflare Developer Platform products (KV, R2, D1, Queues, Service Bindings, Durable Objects). The integration leverages Vitest's custom pools feature to run the test runner inside `workerd`, using WebSockets for communication between the Node.js host and the `workerd` process. It also supports Node.js compatibility features via the `nodejs_compat` flag in `wrangler.toml`.
2023
Better debugging for Cloudflare Workers, now with breakpoints
11/28/2023
This post introduces and details the implementation of breakpoint debugging for Cloudflare Workers within the `workerd` runtime. It explains how the Chrome DevTools Protocol (CDP) is utilized, specifically the Debugger domain, and addresses the challenge of suspending execution in an event-driven, single-threaded environment by introducing a dedicated I/O thread for handling CDP messages. It also covers the setup for local debugging using Wrangler with VSCode and WebStorm, and the importance of source maps for mapping generated JavaScript back to original source code.
Cloudflare named a leader in Forrester Edge Development Platforms Wave, Q4 2023
11/27/2023
This post highlights Cloudflare's recognition as a leader in edge development platforms by Forrester. It details the expansion of Cloudflare Workers and related developer platform products (Pages, R2, KV, Queues, Durable Objects, D1, Stream, Images) for building full-stack distributed applications. Key technical advancements include Smart Placement for optimizing Worker execution location, Hyperdrive for pooling database connections, and Cron Triggers for compute-intensive background tasks. The post emphasizes the ease of use for developers by leveraging web standard APIs, TypeScript support, and integration with popular open-source frameworks. It also details the expansion into AI with Workers AI, offering GPU access for model inference globally and supporting deployment from Hugging Face. The integration of WebGPU and the ongoing development of a secrets store, improved observability, and release management tools are also mentioned.
Virtual networking 101: bridging the gap to understanding TAP
10/6/2023
This post details the technical intricacies of Linux TAP devices, explaining their functionality, setup, and performance tuning. It covers the `tun/tap` interface, device creation via `ioctl` and `/dev/net/tun`, flag options like `IFF_TAP`, `IFF_NO_PI`, and `IFF_VNET_HDR`, and the role of `IFF_NAPI`. It also delves into buffer size management (`txqueuelen`), `virtio_net_hdr` structure, and offloads like `TUN_F_CSUM`, `TUN_F_TSO4`, and `TUN_F_TSO6`, providing practical code examples and insights into potential performance bottlenecks and kernel behaviors.
Hyperdrive: making databases feel like they’re global
9/28/2023
This post introduces Hyperdrive, a new capability for Cloudflare Workers that dramatically speeds up database access. Hyperdrive reduces connection latency by maintaining regional connection pools and caches popular read queries, leading to significant performance improvements (17-25x for cached, 6-8x for uncached queries). It seamlessly integrates with existing database drivers and ORMs by leveraging a modified connection string, allowing developers to connect to various PostgreSQL-compatible databases without rewriting code.
Race ahead with Cloudflare Pages build caching
9/28/2023
This post introduces build caching for Cloudflare Pages, a new feature that significantly reduces build times by storing and reusing dependencies and build outputs. This enhances the CI/CD experience for developers, allowing for faster iterations and deployments, and aligns with the broader evolution of Cloudflare's edge computing capabilities by optimizing the developer workflow.
Re-introducing the Cloudflare Workers Playground
9/28/2023
The Cloudflare Workers Playground has been re-introduced with a revamped editor experience based on VSCode, supporting Module syntax, multi-module Workers, and type-checking. The focus has shifted to the Worker-as-origin use-case. New developer tooling includes Chrome DevTools integration for logs, network requests, and profiling. The playground now allows for easy sharing of code via unique URLs and direct deployment to Cloudflare's global network.
Running Serverless Puppeteer with Workers and Durable Objects
9/28/2023
This post details how to leverage the Cloudflare Workers Browser Rendering API with Durable Objects to create a responsive web design testing tool. It provides code examples for setting up a Worker, a Durable Object that manages persistent browser sessions using `puppeteer.launch` and Durable Object Alarms, and an R2 bucket for storing screenshots. The Durable Object reuses browser sessions across requests, reducing the number of concurrent sessions and associated costs. It also outlines the pricing model for the Browser Rendering API, based on the number of sessions and concurrent sessions.
A Socket API that works across JavaScript runtimes — announcing a WinterCG spec and Node.js implementation of connect()
9/28/2023
This post announces a significant milestone in the standardization of the connect() API for TCP sockets, a feature initially introduced for Cloudflare Workers. It details the publication of a draft specification by the WinterCG community and a Node.js compatible implementation. This advancement aims to create a unified socket API across JavaScript runtimes, simplifying library development and application deployment by bridging the gap between Workers and Node.js environments.
Cloudflare Integrations Marketplace introduces three new partners: Sentry, Momento and Turso
9/28/2023
This post announces the expansion of the Cloudflare Integrations Marketplace with three new partners: Sentry (for observability), Turso (for edge-hosted databases), and Momento (for caching). It details how these integrations simplify connecting Workers to these services by automating credential management and providing SDKs, thereby reducing developer busywork and accelerating application development.
D1: open beta is here
9/28/2023
This post announces the open beta of D1, Cloudflare's native serverless SQL database, highlighting significant scaling improvements with higher per-database storage limits (up to 2GB) and the ability to create many more databases (up to 50,000 per account). It introduces 'Time Travel' for point-in-time database recovery, enabled by default and free of charge. The post also details D1's row-based pricing model, emphasizing cost-efficiency and predictability, and explains how query performance and cost are impacted by indexing. Finally, it positions D1 as a key component for 'Workers for Platforms,' enabling database-per-user isolation for SaaS providers.
New Workers pricing — never pay to wait on I/O again
9/28/2023
Introduced a new pricing model for Cloudflare Workers and Pages Functions that bills based on CPU time rather than wall-clock duration. This change aims to eliminate charges for idle time spent waiting on I/O, making serverless compute more cost-effective, especially for AI applications and I/O-bound workloads. The new model is designed to be simpler, more predictable, and align developer incentives with efficient resource utilization.
You can now use WebGPU in Cloudflare Workers
9/27/2023
Introduced WebGPU support to Cloudflare Workers, enabling high-performance graphics and general-purpose GPU compute tasks at the edge. This was achieved by integrating the Dawn library into the open-source workerd runtime, which translates WebGPU API calls to native platform graphics APIs (Vulkan, Metal, Direct3D 12). WebGPU is currently only available in Durable Objects to manage state and ensure consistent GPU access.
How Waiting Room makes queueing decisions on Cloudflare's highly distributed network
9/20/2023
This post details the evolution of Cloudflare Waiting Room's core queuing mechanism. It explains how the system uses Workers and Durable Objects to make distributed, per-worker decisions on whether to queue traffic or send it to the origin. The article elaborates on the state management, traffic history analysis, and slot allocation strategies employed to minimize latency and prevent origin overload, particularly addressing the challenges of non-uniform traffic distribution across global data centers and workers.
Wasm core dumps and debugging Rust in Cloudflare Workers
8/14/2023
This post introduces the concept and implementation of WebAssembly (Wasm) core dumps and debugging Rust code within Cloudflare Workers. It explains what core dumps are, how they are generated for Wasm (including the use of DWARF), and the current experimental status of Wasm core dump support. Crucially, it details a polyfilling approach using `wasm-coredump-rewriter` to enable core dump generation and debugging for Rust/Wasm in Cloudflare Workers, addressing the lack of native support in the `workerd` runtime.
Hardening Workers KV
8/2/2023
This post details recent incidents impacting Workers KV, highlighting issues with its new architecture, deployment processes, and observability gaps. It outlines the root causes, including an observability gap in error reporting and a mutation to local state that resulted in an unexpected mutation of global state. The post also discusses the challenges encountered during progressive rollouts and the impact on specific data centers and regions. It concludes by emphasizing the need for improved deployment strategies, enhanced observability, and a more robust approach to handling unhandled exceptions and state mutations in Workers.
Cloudflare Workers database integration with Upstash
8/2/2023
This post introduces the integration of Cloudflare Workers with Upstash databases (Redis, Kafka, QStash) via an OAuth2 flow. It details the setup process within the Workers settings and provides a practical implementation example using Upstash Redis to serve localized greetings based on the `cf-ipcountry` header. It also discusses performance optimizations like Smart Placement and Global Databases.
Cloudflare Zaraz steps up: general availability and new pricing
7/19/2023
This post announces the general availability of Cloudflare Zaraz, a product built on Cloudflare Workers. It details Zaraz's functionality in managing third-party tools for data collection, its transition from beta, and introduces a new pricing structure based on 'Zaraz Loads' and feature sets. This marks a significant step in the commercialization and broader adoption of Zaraz, leveraging the underlying Workers platform for server-side processing.
Making Cloudflare Pages the fastest way to serve your sites
6/23/2023
This post details the technical solution for improving Cloudflare Pages' performance by migrating from an O(n) routing lookup mechanism (parsing large JSON routing tables and iterating through regexes) to an O(1) lookup mechanism using Workers for Platforms. The new approach involves hashing the deployment's hostname at deployment time and using this hash for runtime lookups. This significantly reduced Time To First Byte (TTFB) by up to 10x for Pages sites. The post also describes the large-scale migration strategy for over 14 million deployments, including A/B testing, phased rollouts, and ensuring zero downtime for customers.
Donning a MASQUE: building a new protocol into Cloudflare WARP
6/22/2023
This post introduces MASQUE, a new protocol built on HTTP/3 and QUIC, as a replacement for WireGuard in Cloudflare WARP. It highlights MASQUE's advantages in performance, stability, and flexibility due to its standards-based nature and efficient proxying capabilities. The post details how MASQUE leverages Cloudflare's global network and existing infrastructure (like QUIC implementations) to improve user experience and plans for its integration into enterprise Zero Trust products.
Cloudflare Snippets is now available in alpha
6/21/2023
Introduced Cloudflare Snippets, a new feature built on the Workers Platform, allowing users to run small pieces of custom JavaScript within the Ruleset Engine. Snippets have specific resource limits (5ms execution time, 2MB memory, 32KB package size) and run before Workers. They are available across all plan levels with varying limits per zone. The post details the architecture of Snippets, including their integration with the Ruleset Engine, the Snippet ID and Rule ID association, and the sequential execution flow through the Snippets Internal Worker Service.
How Kinsta used Workers and Workers KV to improve cache hit rates by 56%
6/21/2023
This guest post by Kinsta details how they achieved a 56.3% increase in cache hit rates by leveraging Cloudflare Workers and Workers KV. They implemented programmatic customization of cache keys based on domain settings and customer optimization options (like Polish and Auto Minify), and microcached Workers KV data with a 30-second TTL to reduce read operations by 80% and improve responsiveness to client-side configuration changes. This demonstrates a practical application of Workers for advanced caching strategies and efficient data management.
Dynamic data collection with Zaraz Worker Variables
6/2/2023
Introduced Cloudflare Zaraz Worker Variables, a feature that allows custom JavaScript code to be executed server-side within Cloudflare Workers. This enables dynamic data collection, transformation, and enrichment for third-party analytics tools. The implementation leverages Dynamic Dispatch to call user-associated Workers from the Zaraz Worker, passing context and returning a Response object. Examples demonstrate translating GTM custom JavaScript variables and enriching user data via external APIs.
D1: We turned it up to 11
5/19/2023
This post announces a major update to Cloudflare's D1 database, a native serverless SQL database built on SQLite, which is tightly integrated with Cloudflare Workers. Key updates include dramatic improvements to performance and scalability (up to 20x faster reads, 6.8-11x faster writes), a new storage backend, a new console interface for querying, formal support for JSON functions, and the introduction of 'Location Hints' to influence database placement. It also details the upcoming pricing model, which will include an always-free tier and be based on reads, writes, and storage, and announces 'Time Travel' functionality for point-in-time recovery within the last 30 days.
More Node.js APIs in Cloudflare Workers — Streams, Path, StringDecoder
5/19/2023
This post announces the addition of Node.js Streams, Path, and StringDecoder APIs to Cloudflare Workers, significantly improving compatibility with existing Node.js-based npm packages. It also previews a new `NodeJsCompatModule` type in the open-source `workerd` runtime that emulates the Node.js environment more closely, making Node.js globals and core APIs available without the `node:` specifier prefix. This allows for easier migration and use of popular npm packages within Workers.
Workers Browser Rendering API enters open beta
5/19/2023
Introduces the open beta of the Workers Browser Rendering API, allowing programmatic control of headless Chromium instances via the DevTools Protocol. Integrates with Wrangler for deployment and provides a forked, open-sourced Puppeteer library (`@cloudflare/puppeteer`) for easy interaction. Demonstrates usage with a screenshotting example Worker. Highlights internal dogfooding with Cloudflare Radar URL Scanner and outlines future plans for upstreaming Puppeteer changes and supporting Playwright and WebDriver BiDi.
Announcing Cloudflare Secrets Store
5/18/2023
This post introduces Cloudflare Secrets Store, a new secrets management offering that addresses the need for a secure, centralized repository for sensitive data. It builds upon the existing secrets management capabilities for Cloudflare Workers by enabling account-level secrets that can be shared across multiple Workers scripts and other Cloudflare services like the WAF. The post details the security measures, including scoped permissions and audit logs, and highlights the benefits for both developers and security administrators.
Using LangChainJS and Cloudflare Workers together
5/18/2023
This post highlights the integration of LangChainJS with Cloudflare Workers, enabling developers to build AI-powered applications at the edge. It demonstrates how to set up a basic application using OpenAI's LLMs, load and split text from web pages using CheerioWebBaseLoader, and introduces the concepts of embeddings and vector stores for more sophisticated AI interactions. This expands the capabilities of Cloudflare Workers into the realm of AI application development.
Building Cloudflare on Cloudflare
5/18/2023
This post details Cloudflare's strategic shift towards building its own internal services, including core proxy logic like the 'Front Line' (FL) service, using the Cloudflare Workers developer platform. It highlights the motivation for this migration, which includes overcoming the latency and complexity of HTTP-based inter-service communication in a traditional proxy chain, improving developer experience, and enabling faster, more isolated deployments. The post contrasts the initial integration of internal workers (running before customer scripts) with the more ambitious goal of replacing monolithic services entirely. It discusses the technical challenges encountered and addressed, such as accessing internal services, emitting logs, state caching, and direct origin requests, and how the Workers platform's capabilities are being extended to meet these needs. The post emphasizes the benefits of using the same tooling and platform for internal development as for external customers.
How Cloudflare is powering the next generation of platforms with Workers
5/18/2023
Introduced three new features for Workers for Platforms: Outbound Workers to monitor and control outgoing requests from user Workers, Custom Limits to set usage caps (CPU time, subrequests) for customer Workers, and Tail Workers to provide real-time logging and debugging capabilities for user Workers. These features enhance platform control, security, and developer experience for SaaS businesses building on Cloudflare Workers.
Making Cloudflare the best place for your web applications
5/17/2023
This post announces the convergence of Cloudflare Pages and Workers into a unified development and application hosting platform, emphasizing low-latency global compute, free egress, and access to storage, KV, Queues, and D1 databases. It introduces 'Smart Placement' for compute, which intelligently determines the optimal network location for application execution beyond just the edge. Developer tooling is enhanced with Wrangler v3, an upgraded VSCode-powered online editor, and improved Chrome DevTools. Resource limits (memory, CPU, bundle size) and startup latency limits are increased, with plans for simplified pricing. Pages CI now uses a modern build image with build caching. The post also highlights improved adapters for full-stack web frameworks (Next.js, Angular, Qwik, Astro, Nuxt, Solid) and the introduction of the C3 CLI for rapid application deployment.
A whole new Quick Edit in Cloudflare Workers
5/17/2023
Introduced a new Quick Edit experience for Cloudflare Workers, powered by VSCode for Web, embedded within the Cloudflare dashboard. This upgrade includes support for multiple JavaScript modules (imports/exports), a high-fidelity edge preview environment that uses the same system as `wrangler dev`, improved error handling with detailed stack traces, and JSDoc TypeScript typechecking with preloaded worker types. The implementation leverages `MessageChannel` for cross-frame communication between the dashboard and the VSCode for Web iframe, and an in-memory filesystem for editing worker code.
Bringing a unified developer experience to Cloudflare Workers and Pages
5/17/2023
This post announces the convergence of Cloudflare Workers and Pages into a single development platform. It details the 'why' behind this decision, driven by user feedback and the blurring lines between the two products. The post outlines the future vision of a unified project concept that can include static assets, serverless functions (Workers), and resources (KV, DO, R2, D1). It highlights improvements to deployment workflows (git-ops, previews, environments), local development with a unified Wrangler CLI, and the benefits of this convergence (low latency, free egress, JS runtime). It also introduces immediate changes like a unified creation flow for Pages/Workers, starter templates, an integrated CLI experience for full-stack frameworks, and a merged project list dashboard. Seamless migration for existing projects is emphasized as a top priority.
Modernizing the toolbox for Cloudflare Pages builds
5/17/2023
Introduced a new beta build system for Cloudflare Pages with updated default versions of Node.js, Python, and Ruby, and added support for pnpm. Re-architected the build system from a monolithic Kubernetes container to a modular approach using sequential init containers, improving isolation between system and user stages. This modularity enables future features like build caching. Rearchitected build log streaming to use a global log collector container.
Improved local development with wrangler and workerd
5/17/2023
This post announces Wrangler v3, which defaults to local development using Miniflare v3 powered by the `workerd` runtime. It details the architectural changes, including the use of SQLite for storage and the approach to running unit tests within `workerd` via WebSockets. It also highlights the successful porting of `workerd` to Windows.
Smart Placement speeds up applications by moving code close to your backend — no config needed
5/16/2023
Introduced 'Smart Placement' for Workers and Pages Functions, an automatic system that optimizes compute resource location to minimize application latency. It analyzes fetch requests to backend services and invokes the Worker from an optimal data center (either near the user or near the backend) based on latency data. It automatically excludes globally distributed services and analytics/logging services. The feature is available in open beta and can be configured via settings or wrangler.toml.
Announcing connect() — a new API for creating TCP sockets from Cloudflare Workers
5/16/2023
This post introduces the new `connect()` API for Cloudflare Workers, enabling outbound TCP socket connections. This significantly expands Workers' capabilities by allowing direct connections to any TCP-based service, including databases, which was previously a major limitation. The API is designed to be interoperable and simplifies TLS handling. The post highlights its immediate impact with the integration of the popular `pg` PostgreSQL driver, paving the way for broader database connectivity and full-stack application development on Workers.
Consent management made easy and clear with Cloudflare Zaraz
4/18/2023
This post introduces Cloudflare Zaraz's new Consent Manager functionality, which leverages Cloudflare Workers to simplify the process of gathering and managing user consent for third-party tools. It addresses the growing need for privacy compliance by providing an opt-in consent modal that respects user choices before scripts are loaded, preventing data loss and avoiding dark patterns. The feature aims to make consent management easy and clear for website owners.
Introducing Rollbacks for Workers Deployments
4/3/2023
Introduced rollbacks for Cloudflare Workers deployments, allowing users to revert to previous versions of their Workers via the dashboard or the `wrangler rollback` command. This feature enhances confidence in deploying Workers by providing a quick way to revert to a known good state.
Use the language of your choice with Pages Functions via WebAssembly
3/24/2023
Introduced WebAssembly (Wasm) support for Cloudflare Pages Functions, allowing developers to deploy server-side logic written in languages like Rust, C++, and C# to the edge. This leverages the existing Wasm module support in Cloudflare Workers. The post details how to import and instantiate Wasm modules within Pages Functions, providing a code example using Rust compiled to Wasm. It also introduces the ability to import raw text and binary files as modules.
Node.js compatibility for Cloudflare Workers – starting with Async Context Tracking, EventEmitter, Buffer, assert, and util
3/23/2023
This post introduces the initial rollout of Node.js core API compatibility within Cloudflare Workers, specifically focusing on AsyncLocalStorage, EventEmitter, Buffer, assert, and parts of util. It details the implementation of AsyncLocalStorage for asynchronous context tracking, EventEmitter for event handling with captureRejections, Buffer for binary data manipulation, and assert for testing utilities. The post also mentions the ongoing effort to standardize AsyncContext in JavaScript and the future potential for its integration.
Accelerate building resiliency into systems with Cloudflare Workers
3/8/2023
This post details how Cloudflare Workers were leveraged to build a weighted traffic routing module for email service providers. This solution significantly improved the resiliency of Cloudflare's email notification systems by enabling rapid failover between vendors, thus preventing outages caused by external ESP failures and ensuring timely delivery of critical emails. The implementation minimized code changes in existing services and provided near-instantaneous deployment of configuration updates.
Oxy is Cloudflare's Rust-based next generation proxy framework
3/2/2023
This post introduces Oxy, a new Rust-based proxy framework that serves as a foundation for several Cloudflare projects, including the Zero Trust Gateway and iCloud Private Relay's second hop proxy. Oxy enhances Cloudflare's edge computing capabilities by providing a programmable, highly customizable, and extensible proxy server that can handle massive amounts of traffic. It allows engineers to control every aspect of proxying, from protocol decapsulation to DNS resolution, and integrates with surrounding infrastructure for telemetry and networking services. Its extensibility model is similar to Cloudflare Workers, enabling developers to build sophisticated applications with minimal code.
How we built an open-source SEO tool using Workers, D1, and Queues
3/2/2023
This post showcases the use of Cloudflare Workers in conjunction with new developer tools like D1 and Queues to build an open-source SEO monitoring tool called Prospector. It highlights how Workers serve as the user-facing API and coordinator, D1 for data storage, and Queues for handling background tasks like URL fetching and notifications. The post also emphasizes the improved developer experience with enhanced TypeScript bindings and the Hono framework for API development, demonstrating the platform's capability for building production-ready applications.
So long, and thanks for all the deployments: deprecating Wrangler v1
2/16/2023
This post announces the deprecation of Wrangler v1 and the full transition to Wrangler v2. It details the reasons for the rewrite (maintainability and complexity of v1), the improvements in v2 (offline development, zero-config startup, developer tools support), and the migration process for users. It also highlights the success of v2 surpassing v1 in downloads.
Welcome to Wildebeest: the Fediverse on Cloudflare
2/8/2023
This post introduces Wildebeest, an open-source, Mastodon-compatible Fediverse server built entirely on Cloudflare Pages and Workers. It details the architecture, leveraging Pages Functions for API endpoints and a Qwik-based frontend, D1 for database storage, and R2 for object storage. It highlights the use of Pages Functions for routing and implementing the Mastodon API, Qwik for the frontend with SSR/SSG, and D1 for SQLite-based data storage with migrations. Challenges with D1 and UUIDs are discussed.
2022
Doubling down on local development with Workers: Miniflare meets workerd
11/18/2022
This post introduces Miniflare 3, powered by the open-sourced `workerd` runtime, which provides bug-for-bug compatibility with the Cloudflare Workers production environment. This eliminates subtle behavior mismatches previously present in Miniflare 2, improving local development fidelity. It also introduces experimental opt-in support for accessing real data (initially Workers KV) locally. The default behavior of `wrangler dev` will shift to `--local` mode due to significant performance improvements in startup and script reload times. A new `wrangler init --from-dash` command is introduced to facilitate local development of existing dashboard-based Workers.
Improving Workers TypeScript support: accuracy, ergonomics and interoperability
11/18/2022
This post details significant improvements to the automatic generation of TypeScript types for the Cloudflare Workers runtime. Key advancements include: rebuilding generation scripts using `workerd`'s RTTI system for greater accuracy and maintainability, open-sourcing these scripts, introducing separate type versions for improved interoperability with browser/standard types, enabling selection of types based on compatibility dates, automating the generation of ambient types from `wrangler.toml` for bindings and module rules, and integrating documentation and changelogs directly into the types. The system also allows for handwritten overrides to enhance type fidelity, such as adding generics, specifying method overloads, and renaming types.
Twilio Segment Edge SDK powered by Cloudflare Workers
11/18/2022
This post details how Twilio Segment built their Edge SDK on Cloudflare Workers to address challenges in first-party data collection and real-time personalization. It explains the architecture of the Edge SDK, including how it injects analytics.js snippets into web pages, proxies Segment CDN and API requests to first-party domains, and rewrites client-side cookies as HTTPOnly cookies for persistent user identity. The post highlights the use of Cloudflare Workers' scalability, no cold-start, and Workers KV for storage, as well as the HTMLRewriter API for modifying HTML responses.
Spice up your sites on Cloudflare Pages with Pages Functions General Availability
11/17/2022
This post announces the general availability of Pages Functions, which are essentially specialized Cloudflare Workers integrated into the Cloudflare Pages platform. It details the improvements made during the beta period, including enhanced debugging (log tailing via `wrangler pages deployment tail`), real-time metrics in the dashboard, and deeper integration with Cloudflare's storage offerings (KV, Durable Objects, R2, D1, Queues, Analytics Engine) via bindings. It also introduces secret bindings for encrypted environment variables and Pages Plugins for third-party service integrations. Compatibility with frameworks like Next.js 13, Remix, SvelteKit, and others is highlighted, along with the 'advanced mode' for direct Worker integration. The post also clarifies the scaling and billing model, noting that Pages Functions are billed under Workers paid plans, with unlimited free static asset requests and per-request billing for dynamic functions.
Incremental adoption of micro-frontends with Cloudflare Workers
11/17/2022
Introduced a technique called "fragment piercing" to incrementally adopt micro-frontends into legacy client-side rendered web applications. This involves rendering server-side rendered fragments using Cloudflare Workers and then seamlessly embedding them into the existing application's DOM without visual disruption or loss of state. Demonstrated this with a "productivity suite" demo using React, Qwik, and SolidJS.
Keep track of Workers’ code and configuration changes with Deployments
11/17/2022
Introduced Deployments for Cloudflare Workers, a feature that tracks changes to Worker code, configuration, and bindings. Deployments provide an audit log of who made changes, from where, and when. This lays the groundwork for future features like automated deployments and rollbacks. The feature is available in open beta.
Server-side render full stack applications with Pages Functions
11/17/2022
This post announces the general availability of Cloudflare Pages Functions, enabling server-side rendering (SSR) for full-stack applications. It details how Pages Functions, built on Cloudflare Workers, allow developers to deploy applications using frameworks like Astro, Next.js, Qwik, Remix, and Svelte. The post explains the benefits of SSR for performance and user experience, contrasting it with client-side rendering. It provides specific integration guides for QwikCity, Astro, SolidStart, and Nuxt.js, demonstrating how to configure these frameworks to deploy SSR applications to Cloudflare Pages.
The most programmable Supercloud with Cloudflare Snippets
11/17/2022
Introduced Cloudflare Snippets, a new feature allowing users to run small code modifications (JavaScript, VCL, .htaccess) within the Ruleset Engine. Snippets are designed for simpler traffic modifications than full Cloudflare Workers, with strict resource limits (5ms execution, 2MB memory, 32KB package size) and are available at no additional cost for all plan levels. Snippets can be triggered by Ruleset Engine filters and support multiple additive executions per request. A VCL converter is being built to aid migration from legacy systems.
UPDATE Supercloud SET status = 'open alpha' WHERE product = 'D1';
11/16/2022
This post announces the open alpha of D1, a global relational database built on Cloudflare Workers. It details how developers can interact with D1 through the dashboard and Wrangler CLI, including executing SQL files and managing migrations. It also highlights the integration of D1 with Workers and Pages Functions for building full-stack serverless applications. Additionally, it showcases community-contributed tooling for D1, such as d1-orm, workers-qb, d1-console, and a Kysely adapter, and outlines current limitations in testing, such as replication and JavaScript transaction support.
Bringing authentication and identification to Workers through Mutual TLS
11/16/2022
This post announces the upcoming introduction of mutual TLS (mTLS) authentication for outbound requests from Cloudflare Workers. It highlights the limitations of current service-to-service authentication methods like Authenticated Origin Pull and token authentication, emphasizing the need for granular, secure, and identity-aware communication. The new mTLS feature will allow Workers to present client certificates, enabling servers to validate the identity of the specific Worker making the request, thus enhancing security and simplifying management for inter-service communication.
Automate an isolated browser instance with just a few lines of code
11/16/2022
Introduces the Workers Browser Rendering API, a new capability that allows developers to run browser automation frameworks like Puppeteer directly within Cloudflare Workers. This is achieved by repurposing remote browser isolation technology, providing disposable browser instances secured by gVisor and seccomp profiles. The API simplifies common browser automation tasks such as taking screenshots and performing UI/UX and performance testing, with plans for full Puppeteer support. It integrates with existing Cloudflare services like R2 for storage and Bot Management for abuse prevention.
Making static sites dynamic with Cloudflare D1
11/16/2022
This post introduces Cloudflare D1, a serverless SQL database, and demonstrates its integration with Cloudflare Workers. It showcases how D1 can be used to add dynamic, relational data capabilities to static sites, enabling the creation of comments APIs and other data-driven features without requiring developers to manage database infrastructure. The post details the process of setting up a D1 database, configuring bindings in wrangler, and interacting with the database using SQL commands and within Workers functions.
Xata Workers: client-side database access without client-side secrets
11/16/2022
Xata has built Xata Workers on top of Cloudflare Workers for Platforms. Xata Workers act as middleware for simplifying database access, allowing developers to deploy functions that sit in front of their databases. This enables client-side database access without exposing secrets by executing database logic on Cloudflare's edge. Key features include: executing JavaScript/TypeScript functions on Cloudflare's global network, framework/provider agnostic deployment, automatic build/deployment via CLI, type-safe code generation based on schema, and the ability to cache query results using KV Namespaces.
Get started with Cloudflare Workers with ready-made templates
11/15/2022
Introduced a collection of ready-made templates for Cloudflare Workers to accelerate developer onboarding and project setup. These templates showcase various use cases, including image sharing with Pages Functions, direct creator uploads to Cloudflare Stream, and Durable Object-powered request schedulers. Highlighted a template for accepting payment for video content using Pages Functions, Cloudflare Stream, and Stripe Checkout, demonstrating secure URL generation for video access. Enhanced developer experience with an integrated 'Deploy with Workers' button, support for Test Driven Development using Wrangler's unstable_dev API and Vitest, and seamless integration with StackBlitz for online IDE development.
Easy Postgres integration on Cloudflare Workers with Neon.tech
11/15/2022
This post introduces a new integration for Cloudflare Workers with Neon.tech, a serverless PostgreSQL provider. It addresses the challenge of connecting Workers to databases by leveraging a WebSocket proxy and a specialized client library (`@neondatabase/serverless`) that shims Node.js features not present in Workers. This enables developers to easily use PostgreSQL within their Workers, including advanced use cases like geospatial queries with PostGIS, and demonstrates how to provide connection details and write Worker code for database interaction.
Cloudflare Workers scale too well and broke our infrastructure, so we are rebuilding it on Workers
11/14/2022
This post details how DevCycle rebuilt its event pipeline on Cloudflare Workers to handle instantaneous load spikes that overwhelmed their traditional AWS infrastructure. It highlights the challenges of scaling traditional cloud services versus the inherent scalability of Workers, and outlines the architectural shift to a Worker-based event ingestion system using Kinesis Data Firehose to S3, with future plans for Cloudflare Queues and R2. It also discusses best practices for architecting applications with Workers, emphasizing data locality and the use of Cloudflare's data services (KV, Durable Objects, R2, D1).
The road to a more standards-compliant Workers API
11/14/2022
This post details Cloudflare's participation in the WinterCG and the subsequent improvements made to the Workers runtime to align with the Minimum Common Web Platform API. Specifically, it highlights the enhanced implementations of Event and EventTarget, including support for subclassing, one-time handlers, cancelable handlers via AbortSignal, and event listener objects. It also introduces the implementation of AbortController and AbortSignal for task cancellation, and mentions ongoing work to align with standards for text encoding/decoding, URL parsing, and streams.
And here's another one: the Next.js Edge Runtime becomes the fourth full-stack framework supported by Cloudflare Pages
10/24/2022
This post details the integration of Next.js with the Edge Runtime on Cloudflare Pages. It explains how the `@cloudflare/next-on-pages` CLI transforms Next.js applications into Cloudflare Workers, enabling server-side rendering and API routes at the edge. It also covers the use of compatibility dates and flags for runtime versioning and experimental webpack minification for script size optimization.
Cloudflare Workers and micro-frontends: made for one another
10/20/2022
Introduced a 'fragments architecture' for building micro-frontends using Cloudflare Workers. This architecture allows independent frontend components (fragments) to be deployed as separate Workers and collaborate to server-side render a complete application. Key benefits include independent development and deployment of fragments, encapsulation of server-only code, composability, improved Lighthouse scores through streaming server-rendered HTML, and eager interactivity where fragments can become interactive before the entire page is loaded. The Qwik framework was highlighted as a suitable choice for implementing fragments due to its HTML-first focus and low JavaScript overhead.
Introducing workerd: the Open Source Workers runtime
9/27/2022
This post introduces workerd, the open-source JavaScript/Wasm runtime based on the same code that powers Cloudflare Workers. It details workerd's capabilities for self-hosting Workers, local development and testing, and programmable proxies. Key architectural features highlighted include its server-first design, adherence to web standard APIs, nanoservice architecture for efficient inter-service communication within a single process, homogeneous deployment model where every machine runs every service, and capability bindings for secure and configurable access to external resources, preventing SSRF attacks.
Cloudflare Queues: globally distributed queues without the egress fees
9/27/2022
This post introduces Cloudflare Queues, a new globally distributed message queuing service that integrates directly with Cloudflare Workers. It enables reliable, at-least-once message delivery, supports batching for efficient processing, and crucially, eliminates egress fees for message data. The post details how Queues function as a foundational building block for more complex and reliable applications on the Developer Platform, allowing developers to defer tasks, scale processing, and decouple services.
D1: our quest to simplify databases
9/27/2022
This post introduces D1, Cloudflare's first SQL database designed to work with Cloudflare Workers, enabling developers to build full-stack applications entirely on Cloudflare's global network. It highlights the seamless integration with Wrangler for database creation, bootstrapping, and local development. The post also details automatic backup and restore capabilities, dashboard management, and a significant upcoming feature: JavaScript transactions implemented via stored procedures to address the challenges of distributed transactions in a serverless environment.
Securing the Internet of Things
9/26/2022
This post introduces the application of Cloudflare Workers and the broader Cloudflare platform to the Internet of Things (IoT) space. It highlights the development of an IoT platform that provides device management, cellular connectivity provisioning, and robust security. Key contributions include leveraging Workers for offloading authentication and compute, using API Shield for securing device communication, and extending Cloudflare Gateway for policy-based control of IoT device network traffic. The post also emphasizes moving compute off resource-constrained IoT devices to the edge via Workers, Analytics Engine, D1, and Pub/Sub, thereby reducing device cost and complexity while enhancing security and enabling faster iteration.
Going originless with Cloudflare Workers – Building a Todo app – Part 1: The API
9/21/2022
This post details the architecture and implementation of a Todo API built entirely on Cloudflare Workers and D1. It introduces the concept of 'originless' applications using Custom Domains for Workers, enabling global distribution and scalability. The post outlines the use of a gateway Worker for routing and authorization, individual Workers for CRUD operations on todos, and a D1 database for persistence. It provides code examples for setting up the D1 database, creating endpoint Workers, and configuring the gateway Worker with service bindings and custom domain routes.
The easiest way to build a modern SaaS application
9/21/2022
This post announces the General Availability (GA) of 'Workers for Platforms' for Enterprise customers, a significant expansion of Cloudflare Workers tailored for SaaS businesses. It introduces key features like Dispatch Workers for routing and authentication, User Workers for end-developer customization, unlimited script support, and Dynamic Dispatch Namespaces to overcome limitations of Service Bindings in a multi-tenant environment. This marks a strategic move to empower SaaS vendors to offer deep customization to their customers without compromising their core product development.
1.1.1.1 + WARP: More features, still private
8/6/2022
This post details significant enhancements to the 1.1.1.1 + WARP apps, focusing on improving the user experience by providing geographically accurate browsing without compromising privacy. It introduces a new mechanism to ensure relevant search results and content access by replacing user IP addresses with geolocated Cloudflare egress IPs. Additionally, it announces an expansion of the WARP+ network to over 275 cities, offering improved speed and lower latency for subscribers. The post also reiterates the commitment to privacy by not requesting specific location permissions or logging user IP addresses.
Build your next big idea with Cloudflare Pages
8/5/2022
This post introduces Cloudflare Pages, a platform for deploying static sites and integrating with Cloudflare Workers for dynamic functionality. It highlights unlimited requests, bandwidth, free seats, and projects on the free tier. It also details integrations with Cloudflare Workers, Access, custom domains, and Web Analytics. Future integrations with R2 and D1 are mentioned.
Building a scheduling system with Workers and Durable Objects
8/5/2022
This post introduces a practical application of Cloudflare Workers and Durable Objects for building a scalable scheduling system. It demonstrates how to leverage Durable Objects for persistent storage of request metadata and Alarms for triggering scheduled HTTP requests, enabling use cases like webhook services, email reminders, and invoice notifications. The post provides a step-by-step guide to setting up such a system locally and deploying it to the Cloudflare network.
Running Zig with WASI on Cloudflare Workers
8/1/2022
This post details the process of compiling Zig code to WebAssembly with WASI support and deploying it to Cloudflare Workers. It demonstrates that existing Zig code, which reads from stdin and writes to stdout, can be run on Workers without modification by leveraging the `wasm32-wasi` target and the `wrangler@wasm` CLI tool. The post highlights the ease of cross-compilation and deployment, showcasing a "Hello, World!" style example of a line-numbering utility.
Announcing support for WASI on Cloudflare Workers
7/7/2022
This post introduces experimental support for WASI (WebAssembly System Interface) on Cloudflare Workers and within the wrangler2 tool. It explains the need for WASI to provide a standard system interface for WebAssembly, enabling code written in languages like Rust and C/C++ to run on the edge without language-specific toolchains. The post demonstrates compiling and running POSIX-compliant applications (like 'Hello, world!', 'hexyl', 'swc', and 'zstd') on Workers, showcasing the ability to deploy CLI applications as cloud services. It also provides boilerplate for invoking WASI modules from JavaScript Workers.
Network performance update: Platform Week
5/16/2022
This post details an update to Cloudflare's network performance benchmarking, expanding the measured networks from 1,000 to 3,000 and refining the methodology to include 'Wait time' in addition to 'Time to First Byte' (TTFB) for evaluating Cloudflare Workers against competitors like Fastly's Compute@Edge. It presents new performance data showing Cloudflare's leading position in a larger network set and outlines the updated testing approach using Catchpoint and real-user measurements for various compute workloads (simple JS, complex JS, complex Rust). The post also highlights the removal of a 'no benchmarking' clause from the Terms of Service to encourage independent validation.
This post introduces Cloudflare Pub/Sub, a programmable message bus built on MQTT, as a new capability for the Cloudflare Developer Platform. It allows developers to publish and subscribe to messages, filter, aggregate, and modify them using Cloudflare Workers before distribution. This enables real-time messaging, event routing, and moving logic to the edge, complementing existing Workers features like KV, Durable Objects, and R2 for building full-stack applications.
Introducing Custom Domains for Workers
5/12/2022
Introduces Custom Domains for Cloudflare Workers, allowing users to map a domain directly to a Worker. This feature simplifies DNS record management, certificate issuance, and treats the Worker as the origin server. It enhances the ability to interact with other services via bindings and enables Workers to invoke each other. The post provides an example of an API gateway Worker that uses Service Bindings for authorization and delegation.
Introducing Pages Plugins
5/12/2022
Introduced Pages Plugins, a mechanism for creating and sharing reusable, customizable runtime code modules for Cloudflare Pages applications. Plugins are composable Pages Functions, granting them the full power of Workers, including middleware, parameterized routes, and static assets. This simplifies common development patterns by providing ready-made code for integration with third-party services (Sentry, Honeycomb, Stytch) and internal tools (Google Chat, Cloudflare Access, Static forms, GraphQL).
Announcing D1: our first SQL database
5/11/2022
This post announces the launch of D1, Cloudflare's first SQL database, specifically designed for Cloudflare Workers. It highlights D1's foundation on SQLite, its serverless nature, and its potential for building various applications like APIs, eCommerce sites, and CRMs. The post details the developer experience, including easy database creation, integration with Workers via bindings, and the use of Wrangler 2. It also outlines future features such as read replication, batching, embedded compute, automatic backups to R2, and import/export capabilities, further enhancing the stateful capabilities of the Workers platform.
Durable Objects Alarms — a wake-up call for your applications
5/11/2022
This post introduces Durable Objects Alarms, a new capability for Durable Objects within the Cloudflare Workers ecosystem. Alarms allow Durable Objects to schedule their own future execution via an `alarm()` handler, providing guaranteed at-least-once execution and enabling use cases like queues and deferred processing. This significantly enhances the fault tolerance and programmatic control of Durable Objects, complementing the existing edge computing capabilities of Workers.
Announcing Workers for Platforms: making every application on the Internet more programmable
5/10/2022
Introduced 'Workers for Platforms', a new offering that enables third-party platforms to embed custom logic and developer experiences directly into their products. This includes APIs for managing large numbers of Workers at scale (hundreds of thousands to millions) using tags for bulk actions, Trace Workers for debugging by collecting logs and exceptions, and Dynamic Dispatch for chaining Workers to run platform-defined logic before customer-defined logic. This builds upon the existing edge computing capabilities of Cloudflare Workers.
Service Bindings are generally available, with efficient pricing
5/10/2022
Introduced Service Bindings, a new API for Worker-to-Worker communication that avoids internet transit and enables application logic segmentation. Highlights cost efficiency by charging for total allocated compute time across chained Workers rather than per-invocation, eliminating charges for idle resources. Provides an example of an API Gateway Worker using Service Bindings to route requests to other Workers for authentication and data retrieval.
A new era for Cloudflare Pages builds
5/10/2022
This post details significant improvements to the Cloudflare Pages build experience, a platform leveraging Cloudflare Workers. Key updates include a new build infrastructure that drastically reduces build initialization time (from 2+ minutes to 2-3 seconds) by using pre-warmed machines and gVisor for secure sandboxing. It also introduces real-time build log streaming for faster debugging and provides granular control over branch deployments, allowing users to specify included/excluded branches and use a 'CI Skip' command. Future plans for Pages include incremental builds, caching, updated build images, and improved error messaging.
Introducing Direct Uploads for Cloudflare Pages
5/10/2022
Introduced direct uploads for Cloudflare Pages, allowing developers to bypass integrated CI pipelines and deploy build artifacts directly. This supports various source control providers (including non-Git like SVN/Mercurial) and custom CI tools. Developers can now use the Wrangler CLI (`npx wrangler pages publish <directory>`) or drag-and-drop assets into the dashboard to create new projects and subsequent deployments. This feature enhances flexibility for complex build scenarios and self-hosted repositories.
A Community Group for Web-interoperable JavaScript runtimes
5/9/2022
This post announces the establishment of the Web-interoperable Runtimes Community Group (WinterCG), co-founded by Cloudflare, Vercel, and Shopify. It highlights the need for standardized web APIs in non-browser JavaScript environments like Cloudflare Workers, Node.js, and Deno, to improve developer code portability and address the limitations of browser-centric standards. The post details the group's goals, including defining a 'Minimum Common Web API' and working on specifications for Web Cryptography Streams and a subset of fetch() for servers, all aimed at maximizing interoperability across these environments.
Cloudflare and StackBlitz partner to deliver an instant and secure developer experience
5/9/2022
This post introduces a partnership with StackBlitz to bring the Cloudflare Workers development experience directly into the browser using StackBlitz's WebContainers. This enables instant, dependency-free development environments for Workers applications, powered by WebAssembly. It highlights improvements to Wrangler to support running in Node.js environments, including the browser. The post also showcases new templates for creating Workers applications (router, durable-objects, typescript) and discusses future plans to enable full developer lifecycle features within the browser, such as authentication, edge development, publishing, and debugging.
10 things I love about Wrangler v2.0
5/9/2022
This post announces the general availability of Wrangler v2.0, a complete rewrite of the CLI for building Cloudflare Workers. Key improvements include: simplified installation via the `wrangler` npm package, zero-configuration startup, a one-liner `wrangler init` command for project setup, a `--local` development mode powered by Miniflare, on-demand log tailing (`wrangler tail`), enhanced error and warning messages, on-demand debugging tools (hotkey 'D'), native npm module support, and experimental Node.js compatibility mode. The rewrite also addresses hundreds of outstanding issues and bugs from the previous version.
The next chapter for Cloudflare Workers: open source
5/9/2022
Cloudflare is open-sourcing the Workers runtime under the Apache-2.0 license. This decision was driven by developer feedback regarding vendor lock-in and the desire for local development environments. The runtime was built using a Service Workers API model for portability and to avoid the latency of containers in a multi-tenant environment. The open-sourcing aims to foster broader adoption and allow developers to build with Workers wherever they want.
Cloudflare Relay Worker
5/2/2022
This post introduces an open-sourced Cloudflare Worker designed to transform generic webhook payloads into formats required by various communication platforms, exemplified by integration with Rocket Chat. It details the steps for cloning the worker repository, configuring environment variables (secrets and URLs), implementing authentication, converting incoming JSON payloads, and sending POST requests to the target service. The post also covers deployment via Wrangler and integration with Cloudflare's Notification Center.
A Workers optimization
that reduces your bill
1/14/2022
This post details an optimization to the Cloudflare Workers runtime that reduces billing for Unbound Workers. The change allows Workers to be marked as 'idle' as soon as response headers are returned when the response body is simply being streamed through without modification. This optimization also applies to WebSocket proxying, reading from the cache, and streaming from KV. The average 'in use' time for Workers has dropped by 70% as a result.
Miniflare 2.0: fully-local development and testing for Workers
1/7/2022
Miniflare 2.0 is released, offering a fully-local development and testing environment for Cloudflare Workers. Key improvements include a modular design with separate packages for components like KV and Durable Objects, reduced install size, and increased accuracy in replicating the Workers runtime. It introduces live-reload and first-class Jest integration for testing, with a custom test environment that provides access to Workers runtime APIs and isolated storage. The post details Miniflare's architecture, leveraging Node.js's `vm` module and `undici`, and provides examples of local development setup and Jest testing.
2021
Supporting Remix with full stack Cloudflare Pages
12/17/2021
This post announces the integration of Remix framework with Cloudflare Pages, enabling full-stack applications to be deployed on the edge. It highlights the native compatibility between Remix and Cloudflare Workers, the performance benefits of edge deployment, and the integration with Cloudflare's data storage options (KV, Durable Objects, and upcoming R2). It also details the deployment process via GitHub/GitLab integration and the use of `functions/[[path]].ts` for serverless functions within Pages.
Zaraz use Workers to make third-party tools secure and fast
12/8/2021
This post details the technical decision to use Cloudflare Workers for Zaraz, a service that runs third-party tool code at the edge. It explains the challenges of traditional third-party script execution (performance impact, security risks, data privacy concerns) and how Workers addresses these by enabling JavaScript execution close to the user. The post highlights the requirements for Zaraz's infrastructure (run JavaScript, secure, programmable, fast, globally distributed) and why Workers was chosen over other serverless platforms. It also includes a basic example of a Cloudflare Worker handling a fetch event to return dynamic JavaScript.
Network Performance Update: Full Stack Week
11/20/2021
This post details performance improvements in Cloudflare Workers and the global network. For Workers, it presents benchmark results showing it is 196% faster than Fastly's Compute@Edge based on time to first byte, using a simple function returning request headers. For network performance, it reports an increase in networks where Cloudflare is the fastest provider for TCP Connection Time, reaching 79 new networks (a 14% increase) out of the top 1000 global networks. It provides case studies on improving performance in Peru by addressing uneven traffic distribution and in Sri Lanka by correcting misrouted traffic to Newark, resulting in significant RTT drops and improved rankings in those regions.
Announcing native support for Stripe’s JavaScript SDK in Cloudflare Workers
11/19/2021
This post announces the general availability of the Stripe JavaScript SDK for Cloudflare Workers. Previously, developers had to use Stripe's REST API due to Node.js dependencies in the SDK. This update enables direct use of the Stripe SDK within Workers, simplifying integration for payment processing and webhook handling. It highlights the use of `Stripe.createFetchHttpClient()` and `Stripe.createSubtleCryptoProvider()` for compatibility with the Workers runtime. It also showcases integration with Cloudflare Pages' serverless function support and provides example code for initiating Stripe Checkout sessions and validating webhooks.
Launching a Startup on Cloudflare Workers
11/19/2021
This post details the architecture of cClip, a fully serverless application built on Cloudflare Workers and KV, integrating with Firebase for authentication and messaging, RevenueCat for subscription management, Stripe for billing, and Backblaze B2 for storage. It highlights the use of Workers for authentication, authorization, and access control, validating JWTs from Firebase and managing subscription status updates from RevenueCat. The post also discusses challenges in cross-platform subscription management and file quota tracking, and the use of Flutter for cross-platform client development.
Workers, Now Even More Unbound: 15 Minutes, 100 Scripts, and No Egress Fees
11/18/2021
This post announces several significant enhancements to the Cloudflare Workers platform: removal of egress fees for Workers Unbound and Durable Objects, an increase in the maximum CPU time limit for Workers to 15 minutes (accessible via Cron Triggers and the 'Unbound' usage model), an increase in the maximum number of deployable Worker scripts to 100 per account (representing up to 100 environments per account with Services), and plans to support larger script sizes to enable more complex applications and libraries, including Golang with WASM.
Developer Spotlight: Automating Workflows with Airtable and Cloudflare Workers
11/18/2021
This post details how a developer integrated Cloudflare Workers with Airtable and other third-party APIs (Shopify, Shippo, ShipStation) to automate complex e-commerce workflows for a perishable goods business. Key technical contributions include:
- Developing Cloudflare Workers APIs to fetch Shopify orders, calculate transit times via Shippo, and update order details in Airtable.
- Utilizing Workers Cache API for efficient data retrieval.
- Creating a Workers API to format Airtable data as CSV for Google Sheets.
- Building a Workers API to update order weight and size in ShipStation via its API, using Workers KV for caching order ID mappings.
- Demonstrating the use of Workers for smaller-scale, business-critical applications, highlighting its development experience, reliability, and security benefits.
Cloudflare Pages Goes Full Stack
11/17/2021
This post announces the integration of Cloudflare Workers with Cloudflare Pages, enabling full-stack application deployment. Developers can now deploy serverless functions alongside static assets by adding a `./functions` directory to their project. This integration supports various bindings (KV, Durable Objects, R2, environment variables, secrets) and provides preview deployments for both frontend and backend code. Local development is facilitated by the wrangler CLI with Miniflare. The post also highlights seamless integration with SvelteKit and the ability to use server-side rendering within Pages. Existing Workers can be deployed to Pages by generating a `_worker.js` file.
Developer Spotlight: Chris Coyier, CodePen
11/17/2021
This post highlights how CodePen uses Cloudflare Workers for various functionalities, including manipulating HTML fetched from an external CMS before it reaches the user's browser, and using Workers KV to cache results of expensive jobs. It emphasizes the performance benefits and positive developer experience of using Workers and its associated tools like HTMLRewriter and KV storage.
Building a full stack application with Cloudflare Pages
11/17/2021
This post details the integration of serverless functions within Cloudflare Pages, enabling full-stack application development. It introduces file-based routing for functions, dynamic data handling using KV namespaces and Durable Objects, and integration with Cloudflare Images and Cloudflare Access via middleware. The post also demonstrates how to build React frontends that consume these serverless functions.
wrangler 2.0 — a new developer experience for Cloudflare Workers
11/16/2021
This post introduces wrangler 2.0, a new generation of developer tooling for Cloudflare Workers. Key improvements include an "out-of-the-box" experience requiring no configuration for a single JavaScript file, automatic bundling and deployment to a development environment with a localhost proxy, and a redesigned live remote debugging experience that feels like local execution. It also introduces a "local mode" powered by Miniflare, allowing Workers to run directly on the developer's machine. The post highlights the beta release and encourages feedback.
Developer Spotlight: James Ross, Nodecraft
11/16/2021
This post highlights how Nodecraft uses Cloudflare Workers for various use cases including website optimization, image content negotiation, and serving high-traffic APIs (PlayerDB). It details their use of Workers for handling 100 million requests per month, reducing infrastructure maintenance costs, and eliminating scaling concerns. The post also mentions their adoption of Workers Sites and HTMLRewriter for dynamic content injection into static architectures, and their anticipation of Workers Functions and R2.
Automatically generating types for Cloudflare Workers
11/16/2021
Introduced an automated pipeline for generating TypeScript and Rust types for Cloudflare Workers. This pipeline runs on every Workers runtime build, ensuring type accuracy and reducing manual effort. It also generates an intermediate representation (IR) of static types, enabling other language ecosystems to create their own type definitions.
JavaScript modules are now supported on Cloudflare Workers
11/16/2021
This post introduces support for JavaScript modules (ECMAScript modules) in Cloudflare Workers. This allows for standard import/export syntax, improving code organization and reusability. It also introduces a new event handler syntax for module workers, spreading event parameters like `request` and `environment` for better security and clarity. The post also details how to import WebAssembly, text, and binary modules, and provides guidance on using the new module format with Wrangler 2.0 and existing projects with Wrangler 1.0.
Introducing Services: Build Composable, Distributed Applications on Cloudflare Workers
11/16/2021
Introduced 'Services' as a new building block for Cloudflare Workers, enabling composable, distributed applications. Services support multiple environments (production and preview) for testing and promotion, with automatic migration of existing scripts to services. Introduced 'service bindings' for direct, zero-cost HTTP communication between services, eliminating network latency and enabling a dependency graph-based deployment model.
Introducing Relational Database Connectors
11/15/2021
This post introduces support for relational databases (Postgres, MySQL) from Cloudflare Workers. It details the challenges of serverless database connections (TCP requirements, library compatibility, connection management) and outlines Cloudflare's initial approach using cloudflared tunnels and a shim-layer to adapt socket APIs. The post also highlights future plans for native TCP support, connection pooling, and global data caching, inviting developer collaboration.
Developer Spotlight: Winning a Game Jam with Jamstack and Durable Objects
11/15/2021
This post details the architecture and implementation of a game jam entry, 'Full Tilt,' which leverages Cloudflare Workers and Durable Objects for on-demand, geographically distributed game rooms. It explains the use of Durable Objects for creating stateful 'mini servers' or 'rooms' that clients can connect to via WebSockets. A 'Room Hub' Durable Object is introduced to manage the mapping between short, human-readable room codes and the randomly generated Durable Object IDs, ensuring that game rooms are created geographically close to the end-user. The post also discusses the trade-offs between WebRTC and a serverless approach for communication and the design of the room code generation to avoid confusion.
Making connections with TCP and Sockets for Workers
11/15/2021
This post introduces the development of new APIs and infrastructure for Cloudflare Workers to support non-HTTP socket connections (TCP, UDP, QUIC). It details an initial approach using WebSockets tunneled over Cloudflare Tunnels to connect to a PostgreSQL database, highlighting its limitations. The post proposes a new, standardized JavaScript API for socket connections, designed to be cross-runtime compatible and built on existing Web Platform standards. It also announces 'Socket Workers,' which will allow Workers to be connected to directly using raw TCP, UDP, or QUIC protocols, enabling the implementation of various server-side protocols like SMTP, MQTT, and VoIP at the edge.
Durable Objects — now Generally Available
11/15/2021
This post announces the General Availability of Durable Objects, a key feature within the Cloudflare Workers platform. Durable Objects provide a new programming paradigm for state coordination across Workers, enabling developers to build complex, globally scalable applications like collaborative editors and game servers with simplified code. The post highlights improvements made since the early access announcement, including enhanced reliability, performance, jurisdictional restrictions, and caching, and outlines future development plans for replication and geo-distribution.
Workers adds support for two modern data platforms: MongoDB Atlas and Prisma
11/15/2021
This post announces the integration of Cloudflare Workers with two modern data platforms: MongoDB Atlas and Prisma. For MongoDB Atlas, the integration is facilitated by the Realm SDK, enabling developers to leverage MongoDB's document model, MQL, and Global Clusters directly from Workers. For Prisma, the integration is achieved through the Prisma Data Proxy, allowing Workers to interact with various SQL databases (Postgres, SQL Server, MySQL, SQLite) and MongoDB via Prisma's ORM capabilities, including type-safety, schema migrations, and query optimization.
Cloudflare recognized as a 'Leader' in The Forrester New Wave for Edge Development Platforms
10/27/2021
This post announces Cloudflare's recognition as a 'Leader' in The Forrester New Wave for Edge Development Platforms. It highlights Cloudflare Workers and related services (Workers KV, Pages, Stream, Images) for their strong compute, data services, and web development capabilities at the edge. The post emphasizes the intuitive developer experience, fast global deployment, and minimal cold start times. It also mentions Durable Objects as a key innovation for edge data storage, abstracting away complexities of data placement and regions for developers. The recognition signifies industry validation of Cloudflare's approach to edge development.
Introducing Custom Headers for Cloudflare Pages
10/27/2021
This post introduces native support for custom headers and enhanced redirects within Cloudflare Pages. It highlights how this feature, built on Cloudflare Workers, simplifies the configuration of SEO directives (like X-Robots-Tag), security headers (X-Frame-Options, Content-Security-Policy), and CORS policies directly within a Pages project via a `_headers` file. It also details improvements to the `_redirects` file with splats and placeholders. The post emphasizes the improved developer experience and the underlying engine's similarity to the URLPattern specification.
Backwards-compatibility in
Cloudflare Workers
10/19/2021
Introduced the concept of 'compatibility dates' for Cloudflare Workers. This allows for the introduction of backwards-incompatible changes to the Workers Runtime by providing developers with a mechanism to opt-in to these changes. Developers can set a compatibility date in their project metadata, and the runtime will selectively apply new behaviors based on this date. This addresses the challenge of fixing bugs or improving existing functionality without breaking existing production applications.
Dynamic Process Isolation: Research by Cloudflare and TU Graz
10/12/2021
Introduced Dynamic Process Isolation, a novel Spectre defense mechanism for Cloudflare Workers. This defense uses hardware performance counters to detect branch mispredictions indicative of Spectre variant 1 attacks. Upon detection, suspicious Workers are moved into separate OS processes, leveraging kernel-level defenses. The research, conducted in partnership with TU Graz, also developed a working Spectre variant 1 attack that could leak memory at 120 bits per hour in an ideal scenario, demonstrating the need for enhanced defenses.
Announcing Cloudflare R2 Storage: Rapid and Reliable Object Storage, minus the egress fees
9/28/2021
This post announces Cloudflare R2 Storage, a new object storage service that integrates deeply with Cloudflare Workers. R2 offers S3 API compatibility with zero egress fees, significantly lower storage costs, and intelligent dynamic tiering. Its key contribution to the feature thread is enabling developers to build data pipelines and manipulate objects stored in R2 directly from the edge using Workers, opening up new possibilities for data processing, IoT data ingestion, and content delivery at the edge.
Bringing OAuth 2.0 to Wrangler
9/23/2021
This post introduces the integration of the OAuth 2.0 protocol into Wrangler, the Workers command-line interface. This enhances the developer experience by replacing cumbersome API token management with a more secure and user-friendly authorization flow. It details the implementation of the Authorization Code Flow with PKCE challenges, enabling users to select specific permissions (scopes) and revoke access easily via `wrangler logout`. The post also highlights the security improvements brought by CSRF states, PKCE challenges, and short-lived access tokens.
Cloudflare Pages is Lightning Fast
9/18/2021
This post details the performance advantages of Cloudflare Pages, highlighting its foundation on Cloudflare's global edge network, adoption of new web standards (TLS 1.3, IPv6, QUIC/HTTP/3), and a developer-centric experience with fast builds and integrated Web Analytics. It benchmarks Pages against competitors, demonstrating superior Time to First Byte (TTFB) globally. The post also emphasizes the importance of Web Core Vitals and how Pages facilitates achieving them.
Profiling Your Workers with Wrangler
9/18/2021
This post introduces beta support for local CPU profiling of Cloudflare Workers using Wrangler and Chrome DevTools. It demonstrates how developers can use `wrangler dev --inspect` and `chrome://inspect` to connect to their local Workers, profile their execution, and analyze flame graphs to identify performance bottlenecks, thereby enhancing the observability of the Workers platform.
Announcing Project Turpentine: an easy way to get off Varnish
9/17/2021
Introduced Turpentine, a VCL-to-TypeScript converter, to facilitate migration of legacy Varnish configurations to Cloudflare Workers. Turpentine parses VCL, generates optimized TypeScript code, and deploys it to the edge, enabling programmability and leveraging Cloudflare's platform features beyond caching.
Cloudflare Workers: the Fast Serverless Platform
9/13/2021
This post details performance improvements in Cloudflare Workers, highlighting a 30% increase in P90 performance over three years and a 210% advantage over Lambda@Edge. It explains that Workers' speed is due to its edge-first architecture using lightweight V8 isolates, which eliminates cold starts, and its ability to benefit from V8 compiler updates and Cloudflare's network infrastructure. The post also emphasizes the rapid global deployment of Workers (under a second) and ongoing efforts to improve the developer experience through faster deployment cycles and debugging tools.
Native Rust support on Cloudflare Workers
9/9/2021
Introduced the `worker` crate for Cloudflare Workers, enabling developers to write Workers entirely in Rust without JavaScript. This crate provides Rustacean-friendly APIs for common Workers features like `fetch()`, KV stores, Durable Objects, secrets, and environment variables, simplifying the development of Rust-based Workers applications.
Introducing logs from the dashboard for Cloudflare Workers
8/24/2021
This post introduces integrated logging and exception tracking for Cloudflare Workers, accessible directly from the dashboard and via the `wrangler tail` command. This feature simplifies debugging by allowing developers to view `console.log` output and exceptions without any configuration or additional cost. It also enhances visibility into Durable Objects interactions and provides advanced filtering capabilities through the `wrangler` CLI, including sampling and structured log output.
Building a Pet Cam using a Raspberry Pi, Cloudflare Tunnels and Teams
8/19/2021
This post details how Cloudflare Tunnel and Cloudflare for Teams can be used to securely expose an internal service (a Raspberry Pi pet cam) to the internet. It demonstrates the setup process, including installing and configuring Cloudflare Tunnel on a Raspberry Pi, and integrating Cloudflare Access with Google authentication for secure remote access. This extends the use case of edge computing to personal IoT devices and highlights the security benefits of Cloudflare's platform for such applications.
Building the Cloudflare Summer Challenge Application
8/13/2021
This post details the technical implementation of the Cloudflare Summer Developer Challenge application, which uses Cloudflare Workers Sites (a precursor to Cloudflare Pages) for static site hosting and backend API functionality. It highlights the use of the `worktop` web framework for routing, a custom build system for inlining CSS and JavaScript into HTML for performance, and the `esbuild` bundler for the Worker. The post also discusses dynamic variable injection into HTML templates during runtime.
Modernizing a familiar approach to REST APIs, with PostgreSQL and Cloudflare Workers
8/4/2021
This post introduces the capability to build REST APIs that communicate directly with PostgreSQL databases from Cloudflare Workers. It highlights the use of PostgREST to generate a REST API from Postgres, Cloudflare Tunnel for secure exposure, and the `postgrest-js` library for interacting with the API within Workers. It also explores how Workers can be used for intelligent caching and new scaling approaches for Postgres applications.
Durable Objects: Easy, Fast, Correct — Choose three
8/3/2021
This post introduces Durable Objects as a significant enhancement to Cloudflare Workers. It explains how Durable Objects provide a single-threaded execution model with private, persistent storage, which simplifies state management and eliminates common race conditions and performance issues previously encountered when interacting with distributed storage. The post highlights that these improvements are achieved by fixing the runtime model, making applications correct by default without requiring code changes, and significantly improving performance by reducing I/O round trips and enabling in-memory caching.
Introducing Workers Usage Notifications
7/22/2021
Introduced Workers usage notifications, including a weekly summary of usage statistics (request counts, duration, egress data transfer, median CPU time) and an on-demand 'Workers Usage Report' triggered by a 25% increase in CPU usage compared to the previous seven days. These notifications aim to proactively inform developers about their Worker's production traffic and potential issues like bugs or unexpected cost increases.
Announcing Rollbacks and API Access for Pages
6/23/2021
This post introduces two key features for Cloudflare Pages: deployment rollbacks and API access. Rollbacks allow users to revert to previous working deployments with a single click, enhancing production stability. The Pages API provides programmatic control over projects and deployments, enabling custom integrations and automations. The post also highlights how Cloudflare Workers can be used to interact with the Pages API, for example, to trigger hourly builds for dynamic static content.
Building Waiting Room on Workers and Durable Objects
6/16/2021
This post details the technical design and implementation of Cloudflare's Waiting Room product, which was built using Cloudflare Workers and Durable Objects. It explains the core functionality of managing traffic spikes by creating an orderly queue, the configuration options (Total Active Users, New Users Per Minute, Session Duration), and the underlying mechanisms. Key technical aspects include: issuing encrypted cookies as tickets, coordinating user slot allocation across data centers using historical traffic data, clustering users by bucketId for queue management, and maintaining the waiting room state through aggregated historical data from different data centers. The post also illustrates the user experience with cookie content and a traffic chart.
QUIC Version 1 is live on Cloudflare
5/28/2021
This post announces the general availability of QUIC Version 1 (RFC 9000) and HTTP/3 on Cloudflare's network. It details the technical implementation, including how Cloudflare servers listen for QUIC traffic on UDP port 443, the handshake process involving version identifiers and ALPN, and the use of HTTP Alternative Services (RFC 7838) for protocol negotiation. It highlights the use of Cloudflare's open-source quiche library in Rust for powering this functionality and mentions the quiche-client tool for debugging and interoperability testing.
Building real-time games using Workers, Durable Objects, and Unity
5/26/2021
This post details the technical implementation of a real-time multiplayer game, 'Durable World', built entirely on Cloudflare's stack. It showcases how Cloudflare Workers, Durable Objects, and WebSockets can be used together to manage game state, synchronize player positions, and handle real-time communication. The post provides code examples for the Durable Object's `Character` module, including session handling, message broadcasting, and player state management. It also discusses the client-side implementation in Unity WebGL, focusing on how player input and game state are managed and synchronized with the server.
Multiplayer Doom on Cloudflare Workers
5/18/2021
This post details the porting of the Chocolate Doom game engine to WebAssembly and its integration with Cloudflare Workers and Durable Objects to create a serverless multiplayer gaming experience. It highlights the challenges of adapting a UDP-based network protocol to TCP/WebSockets, the implementation of a new network driver (`net_websockets.c`), and the use of `emscripten_set_main_loop()` to handle the event-driven browser environment. The post also introduces the concept of a message routing server on the edge to manage player connections and facilitate communication.
Automating Cloudflare Tunnel with Terraform
5/14/2021
This post introduces the automation of Cloudflare Tunnel using Terraform, enabling Infrastructure as Code for secure application exposure. It details the transition from manual 'classic' tunnels to API-driven 'Named Tunnels' and demonstrates how to provision tunnels, backend instances (like GCP compute instances), and DNS records using Terraform. This significantly enhances the scalability, CI/CD integration, and dynamic resource management capabilities of Cloudflare Tunnel.
Containers at the edge: it’s not what you think, or maybe it is
4/17/2021
This post announces Cloudflare's exploration of running containers at the edge, contrasting it with their existing isolate-based Workers platform. It details the technical rationale for choosing isolates for distributed systems due to their lightweight nature and efficiency for single requests, while acknowledging containers' suitability for legacy applications, complex single-user applications (like browsers and games), and internal batch processing (like CI builds) where isolates are not a good fit. The post highlights the internal use of containers for the Browser Isolation product and discusses potential use cases for customers, including off-peak compute utilization and CI builds. It also addresses the performance implications of migrating containerized web applications to the edge, noting potential cold start issues and the cognitive overhead of managing state across a distributed container environment.
Announcing Cloudflare’s Database Partners
4/16/2021
This post announces partnerships with Macrometa and Fauna, expanding the capabilities of Cloudflare Workers by enabling seamless integration with edge-first databases. It highlights how these partnerships address the challenge of managing 'state' at the edge, complementing Workers KV and Durable Objects by offering solutions for complex data querying, transactional workloads, and real-time data processing. The post details the specific offerings of Macrometa (global replication, NoSQL, search, pub/sub, streams) and Fauna (global transactional database, GraphQL, custom business logic), and provides case studies demonstrating their use with Workers for e-commerce and AI voice assistants.
Introducing workers.new, custom builds, and improved logging for Workers
4/16/2021
Introduced `workers.new` for instant JavaScript editor access to create and test Workers. Enhanced `wrangler` with custom build script support, allowing developers to use any JavaScript bundler (webpack, Rollup, Parcel, esbuild) for more complex deployments. Improved `wrangler tail` with a new 'pretty' output format for easier log and exception readability.
Node.js support in Cloudflare Workers
4/16/2021
Introduced support for Node.js packages in Cloudflare Workers, initially through webpack bundling, allowing the use of over 20k packages. Announced plans to increase Worker size limits and reimplement/polyfill native Node.js APIs to support a wider range of libraries, including Stripe.js SDK, Twilio Client JS SDK, and database libraries. This expands the edge computing capabilities of Workers by bringing more server-side Node.js functionality to the edge.
Announcing Cloudflare for SaaS for Everyone
4/15/2021
This post announces the rebranding of 'SSL for SaaS' to 'Cloudflare for SaaS' and its availability to all customers, not just Enterprise. It highlights how Cloudflare for SaaS, when combined with Cloudflare Workers, provides a comprehensive solution for SaaS providers by abstracting away infrastructure management, security, and performance concerns, allowing developers to focus on their core product. It showcases Statusflare as an example of a SaaS product built on Workers that benefits from Cloudflare for SaaS for custom domain and certificate management.
Introducing WebSockets Support in Cloudflare Workers
4/14/2021
Introduced support for WebSockets in Cloudflare Workers, enabling real-time, interactive serverless applications. This involves handling the 'Upgrade' header, instantiating WebSocketPair, and using the `webSocket` property on the Response with a 101 status code. The post also details how to manage WebSocket events (message, close) and integrate with Durable Objects for stateful applications.
Improve your page experience with AMP and Cloudflare Workers Unbound
4/14/2021
Introduces an integration for AMP Optimizer with Cloudflare Workers, allowing for server-side optimization of AMP pages. This leverages Workers Unbound to handle potentially longer optimization tasks (up to 30 seconds) and caches optimized results globally. The integration automatically adds preload tags for external resources and can generate responsive image source sets using Cloudflare Image Optimization.
Announcing Cloudflare Workers Unbound for General Availability
4/14/2021
This post announces the General Availability of Cloudflare Workers Unbound, extending execution limits to 30 seconds for HTTP requests and introducing a private beta for Cron Triggers up to 15 minutes. It details pricing changes, including a reduction in egress costs and an increase in included usage for the Workers Paid plan. The post also highlights use cases such as genomic analysis, enterprise caching (EverCache), and sandboxing/experimentation, and provides instructions for enabling and configuring Workers Unbound via the dashboard and wrangler.
Bringing AI to the edge with NVIDIA GPUs
4/13/2021
This post announces the integration of NVIDIA GPUs and TensorFlow into the Cloudflare Workers platform, enabling AI inference at the edge. It highlights the ability to run AI-based applications globally with low latency, securely handle models, and use familiar tools. The post also showcases a demo application, 'nataornot.com', which uses a TensorFlow model running on an NVIDIA A100 GPU at the edge.
Location-based personalization at the edge with Cloudflare Workers
4/13/2021
Introduced free and accessible geolocation data (country, city, continent, latitude, longitude, postal code, metro code, region, timezone) for all Cloudflare Workers developers, including those on the free plan. This enables server-side personalization based on user location, facilitating the creation of location-aware applications and improving user experience by reducing reliance on client-side JavaScript and cookies for personalization.
Cloudflare Pages is now Generally Available
4/12/2021
This post announces the general availability of Cloudflare Pages, a platform for building, hosting, and collaborating on Jamstack sites. It highlights key features like seamless builds, instant feedback for teams, bullet-proof security and scale, integrated web analytics, built-in redirects via a `_redirects` file, protected previews with Cloudflare Access integration, live previews with Cloudflare Tunnel, and optimized assets through image compression (Polish) and Gzip/Brotli. It also outlines future plans including GitLab/Bitbucket support, webhooks, A/B testing, and the long-term vision of enabling full-stack application development with Cloudflare Workers and Durable Objects.
Durable Objects, now in Open Beta
3/31/2021
This post announces the open beta of Durable Objects, a significant advancement for Cloudflare Workers. It introduces Durable Objects as a new paradigm for stateful serverless, providing coordination across multiple Workers and strongly consistent edge storage. The post details the core concepts, use cases (complex API features, real-time games), pricing comparisons with major cloud providers (AWS Lambda and DynamoDB), and highlights key benefits like built-in high availability and strong consistency at no extra cost. It also mentions recent feature additions like jurisdictional restrictions and Wrangler support.
2020
Using One Cron Parser Everywhere With Rust and Saffron
12/25/2020
This post details the development of a unified cron parser named 'saffron' written in Rust to address inconsistencies across different language implementations (JavaScript, Go) used in the Cron Triggers feature for Cloudflare Workers. The challenge stemmed from the lack of standardization in cron expression extensions, leading to validation issues and poor user experience. By creating a single Rust-based parser with a WASM entry point, Cloudflare achieved consistent parsing and validation across its backend, API, and frontend, improving developer experience and reliability.
Cloudflare Acquires Linc
12/22/2020
This post announces the acquisition of Linc, an automation platform for frontend developers, and its integration with Cloudflare Pages. Linc's Frontend Application Bundle (FAB) specification allows for the creation of single deployment artifacts that can support static sites, API routes, cloud functions, and full server-side streaming rendering. FABs are designed to be compatible with various hosting providers, but are particularly well-suited for Cloudflare Workers due to Workers' edge execution model. This integration aims to accelerate Cloudflare Pages' ability to host richer and more powerful full-stack applications by combining Cloudflare's edge network with Linc's approach to server-side rendering.
Introducing Cloudflare Pages: the best way to build JAMstack websites
12/17/2020
This post introduces Cloudflare Pages, a new service designed to simplify the building and hosting of JAMstack websites. It highlights seamless Git integration for automated builds and deployments, unique preview URLs for code reviews and stakeholder feedback, infinite staging environments for feature branches, and collaboration features. Crucially, it announces the future integration of Pages with Cloudflare Workers, envisioning a unified platform for building dynamic applications on the edge, extending the JAMstack paradigm beyond static sites.
Supporting Jurisdictional Restrictions for Durable Objects
12/12/2020
This post introduces Jurisdictional Restrictions for Durable Objects, a new feature for Cloudflare Workers that allows developers to specify geographical regions for data storage and processing. This enhances compliance with data localization regulations and simplifies the development of stateful, serverless applications by abstracting away infrastructure management for regional data control.
Building Black Friday e-commerce experiences with JAMstack and Cloudflare Workers
11/26/2020
This post details the implementation of an open-source e-commerce application built entirely on Cloudflare Workers. It showcases Workers' capabilities as a static site hosting platform (via Workers Sites), API server, and webhook consumer within a single codebase. The integration with Stripe for payments and Sanity.io for headless CMS is highlighted, including secure generation of Stripe checkout sessions and handling of Stripe webhooks for payment validation, distribution to authors via Stripe Connect, and sending unique download links using Workers KV and Mailgun. The post emphasizes the developer experience and scalability benefits of using Workers for JAMstack applications and e-commerce solutions.
Workers KV - free to try, with increased limits!
11/16/2020
Introduced a free tier for Workers KV with 100,000 read operations and 1,000 write, list, and delete operations per day, and a 1 GB storage limit. Increased the maximum value size for Workers KV from 10 MB to 25 MB. Provided code examples for using Wrangler to create and manage KV namespaces and upload/retrieve data.
Road to gRPC
10/26/2020
This post details the technical implementation of gRPC support on Cloudflare's edge network. It explains the challenges of gRPC's reliance on HTTP/2 trailers and its bidirectional streaming capabilities, which were not fully supported by Cloudflare's existing infrastructure. The solution involved converting gRPC to HTTP/1.1 gRPC-web internally, leveraging existing WAF and other security services, and then converting back to HTTP/2 gRPC for origin communication. The post also highlights the development of an in-house origin proxy to support HTTP/2 connections to origins and the implementation of gRPC streaming support. Interoperability testing with Envoy and existing gRPC implementations was crucial for ensuring reliability.
Exploring WebAssembly AI Services on Cloudflare Workers
10/9/2020
This post details the exploration of running AI services on Cloudflare Workers using WebAssembly (WASM). It highlights the benefits of edge AI for scalability and privacy, and showcases how Latent AI's tools can compress and optimize AI models (specifically MobileNetV2) for efficient execution on the edge via WASM. The post demonstrates significant performance improvements compared to JavaScript-based solutions like TensorFlow.js, paving the way for new edge AI applications.
Let's build a Cloudflare Worker with WebAssembly and Haskell
10/6/2020
This post details how to compile Haskell code to WebAssembly using Asterius and deploy it on Cloudflare Workers. It covers setting up the Asterius environment, writing a Haskell module with a foreign function interface (FFI) export, creating a JavaScript loader, compiling the code using `ahc-link`, and deploying the resulting JavaScript and WebAssembly files to Cloudflare Workers via the API. It also demonstrates building a Cabal project with Asterius and `ahc-dist` for more complex deployments.
Introducing Cron Triggers for Cloudflare Workers
9/28/2020
Introduced Cron Triggers for Cloudflare Workers, enabling time-based invocations of Workers without requiring HTTP requests. This feature leverages underutilized machinery in Cloudflare's global network for cost-effective and efficient execution of scheduled jobs. The implementation involves database records for schedules, distributed evaluation across edge nodes, and polling by local runtimes. Future plans include expanding to other trigger types (data, event-based) and further optimizing edge infrastructure selection.
Making Time for Cron Triggers: A Look Inside
9/28/2020
Introduced Cron Triggers for Cloudflare Workers, enabling scheduled execution of Workers. This involved developing a new service in core to distribute schedules to an edge service via Quicksilver, a database record system for schedules, and a new edge service to poll for schedule changes and trigger Workers. A new 'scheduled' event type was added to the Worker API, along with new APIs for managing schedules (PUT/GET /workers/scripts/:name/schedules). The execution of schedules is handled by a Rust service deployed via Nomad, utilizing Cap'n Proto RPC for communication with the runtime and a custom nom-based cron parser.
Workers Durable Objects Beta:
A New Approach to Stateful Serverless
9/28/2020
This post introduces Durable Objects, a new capability for Cloudflare Workers that enables stateful serverless applications with strong consistency and real-time coordination. It addresses the previous limitation of managing state and coordinating clients entirely on the edge, allowing for the development of full applications without centralized origin servers. Key features include persistent, private, and co-located storage for each object, and the ability to coordinate between clients through a single object instance. The post also announces the beta launch of Durable Objects and the integration of WebSocket support into Workers.
Rendering React on the Edge with Flareact and Cloudflare Workers
9/3/2020
Introduced Flareact, a new open-source React framework specifically designed for Cloudflare Workers. Flareact enables rendering React applications at the edge, leveraging the Cache API for dynamic content delivery and offering features similar to Next.js like file-based routing, dynamic page paths, and edge-side data fetching. It addresses the technical constraints of running Next.js on Cloudflare Workers by providing a clean slate approach, implementing `getEdgeProps` for data fetching and `revalidate` for cache control, and API Routes for integrating Worker scripts. The framework includes a client bundle for routing and data fetching, and uses `require.context` for page manifest generation.
Asynchronous HTMLRewriter for Cloudflare Workers
8/28/2020
Introduced asynchronous handlers for HTMLRewriter, enabling developers to perform awaitable operations within HTML transformation logic. This allows for dynamic content modification based on external data sources, user context, or real-time checks, significantly expanding the capabilities of edge-based HTML manipulation.
Announcing wrangler dev — the Edge on localhost
8/26/2020
Introduced `wrangler dev` as a GA feature, enabling edge-based development for Cloudflare Workers. This tool provides live reloading, direct terminal logging of `console.log()` statements, and the ability to test edge-specific features like Cache API and KV namespaces against a production-like environment without impacting live data. It aims to bridge the gap between local development and edge deployment by running code on the edge itself, offering a high-fidelity experience.
Improving the Wrangler Startup Experience
8/25/2020
This post introduces `wrangler login`, a new authentication flow for the Wrangler CLI that simplifies the developer experience for managing Cloudflare Workers. It replaces the manual API token creation process with a seamless, browser-based authentication flow that leverages existing Cloudflare user credentials and employs asymmetric RSA encryption for security.
Introducing Deploy Buttons
8/20/2020
Introduced 'Deploy Buttons' which allow users to deploy projects to Cloudflare Workers with a single click, eliminating the need for local development environment setup. This feature streamlines the onboarding process for new developers and facilitates project sharing by integrating with GitHub Actions and a web-based deploy tool. The post also provides instructions for creating custom Deploy Buttons for projects.
New and improved Workers Docs
8/19/2020
This post details significant improvements to the Cloudflare Workers documentation, including a reorganization into four categories (Tutorials, How-to guides, Technical reference, Learning), enhanced formatting for readability (e.g., context sections, sidebars, list-based breakdowns), redesigned pages with new UI components (e.g., tags for examples, difficulty/length for tutorials), improved search functionality, and the addition of a dark mode theme. The underlying documentation engine was also upgraded.
Making magic: Reimagining Developer Experience for the World of Serverless
7/31/2020
Introduced `wrangler dev`, an edge-based development environment for Cloudflare Workers. This tool provides a fast feedback loop and accurate testing by tunneling to the edge, mimicking local development. It aims to improve the developer experience by reducing 'time to first dopamine' and streamlining the 'getting started' and 'iteration' phases of development. The post also highlights the existing GitHub Actions integration for automated production deployments and faster rollback capabilities.
Eliminating cold starts with Cloudflare Workers
7/30/2020
Introduced an optimization to eliminate cold starts for Cloudflare Workers by leveraging the TLS handshake process. When the first packet of a TLS negotiation (ClientHello) is received, the Workers runtime is hinted to eagerly load the associated Worker. This pre-warming during the handshake ensures that the Worker is ready to execute code immediately upon request arrival, achieving zero cold start latency.
Mitigating Spectre and Other Security Threats: The Cloudflare Workers Security Model
7/29/2020
This post details the security architecture of Cloudflare Workers, focusing on isolation mechanisms and API design. It explains the use of V8 isolates for multi-tenancy, process-level isolation for specific features (like devtools debugger) and as a defense against Spectre, and whole-process sandboxing using Linux namespaces and seccomp. It also covers the role of the supervisor process and capability-based security for API mediation, and the network access restrictions via inbound and outbound proxy services. The post also addresses the 'patch gap' for V8 bugs and Cloudflare's strategy for rapid deployment of fixes.
Cloudflare Workers Announces Broad Language Support
7/28/2020
Introduced support for Python, Scala, Kotlin, Reason, and Dart on Cloudflare Workers by enabling compilation to JavaScript. Detailed the technical implementation using Transcrypt for Python and Scala.js for Scala, including integration with Wrangler and webpack for bundling. Provided examples and guidance for developers to get started with these new language options.
The Migration of Legacy Applications to Workers
7/28/2020
This post details the migration of legacy applications to Cloudflare Workers. It outlines the benefits of migrating from legacy platforms to serverless, including instant scaling, reduced maintenance, and enhanced security. The migration process is demonstrated using a Node.js application, showing how to replace the Node.js HTTP module with Workers' Service Workers API and directly port business logic. Key Cloudflare technologies used include Workers for serverless compute, Wrangler for developer tooling, Access for zero-trust security, and Argo Tunnels for secure origin connectivity. The post also highlights a 'quick win' by adding zero-trust security to an existing application before migrating the compute.
Introducing Workers Unbound
7/27/2020
Introduced Workers Unbound, a new platform for Cloudflare Workers that removes restrictive CPU limits, enabling longer execution times for intensive workloads like image processing and complex algorithms. This is achieved by leveraging V8 Isolates, which are more lightweight than containers and allow for efficient multi-tenant code execution at the edge. The post also includes a pricing comparison with AWS Lambda, highlighting potential cost savings.
The Edge Computing Opportunity: It’s Not What You Think
7/26/2020
This post re-evaluates the primary drivers for edge computing adoption, moving beyond speed to emphasize consistency, cost, ease of use, and compliance. It highlights Cloudflare Workers' 'zero nanosecond cold starts' as a key differentiator for consistency and discusses how Cloudflare's network architecture and peering can lead to lower costs compared to traditional serverless platforms. The post also introduces Matthew's Hierarchy of Developers' Needs, prioritizing consistency, cost, ease of use, and compliance over speed.
Serverless Rendering with Cloudflare Workers
7/17/2020
This post details how to implement server-side rendering (SSR) at the network edge using Cloudflare Workers, Workers Sites, Wrangler, and HTMLRewriter. It explains the benefits of SSR for SEO, link previews, and dynamic applications while mitigating latency concerns by rendering close to the user. The example application, 'Peer With Cloudflare,' demonstrates querying the PeeringDB API and transforming static HTML responses with dynamic content using HTMLRewriter, all served from the edge.
Catching up with Workers KV
6/29/2020
Introduced metadata support for Workers KV, allowing arbitrary JSON to be stored with key-value pairs and retrieved using `getWithMetadata`. This enables richer data storage, such as content types and ETags, reducing runtime computation and bundle size. Significantly improved write latency for Workers KV by adding a second source of truth in Europe, reducing the geographical distance for writes from European and nearby regions.
Lessons from a 2020 intern assignment
6/23/2020
This post details the use of Cloudflare Workers as a platform for a take-home internship assignment. It describes how the exercise was designed to evaluate candidates' understanding of Workers APIs for making fetch requests, parsing JSON, and deploying applications using wrangler. It also introduces extra credit challenges involving content replacement using simple string manipulation and the HTMLRewriter API, and persisting user choices via cookies. The post highlights how Workers can be used for originless applications and provides example code solutions.
Helping with COVID-19 Projects: Cloudflare Workers now free through Project Galileo
4/18/2020
This post announces free access to Cloudflare Workers through Project Galileo for COVID-19 related projects. It highlights several example projects (API-COVID19-In, MakeFaceMasks, Mask A Hero NY, CovidTracking API) that leverage Workers for their scalability, ease of use, and lack of infrastructure maintenance. Specific technical benefits mentioned include rapid deployment, cost-effectiveness compared to origin servers, automated development/translation flows, handling traffic spikes without downtime, and easy deployment of static sites with Workers Sites. The CovidTracking API example details using Workers as a serverless proxy, caching, and utilizing Cloudflare Key Value storage for improved performance and user experience.
Cloudflare Workers Now Support COBOL
4/16/2020
This post details the technical process of compiling COBOL to WebAssembly and running it on Cloudflare Workers. It covers the use of GnuCOBOL, Emscripten, and optimizations to reduce binary size and instantiation time, including patching GnuCOBOL to remove file system support and using a JavaScript-based GMP implementation. It also describes how JavaScript functions are used to generate HTTP responses from the WebAssembly module and provides a toolchain for deploying COBOL Workers.
Trailblazing a Development Environment for Workers
4/3/2020
Introduced `wrangler dev`, a local development server for Cloudflare Workers that allows developers to test Workers using familiar HTTP clients like cURL and Postman before deploying to production. This feature leverages the Cloudflare API to upload and preview Workers, and integrates with the Chrome Devtools Protocol to enable debugging via `console.log` messages streamed to the terminal.
Announcing the Beta for WARP for macOS and Windows
4/1/2020
This post announces the beta release of WARP clients for macOS and Windows, extending the Wireguard-based secure and fast internet connection technology beyond mobile devices. It also mentions plans to add WARP+ support leveraging Cloudflare's Argo network and future Linux client development.
Deploying security.txt: how Cloudflare’s security team builds on Workers
3/23/2020
This post details the implementation of security.txt using Cloudflare Workers. It highlights the use of the Wrangler CLI for automated deployment and version control, dynamic generation of the 'Expires' field using a Node.js script, and clear-signing of the security.txt file with a PGP key at build time. The Worker also serves the PGP public key alongside the security.txt file using multi-route support.
How Replicated Developers Develop Remotely
3/10/2020
This post details how Replicated, an infrastructure software company, leveraged Cloudflare Access and Argo Tunnel to create a secure, cloud-based development environment for their engineers. This solution moved development environments from local machines to cloud instances, reducing troubleshooting time and enabling seamless remote access via VS Code's Remote SSH extension. This represents an innovative application of Cloudflare's edge capabilities for developer productivity and security.
Addressing the Web’s Client-Side Security Challenge
3/3/2020
This post highlights how Cloudflare Workers can be leveraged to significantly improve client-side website security. It introduces Tala, a third-party security solution that integrates with Workers to automatically deploy browser-native security controls like Content Security Policy (CSP), Subresource Integrity (SRI), and HTTP Strict Transport Security (HSTS) at the edge. This integration addresses the growing problem of client-side vulnerabilities and offers a highly effective, performant, and easily deployable security solution.
Introducing Secrets and Environment Variables to Cloudflare Workers
2/26/2020
Introduced Secrets and Environment Variables to Cloudflare Workers, accessible via the Wrangler CLI and Workers Dashboard. Secrets are encrypted upon saving, while Environment Variables are stored in plain text. This addresses use cases for sensitive API keys and general configuration variables, improving deployment safety and developer experience by allowing secrets to be managed without direct code exposure or redeployment.
Announcing Built with Workers
1/29/2020
Introduced 'Built with Workers', a new website to showcase projects built on Cloudflare Workers, serving as inspiration and a learning resource for developers. Highlighted the use of Workers KV and Workers Sites in showcased projects. Emphasized the availability of open-source projects with links to GitHub repositories.
JAMstack at the Edge: How we built Built with Workers… on Workers
1/29/2020
This post details the architecture and implementation of the 'Built with Workers' website, showcasing the use of Cloudflare Workers and Workers Sites for deploying a JAMstack application directly to the edge. It highlights the integration of Gatsby.js for building static sites and Sanity.io as a headless CMS, demonstrating how dynamic data from the CMS can be used at build time to generate static content served from Workers KV. The post emphasizes the philosophical similarities between JAMstack and Cloudflare Workers in reducing infrastructure overhead and enabling edge deployment.
Prototyping optimizations with Cloudflare Workers and WebPageTest
1/8/2020
This post introduces a method for rapid prototyping of web performance optimizations by combining Cloudflare Workers with WebPageTest's OverrideHost scripting. It demonstrates how to set up a Cloudflare Worker to proxy requests and use WebPageTest to redirect traffic through this worker. The post also showcases examples of using the HTMLRewriter API for on-the-fly HTML modification, request mangling (e.g., adding delays), and custom HTTP/2 prioritization schemes.
2019
Rust streaming HTML parser/rewriter
11/29/2019
This post details the development of LOL HTML, a Rust-based streaming HTML rewriter/parser with a CSS-selector based API, which serves as the backend for Cloudflare Workers' HTMLRewriter. It introduces a dual-parser architecture (lexer and tag scanner) to optimize performance by skipping non-matching content and avoiding expensive token propagation to the Workers runtime. It also describes a Rust macro-based DSL for defining Nondeterministic finite automata for parsing and byte slice processing optimizations using token outlines for lazy transformation into byte slices.
Introducing the HTMLRewriter API to Cloudflare Workers
11/28/2019
Introduced the GA release of the HTMLRewriter API for Cloudflare Workers. This API provides a streaming parser for manipulating HTML content directly at the edge, enabling dynamic applications and edge-side JAMstack architectures. It offers a jQuery-like experience for DOM manipulation using selectors and handlers, allowing for URL rewrites, content customization, and reducing origin load and client-side bloat. The post details an example of rewriting URLs and discusses the benefits of edge-side DOM modifications over client-side updates.
What’s new with Workers KV?
11/6/2019
This post announces significant updates to Workers KV, Cloudflare's global key-value store for Workers. New features include bulk upload/delete APIs, support for base64 encoded binary values, key listing with pagination and cursor support, prefix filtering for key listing, increased limits for namespaces (to 100) and value sizes (to 10MB), a visual KV browser in the Cloudflare dashboard for managing keys, and enhanced integration with the Wrangler CLI for creating, putting, and getting KV keys.
Not so static... Introducing the HTMLRewriter API Beta to Cloudflare Workers
9/30/2019
Introduced the HTMLRewriter API beta for Cloudflare Workers, enabling streaming HTML parsing and DOM manipulation with a jQuery-like JavaScript API. This allows for dynamic transformations of static HTML content directly on the edge, complementing Workers Sites and enabling JAMstack architectures with edge-side rendering. The API addresses limitations of previous methods that ingested entire response bodies, which impacted TTFB and prevented streaming.
Workers Sites: Extending the Workers platform with our own serverless building blocks
9/27/2019
Introduced 'Workers Sites' which allows deploying entire static websites to Cloudflare Workers. This is achieved by simulating a filesystem on top of Workers KV, where file paths are keys and file content is values. Wrangler CLI handles the upload of assets and creation of an asset manifest. The Worker script then uses this manifest to look up assets in KV and populate the Cloudflare edge cache with content hashes for long-term storage and performance. This enables caching of static assets, including HTML, at the edge.
Workers Sites: Deploy Your Website Directly on our Network
9/27/2019
Introduced Workers Sites, a feature that allows developers to deploy entire static websites directly to the edge of Cloudflare's network. This leverages Cloudflare Workers and Workers KV to store and serve website assets, eliminating the need for traditional origin servers and CDN caching for static content. The deployment process is streamlined through the Wrangler CLI, which uploads assets to KV and generates a Worker to serve them with appropriate headers. This significantly improves performance by reducing latency and simplifies the developer experience by abstracting away configuration complexities.
The Technical Challenges of Building Cloudflare WARP
9/25/2019
This post details the technical challenges encountered during the development of Cloudflare WARP, a product designed to secure and improve mobile device internet connections. It explains how WARP leverages Cloudflare's global network and ECMP routing, but faces issues with dynamic IP address and port changes due to cellular-to-Wi-Fi transitions and Network Address Translation (NAT). The post elaborates on the underlying network architecture, including Anycast IPs, routers, and the ECMP routing strategy, and explains the importance of TCP ports for distinguishing services. It also provides background on IPv4 address exhaustion and the role of NAT in managing limited IP addresses, setting the stage for how these challenges were overcome to ensure WARP's functionality.
How We Design Features for Wrangler, the Cloudflare Workers CLI
9/17/2019
This post details the design process and evolution of the Wrangler CLI, Cloudflare's command-line interface for Cloudflare Workers. It specifically focuses on the challenges and iterations involved in designing user-friendly commands for interacting with Workers KV, including creating namespaces, setting/deleting keys, and performing bulk operations. The post highlights the importance of clear taxonomies, learning from other CLIs, and avoiding the use of raw ID strings by leveraging the `wrangler.toml` configuration file for a more ergonomic developer experience.
Fast WordPress Sites with Bluehost & Cloudflare Workers
9/5/2019
This post details how Bluehost leveraged Cloudflare Workers to achieve a 40% performance improvement for WordPress sites by in-lining browser-specific font CSS, re-hosting font files, re-hosting third-party scripts, and caching dynamic HTML on the edge.
Live Preview: Build and Test Workers Faster with Wrangler CLI 1.2.0
8/20/2019
Introduced a `--watch` flag to `wrangler preview` that enables live preview of Workers changes. This feature uses the `notify` crate for file system event monitoring with a cooldown period to prevent excessive builds, and a WebSocket connection to localhost for communication between the Wrangler CLI and the previewer UI. This significantly improves the developer experience by providing a single, auto-refreshing preview tab.
Building a GraphQL server on the edge with Cloudflare Workers
8/14/2019
This post introduces `workers-graphql-server`, an open-source Apollo GraphQL server designed for Cloudflare Workers. It highlights the benefits of deploying GraphQL servers on the edge with Workers, such as low latency and rapid global deployment via Wrangler. It also provides a demo playground and links to documentation and the GitHub repository for contributions.
Magic Transit: Network functions at Cloudflare scale
8/13/2019
This post introduces Magic Transit, a new service that extends Cloudflare's edge network capabilities to the IP layer. It leverages Cloudflare's existing global network, anycast routing, and homogeneous server architecture to offer network functions like DoS mitigation, firewalling, and routing at scale. The post details the use of network namespaces for isolation and control of customer-defined network functions, and GRE tunneling over anycast for delivering traffic back to customer networks, effectively making Cloudflare's edge the customer's edge.
The Network is the Computer
7/11/2019
This post introduces the registration of the trademark 'The Network is the Computer®' and frames Cloudflare's network as the core of future internet infrastructure. It highlights Cloudflare Workers as a serverless solution deployed at the edge, enabling developers to run code globally with low latency. The post mentions advancements in Workers allowing developers to abstract away cloud regions, VMs, servers, containers, and load balancers, focusing solely on writing code. It also provides several use cases of Workers in production for various companies.
Enhancing the Optimizely Experimentation Platform with Cloudflare Workers
6/5/2019
This post details how Optimizely leverages Cloudflare Workers to enhance its experimentation platform. For client-side A/B testing, Optimizely Workers are used to hoist critical logic to the edge, reducing the amount of JavaScript downloaded and executed by the browser, thereby avoiding FOUC and performance issues. For server-side feature rollouts, Optimizely uses Workers as a centralized decision service, allowing feature flags to be managed at the edge without requiring origin server code deploys or impacting cached content. A sample Cloudflare Worker code snippet is provided to illustrate how the Optimizely JavaScript SDK can be instantiated at the edge to act as a decision service.
Just write code: improving developer experience for Cloudflare Workers
6/2/2019
This post announces significant improvements to the Cloudflare Workers developer experience, including the introduction of Wrangler (a CLI for deployment, compilation, and configuration), updated documentation with new tutorials, the ability to deploy multiple scripts within a single Worker, the launch of workers.dev subdomains for deployment without a custom domain, and a free tier offering up to 100,000 requests per day. The UI has also been updated for a faster onboarding experience.
Building a To-Do List with Workers and KV
5/21/2019
This post introduces building a full-stack application (to-do list) directly on Cloudflare's edge network using Cloudflare Workers and Workers KV. It details the process of setting up a Worker to serve static HTML, writing and retrieving data from Workers KV, and dynamically rendering the HTML with the retrieved data. It also covers the eventual consistency of Workers KV and how to handle initial data population.
Workers KV — Cloudflare's distributed database
5/21/2019
This post announces the general availability of Workers KV, a highly distributed, eventually consistent, key-value store designed to complement Cloudflare Workers. It explains the need for persistent data storage for Workers, details the CAP theorem trade-offs (Availability and Partition Tolerance over Consistency), and provides examples of use cases like mass redirects, user authentication, and configuration data. New features introduced include bulk writes for efficient data import and expiring keys for time-limited data storage.
Faster script loading with BinaryAST?
5/17/2019
This post introduces and explores the BinaryAST proposal, a new over-the-wire format for JavaScript that aims to speed up parsing by using an efficient binary representation of the Abstract Syntax Tree (AST). It details how BinaryAST addresses challenges in JavaScript parsing, such as hoisting and lazy parsing, by providing additional information and context upfront. The post also describes Cloudflare's work in enabling the encoder for BinaryAST to run within Cloudflare Workers, facilitating the collection of real-world data on its impact.
Unit Testing Workers, in Cloudflare Workers
5/2/2019
Introduces a method for executing unit tests directly within the Cloudflare Workers runtime by creating a test harness that bundles the worker script and mocha tests using Webpack. This harness is deployed as a Worker itself, allowing tests to run in the production environment and return detailed JSON reports of test results.
Rapid Development of Serverless Chatbots with Cloudflare Workers and Workers KV
4/25/2019
This post details the rapid development of a serverless chatbot, '@ownerbot', using Cloudflare Workers and Workers KV to track service ownership within Cloudflare's engineering organization. It highlights the benefits of reduced operational overhead and development time offered by Workers for building such tools. The post outlines the implementation steps, including configuring the Google Chat API, writing the Worker script, and utilizing the Command pattern for handling chatbot interactions. It also introduces Workers KV as a solution for stateful bots and demonstrates the effectiveness of the Command pattern for testing and composing chatbot logic.
Eating Dogfood at Scale: How We Build Serverless Apps with Workers
4/19/2019
This post details how Cloudflare engineers are using the Serverless Framework to manage the deployment of Cloudflare Access, a product being rebuilt entirely on Workers. It covers setting up a CI/CD pipeline for Workers, including Git integration, automated deployments, environment management, unit testing, and TypeScript support. The post highlights the decision to use the Serverless Framework over custom scripting or Terraform for its extensibility and focus on the serverless niche. It provides a detailed walkthrough of the `serverless.yml` configuration, including service definition, provider settings, plugins, functions, environment variables, KV namespace binding, and routing. It also touches upon unit testing strategies using tools like `cloudworker`, Mocha, and Sinon.
Introducing WARP: fixing mobile Internet performance and security
4/1/2019
Introduced WARP, a technology integrated into the 1.1.1.1 App, to improve mobile Internet performance and security. WARP acts as a VPN for all app traffic, encrypting unencrypted connections and leveraging Cloudflare's network and a UDP-based protocol for speed and reliability. It is built on WireGuard for efficiency and aims to minimize battery usage. WARP+ is a premium version offering enhanced speed via Cloudflare's backbone and Argo technology.
? The Wrangler CLI: Deploying Rust with WASM on Cloudflare Workers
3/28/2019
Introduced `wrangler`, a CLI tool for building, previewing, and publishing Rust and WebAssembly Cloudflare Workers. This enables developers to leverage Rust and WebAssembly for edge computing on Cloudflare Workers, expanding the platform beyond JavaScript and providing a "paved path" for early community engagement and feedback.
A Full CI/CD Pipeline for Workers with Travis CI
3/22/2019
This post details the setup of a Continuous Integration and Continuous Deployment (CI/CD) pipeline for Cloudflare Workers using Travis CI. It outlines the necessary files (Worker script, unit tests, serverless.yml, .travis.yml, .gitignore), provides example code for a simple 'Hello World!' Worker and its unit test using the cloudworker library, and explains the configuration of `serverless.yml` for deployment via the Serverless Framework. The `.travis.yml` file is presented with an explanation of its components for automating tests and deployments to the main branch. Finally, it covers the configuration of environment variables in Travis CI for authentication and deployment.
Writing an API at the Edge with Workers and Cloud Firestore
3/21/2019
This post details the development of a system using Cloudflare Workers and Cloud Firestore to handle subdomain reservations for the upcoming Workers.dev launch. It outlines the requirements, user flow, and design choices, emphasizing the use of Workers for ephemeral, independent services and Cloud Firestore for immediate consistency to prevent double reservations. The post also covers the implementation details of authenticating Workers to Cloud Firestore using JWTs generated from service account credentials.
Unit Testing Worker Functions
3/15/2019
This post introduces the use of the Cloudworker mock runtime and the Mocha testing framework to enable unit testing of Cloudflare Worker functions. It demonstrates how to set up a testing environment, abstract the Cloudworker mock, and write tests for both individual functions and the entire Worker script, ensuring functional correctness and expected output.
A Node to Workers Story
3/9/2019
This post details the migration of a Node.js/Express-based Spotify OAuth integration service to Cloudflare Workers. The author demonstrates how to adapt Express-like routing logic to the Workers' fetch event model by creating a custom `app` object. It also highlights the conversion of Express response methods (e.g., `response.json()`) to the `Response` object required by Workers, and the simplification achieved by removing traditional server configuration files (Procfile, package.json, etc.) and dependencies. The core benefit emphasized is the reduction of operational overhead and complexity by leveraging serverless architecture.
Diving into Technical SEO using Cloudflare Workers
3/7/2019
This post details the application of Cloudflare Workers for technical SEO, specifically addressing common obstacles like platform restrictions, legacy tech stacks, and incorrect builds. It introduces a filter chain architecture for modifying incoming requests and outgoing responses, including response bodies. Practical examples include implementing redirects using Workers KV and Cuckoo Filters for scalability, and injecting Hreflang tags using a precomputed Boyer-Moore-Horspool algorithm on byte arrays, with further exploration into Rust WASM for performance gains.
Deploying Workers with GitHub Actions + Serverless
3/1/2019
This post introduces a GitHub Action for deploying Cloudflare Workers directly from GitHub repositories, leveraging the Serverless Framework as the underlying deployment mechanism. It details how to configure the action with environment variables and optionally a `serverless.yml` file for custom deployments, enabling automated CI/CD pipelines for Workers.
Announcing workers.dev
2/19/2019
Introduced workers.dev, a new top-level domain that allows developers to deploy Cloudflare Workers on subdomains without requiring a custom domain or existing Cloudflare account. This simplifies the onboarding process for new users and enables independent developers to leverage the platform's scalable infrastructure. The workers.dev site itself is fully served using Cloudflare Workers, demonstrating its capabilities.
SEO Best Practices with Cloudflare Workers, Part 2: Implementing Subdomains
2/15/2019
This post demonstrates how Cloudflare Workers can be used to implement a subdirectory strategy for SEO purposes, effectively proxying traffic from a subdirectory (e.g., `bobtopia.com/blog`) to a remotely hosted service (e.g., `bobtopia.coolghosthost.com`). It details the configuration options and request handlers needed to manage both HTML documents and associated assets, eliminating the need for a traditional reverse proxy like NGINX.
SEO Best Practices: Subdomains vs. Subdirectories
2/15/2019
This post introduces the concept of using Cloudflare Workers to implement subdirectories for remotely hosted services, addressing the technical challenges of reverse proxying and DNS configuration. It highlights how Workers can simplify the process of mapping a subdirectory URL to a different origin, thereby improving SEO by consolidating keywords and backlinks to the root domain. This capability is presented as a solution to overcome the limitations of traditional subdomain strategies for SEO.
Solving Problems with Serverless – The Cloudflare LED Data Center Board, Part I
2/14/2019
This post details the use of Cloudflare Workers and Workers KV to build a serverless API for a physical LED Data Center map. The architecture involves two Workers KV data stores for storing data center information and LED mapping, and two serverless Workers to serve this data. The goal is to provide a globally deployable and low-latency API for the map, which will be used at conferences and trade shows.
IBM Cloud Internet Services protects any cloud – now with Cloudflare Spectrum and Workers
2/12/2019
This post announces the integration of Cloudflare Workers (referred to as 'CIS Edge Functions') into IBM Cloud Internet Services (CIS). This integration allows IBM customers to run custom JavaScript logic at the network edge across Cloudflare's global data centers, enabling use cases like request modification and outbound network requests. It also highlights the protection and acceleration of non-HTTP traffic with 'CIS Range' (likely related to Spectrum) and the introduction of 'CIS Enterprise Log Share' for enhanced analytics and forensics.
Introducing the Workers Cache API: Giving you control over how your content is cached
1/25/2019
This post introduces the Workers Cache API, which integrates with Cloudflare Workers to give developers programmatic control over Cloudflare's global cache. It allows for custom caching logic, including caching POST requests, and enables the cache to be used as a general-purpose key-value store, significantly enhancing performance and reducing origin server load.
create-cloudflare-worker: Bootstrap your Cloudflare Worker
1/23/2019
Introduced `create-cloudflare-worker`, a framework to bootstrap Cloudflare Worker development. This framework provides a streamlined workflow for starting, building, testing, and deploying Workers. It includes pre-configured Webpack for npm module bundling, Jest for integration testing, and npm scripts for deployment via the Cloudflare REST API, enabling CI/CD integration. The framework aims to reduce the time to get started with Cloudflare Workers.
Argo Tunnel + DC/OS
1/21/2019
This post details the integration of Cloudflare Argo Tunnel with Mesosphere DC/OS. It highlights how Argo Tunnel creates secure, private connections between services running on DC/OS and Cloudflare's network, without opening inbound ports. This enables DC/OS users to leverage Cloudflare's global network for load balancing, DDoS protection, and CDN services across multiple cloud providers and on-premise infrastructure, extending the reach and security of edge computing to complex distributed systems.
The SamKnows Cloudflare Platform
1/18/2019
This post details SamKnows' successful implementation of their measurement server software using Cloudflare Workers. They rewrote their server-side software in JavaScript to run on Cloudflare's global network, enabling measurements in new locations and leveraging Cloudflare's connectivity. The implementation supports TCP download and upload speed tests, and round-trip latency/packet loss via ICMP, while adhering to Workers' resource limits. Performance testing showed comparable results to existing infrastructure, with some markets showing improved routing via Cloudflare.
Upgrading Cloud Infrastructure Made Easier and Safer Using Cloudflare Workers and Workers KV
1/10/2019
This post details how Cloudflare Workers and Workers KV were used to perform a phased migration of webhooks from legacy Azure services to a modern PaaS offering. The Worker script dynamically routed requests based on path and feature flags stored in Workers KV, allowing for granular control over traffic migration endpoint by endpoint. This approach mitigated the risks associated with traditional DNS-based migrations and provided a flexible mechanism for enabling/disabling traffic to new infrastructure. The post also highlights the use of Loggly for debugging exceptions and the implementation of Cloudflare Rate Limiting to handle 403 errors from the origin.
2018
Improving request debugging in Cloudflare Workers
12/28/2018
Introduced a Network panel to the Cloudflare Workers inspector, mirroring Chrome DevTools' functionality. This panel allows developers to inspect request and response headers, raw responses, timings, and initiators for requests made by Workers to origins. It also supports exporting subrequests as HAR files. The implementation involved integrating with the DevTools Protocol, parsing JSON-RPC messages, and adapting the frontend to store response bodies on the client side to manage backend memory.
Cloudworker - A local Cloudflare Worker Runner
12/19/2018
This post introduces Cloudworker, a local Cloudflare Worker runner developed by Dollar Shave Club. It enables local execution of Cloudflare Worker scripts, including support for WebAssembly and an in-memory Workers KV store. The tool aims to improve the developer workflow by providing a local environment that closely mirrors production.
Traffic Acceleration with Cloudflare Mobile SDK
12/13/2018
This post introduces Traffic Acceleration with Cloudflare Mobile SDK, which uses novel transport algorithms built into the SDK to accelerate apps beyond TCP performance. It replaces TCP with a custom UDP transport protocol implemented on top of UDP, allowing for performance tuning, bug fixes, and incremental updates without kernel coordination. This leads to reduced latency, increased throughput, and improved app user experiences, demonstrated by a transportation company seeing a 7% decrease in network response time and a 13.8% drop in network timeouts.
Serverless Progressive Web Apps using React with Cloudflare Workers
11/23/2018
This post details how to build serverless Progressive Web Apps (PWAs) using React with Cloudflare Workers. It demonstrates a single JavaScript bundle that runs on both the browser and Cloudflare Workers without modification, enabling isomorphic rendering and offline capabilities via Service Workers and the Cache API. The approach leverages standard Web APIs available in both environments, eliminating the need for separate client and server bundles.
Fast Google Fonts with Cloudflare Workers
11/22/2018
This post details the implementation of a Cloudflare Worker to optimize Google Fonts performance by embedding CSS directly into HTML and proxying font files through the origin. This reduces round trips from 8 to 1, significantly improving perceived load times and ensuring correct font styling. The worker dynamically rewrites font URLs and caches them at the edge.
Introducing Apps with Workers
11/16/2018
This post announces the public beta of Cloudflare Apps with Workers, enabling developers to package and distribute their Workers scripts as Cloudflare Apps. This integration allows for the creation of more powerful app experiences, such as personalization, A/B testing, and custom security, directly within the Cloudflare Apps marketplace. It also outlines the process for building and submitting these integrated apps, including modifications to the `install.json` and an enhanced security review process.
Real URLs for AMP Cached Content Using Cloudflare Workers
11/13/2018
This post introduces the implementation of HTTP signed exchanges using Cloudflare Workers to enable AMP caches to serve content under its origin URL. This addresses the security and attribution issues of AMP by extending authenticity and integrity to cached content. The technical details cover the generation of HTTP signed exchanges using MICE for integrity proofs and CBOR for serialization, signed by the publisher's private key. Cloudflare Workers automate this process, allowing publishers to leverage AMP performance while maintaining origin URLs.
Cloud Computing without Containers
11/9/2018
This post introduces Cloudflare Workers, highlighting its unique approach to serverless computing by utilizing V8 Isolates instead of containers or virtual machines. It details the advantages of this architecture, including significantly lower overhead, faster startup times (eliminating cold starts), reduced memory consumption, and improved security through V8's multi-tenant design. The post also contrasts Workers' billing model with traditional serverless platforms and discusses its global deployment capabilities.
Improving RubyDocs with Cloudflare Workers and Workers KV
10/31/2018
This post details the integration of Cloudflare Workers and Workers KV to improve the RubyDocs service. A Cloudflare Worker was implemented to proxy requests from a subpath to a subdomain, consolidating the site onto a single domain for SEO benefits and a better user experience. Additionally, Workers KV was used to store and retrieve the latest version of Ruby projects, enabling the creation of 'latest version' URLs for improved DuckDuckGo bang integration. The Worker script itself is provided as an example.
Serverless Rust with Cloudflare Workers
10/16/2018
This post details the initial exploration and developer experience of using Rust to compile WebAssembly (WASM) for Cloudflare Workers. It covers setting up the development environment with `wasm-pack` and `cargo-generate`, building a 'Hello, World!' WASM module, and integrating it into a local webpack test harness. The post also highlights challenges encountered, specifically with obtaining entropy and current time in the `wasm-unknown-unknown` target environment, and the implications for system call handling in Rust WASM.
Custom Load Balancing With Cloudflare Workers
10/3/2018
This post demonstrates how Cloudflare Workers can be used to implement custom load balancing logic. It provides code examples for random routing, fallback strategies, and geographic routing based on the CF-IPCountry header, showcasing how developers can extend Cloudflare's capabilities to meet specific origin server routing needs.
Free to code
10/1/2018
This post announces the ability to write Cloudflare Workers code in any language that compiles to WebAssembly, expanding the platform's reach beyond JavaScript and enabling frictionless development and deployment on a serverless platform in a language of choice.
WebAssembly on Cloudflare Workers
10/1/2018
Introduced WebAssembly (WASM) support to Cloudflare Workers, allowing developers to augment their applications with compiled languages like C, C++, Rust, and Go. This enables resource-intensive, self-contained operations like image resizing and audio processing to be performed at the edge with greater performance and code reuse. The post details how to upload and instantiate WASM modules within Workers and outlines plans to improve the build process with Emscripten.
Real World Serverless: The Video
9/30/2018
This post introduces Cloudflare Workers as a serverless platform that runs code at the edge in all Cloudflare data centers globally, enabling instant deployment and execution worldwide. It contrasts this with traditional serverless offerings that run in specific data centers, highlighting the latency benefits of edge execution. The post also discusses the cost advantages of a pay-per-request model and the concept of 'originless' computing.
Introducing Workers KV
9/28/2018
Introduced Workers KV, a native key-value store for Cloudflare Workers, enabling data storage and retrieval within seconds across Cloudflare's global network. Values are encrypted at rest, in transit, and on local disk. Workers KV can be written to and read from within Workers or via the Cloudflare API, with automatic synchronization across the network. Demonstrated use cases include shopping cart storage, A/B testing, authentication verification, and page construction. This marks the first step in a sequence of announcements around storage and databases on the edge.
Building With Workers KV, a Fast Distributed Key-Value Store
9/28/2018
This post introduces Workers KV, a new highly distributed, eventually-consistent key-value store designed to complement Cloudflare Workers. It enables developers to build performant and fault-tolerant applications by storing data close to users, with use cases including API gateways, dynamic data serving, configuration management, and connecting disparate systems. The post details the technical capabilities, limits, and pricing of Workers KV.
JAMstack podcast episode: Listen to Cloudflare's Kenton Varda speak about originless code
9/15/2018
This post introduces Cloudflare Workers, a serverless compute platform that allows developers to run JavaScript code on Cloudflare's edge servers. It explains the core concept of receiving HTTP requests at the edge and executing arbitrary JavaScript code within a secure V8 sandbox. Use cases discussed include simple header rewrites, serving content directly from object storage without an origin server, personalizing cached content, implementing A/B testing, and running complex applications like Apollo Server for GraphQL at the edge.
Deploy Workers using Terraform
9/13/2018
This post introduces the integration of Cloudflare Workers with Terraform, enabling infrastructure-as-code management for Worker scripts and routes. It details how to configure Terraform to deploy, manage, and version control Worker deployments, including setting up scripts and routes, and provides guidance on importing existing workers into Terraform management.
Build and Deploy Functions to Cloudflare’s 152+ Data Centers with Serverless
9/11/2018
This post announces the integration of Cloudflare Workers with the Serverless framework, enabling developers to define and deploy Workers scripts using the `serverless.yml` configuration file and the `serverless deploy` command. It introduces the `serverless-cloudflare-workers` plugin and provides examples of `serverless.yml` configurations and getting started steps. It also mentions the `serverless invoke` command for testing Workers.
Bob Ross, Lorem Ipsum, Heroku and Cloudflare Workers
9/9/2018
This post demonstrates the rapid deployment of a dynamic text generation service (Bob Ross Ipsum generator) using Cloudflare Workers. It highlights the ease of use, global distribution, and performance benefits of Workers for building simple, highly available APIs. The author also shows how to serve a basic HTML UI from the root of a Worker and capture query parameters for dynamic content generation.
Identifying and alerting on data loss using Cloudflare Workers
8/30/2018
This post introduces the use of Cloudflare Workers for data loss prevention by inspecting response bodies for sensitive canary data. It demonstrates how to read response bodies, construct new responses, and trigger external alerts (e.g., PagerDuty) using `event.waitUntil()` to prevent blocking the client response. It also touches upon rate limiting response access based on headers.
Using Edge-Side Includes with Workers for High Availability
8/28/2018
This post details how Cloudflare Workers were used to implement Edge Side Includes (ESI) for high availability during a website migration. It showcases a practical application of Workers for partial page rewrites, allowing new frontend components to be gradually introduced while maintaining fallbacks to the existing WordPress backend. The post explains the technical implementation, including handling `X-Fragments` headers, prefetching fragments with timeouts, and streaming the response to replace fragments with prefetched content or fallbacks.
Using Workers To Make Static Sites Dynamic
8/26/2018
This post details how Gambling.com Group used Cloudflare Workers to add dynamic capabilities to their static websites. Specific use cases include geo-targeting by reading the 'Cf-Ipcountry' header and redirecting users, restricting access to content by checking for a specific 'user-agent' header, and performing A/B testing by fetching and executing A/B testing scripts at the edge before the UI is rendered. The post highlights the benefits of Workers over post-load JavaScript and server-rendered sites for static websites, emphasizing faster response times and reduced development overhead.
Internet Native Applications
8/21/2018
This post introduces the concept of 'Internet Native Applications' which combine the utility of internet apps with the speed of local desktop apps. It predicts a future where a significant percentage of requests are serviced from the Edge within 10ms, client-side code executes at near-native speed using WebAssembly, and data is exchanged using performance-based protocols like QUIC and HTTP/3. This positions the Edge as a general-compute platform and the traditional cloud as a pluggable implementation detail.
Integrating redirection.io with Cloudflare Workers
8/21/2018
This post details the integration of redirection.io, a web traffic redirection manager, with Cloudflare Workers. It demonstrates how Workers can be used to proxy incoming HTTP requests to redirection.io's hosted agent API, enabling redirection and response modification without changes to the origin platform. The implementation involves using the Fetch API within a Worker to query redirection.io for redirection rules and then either returning a modified response or passing the request to the origin. Performance considerations, including caching and timeouts for the redirection.io API calls, are also discussed, with benchmarks showing minimal latency impact.
Edge-Side-Includes with Cloudflare Workers
8/20/2018
This post introduces the implementation of Edge-Side-Includes (ESI) using Cloudflare Workers. It details how Workers can be used to dynamically fetch and combine content from different sources, enabling caching of static portions of a page while dynamically rendering dynamic fragments. The post provides a code example of a Worker that intercepts text-based responses, identifies ESI blocks, fetches the content specified in the `src` attribute of `<esi:include/>` tags, and merges it with the static content before sending the final response to the visitor. It also discusses the use of TransformStream for efficient streaming and the importance of `cache-control: max-age=0` for dynamic content.
Minecraft API with Workers + CoffeeScript
7/31/2018
This post details the use of Cloudflare Workers to build a production-grade API for Minecraft websites. It describes the problem of fetching player profile data through multiple API calls and rate limits, and how Workers can aggregate these calls into a single request. The author also outlines the design of a new API schema and the development process using CoffeeScript and Webpack, including code examples for HTTP request handling and response generation.
Proxying traffic to Report URI with Cloudflare Workers
7/17/2018
This post introduces a new use case for Cloudflare Workers: acting as a proxy to forward CSP reports to Report URI. It provides a simple JavaScript worker script that intercepts incoming reports on a custom subdomain and forwards them to a specified Report URI address. The worker allows for shielding client IPs from Report URI, masking User Agent strings, downsampling report volume, and other advanced processing of the report payload. This enables users to maintain the simplicity of Report URI while meeting custom requirements.
Comparing Serverless Performance for CPU Bound Tasks
7/9/2018
This post benchmarks Cloudflare Workers against AWS Lambda and Lambda@Edge for CPU-bound tasks, specifically using PBKDF2 for password hashing. It demonstrates that Workers are significantly faster (up to 7x) and more cost-effective than Lambda, even when Lambda is configured with maximum memory. The tests also show that native binaries in Lambda do not offer a performance advantage over JavaScript for these types of workloads. The post highlights the global distribution of Workers as a key differentiator.
Debugging Serverless Apps
7/5/2018
Introduced a debugging technique for serverless applications by returning debug information in an X-Debug header. This involves an interceptor pattern where a Logger class captures log lines and exception information, and a LogInterceptor adds this data to the response header when a debug flag is present in the request. This allows for easier debugging of Workers by providing direct access to logs and errors.
Serverless Performance: Cloudflare Workers, Lambda and Lambda@Edge
7/2/2018
This post provides a performance comparison between Cloudflare Workers, AWS Lambda, and AWS Lambda@Edge, demonstrating that Workers are significantly faster due to their global distribution and V8 isolate architecture. It highlights the latency advantages of edge computing for serverless functions, showing Workers are 441% faster than Lambda and 192% faster than Lambda@Edge at the 95th percentile. The post details the technical reasons for this performance difference, including faster spin-up times for isolates, lower memory overhead, and optimized JavaScript API implementations.
Cryptocurrency API Gateway using Typescript+Workers
6/29/2018
This post details the development of a mini HTTP request routing and handling framework using TypeScript and Cloudflare Workers to build a cryptocurrency API gateway. It demonstrates how to define interfaces for routing, implement a router, and create handlers for specific API endpoints (ping, aggregate, race, direct). The framework allows for multiplexing requests to multiple endpoints and aggregating results, showcasing the capabilities of edge-side code for building sophisticated logic with minimal dependencies.
Delivering a Serverless API in 10 minutes using Workers
6/28/2018
This post details the creation of a serverless API endpoint using Cloudflare Workers to check if a domain automatically redirects to HTTPS. It demonstrates how to parse query parameters, make subrequests with `fetch`, follow redirects by default, and handle CORS headers. The author highlights the ease of use for developers without DevOps experience, enabling rapid prototyping and deployment of simple, stateless applications.
Bootstrapping a Typescript Worker
6/27/2018
This post details a method for bootstrapping a TypeScript project for Cloudflare Workers, including setting up a local development environment with Webstorm, using Yeoman for scaffolding, integrating node-fetch for type definitions, and configuring Jest for testing. It also outlines the manual steps required to make a TypeScript-transpiled Worker compatible with the Cloudflare Workers runtime by addressing issues with exports, require, and native browser APIs. Finally, it introduces Grunt for automating the build process to generate Worker-compatible JavaScript from TypeScript, including handling preamble injection and removing TypeScript-specific compilation artifacts.
Using Webpack to bundle your Workers modules
6/25/2018
This post introduces the use of Webpack to bundle JavaScript modules for Cloudflare Workers. It details how to set up a Webpack configuration with TypeScript, install necessary dependencies, and use npm scripts for building and previewing Workers. The post demonstrates how Webpack can resolve npm module imports, enabling the use of libraries like `path-to-regexp` for routing within Workers. It also highlights the benefit of using source maps for debugging.
Building a serverless Slack bot using Cloudflare Workers
6/22/2018
This post details the creation of a serverless Slack bot using Cloudflare Workers to fetch stock prices. It demonstrates how Workers can function as standalone web applications beyond traditional HTTP middleware. The bot leverages the Alpha Vantage API, caches responses for improved performance and reduced API load, and handles Slack webhook authentication. The technical implementation covers handling POST requests, parsing user messages, making API requests with caching (`cacheTtl: 60`), and constructing Slack-compatible responses.
DroneDeploy and Cloudflare Workers
6/21/2018
DroneDeploy is using Cloudflare Workers to push authentication to the edge and serve collected images directly from Cloudflare's CDN. Workers are used to build a custom signed URL to ensure the correct images are surfaced to the correct consumer, safeguarding their multi-tenancy image storage model. The Worker intercepts requests for images, validates JWT credentials, and if valid, rewrites the request to the storage backend, signs the request with backend credentials, and returns the response. This involves parsing JWTs, validating signatures using the Web Crypto API, and generating HMAC signed URLs for Google Cloud Storage.
Argo Tunnels: Spread the Load
6/21/2018
This post introduces the integration of Argo Tunnel with Cloudflare's distributed Load Balancing. It explains how Argo Tunnel allows applications to be deployed securely behind NATs or firewalls, and how load balancing can now distribute traffic across multiple Argo Tunnel instances. This enhances failure tolerance and performance for edge-deployed applications, with simplified management through the `cloudflared` agent.
Test New Features and Iterate Quickly with Cloudflare Workers
6/19/2018
This post introduces techniques for gating features and performing A/B testing using Cloudflare Workers. It details how to securely fetch user permissions from an origin endpoint, cache these permissions for subsequent requests, and use them to conditionally serve content, route requests to different origins, or restrict access to specific API versions or documentation. The examples provided demonstrate how to implement path restrictions, A/B testing logic based on user groups, and custom routing between origins.
Cloudflare Workers Recipe Exchange
6/4/2018
This post introduces the "Recipe Exchange" initiative, encouraging developers to share practical use cases and code examples for Cloudflare Workers on the Cloudflare Community Forum. It highlights existing recipes for A/B Testing, Aggregating Multiple Requests, Conditional Routing, Custom Responses, Hot-link Protection, POST Requests, Random Content Cookies, Signed Requests, and Streaming Responses, demonstrating the versatility of Workers for various application needs.
Dogfooding Cloudflare Workers
5/4/2018
This post details the implementation of a Cloudflare Worker to intercept requests at the edge, inspect the TLS protocol version used by the client, and append a custom 'X-Client-SSL-Protocol' header to the request before forwarding it to the origin. This allows backend services to conditionally decorate responses with deprecation warnings and display banners in the dashboard. The worker was deployed to www.cloudflare.com and api.cloudflare.com, serving over 400 million requests. It also covers best practices for error handling (fail-open with `event.passThroughOnException()`) and asynchronous logging using `event.waitUntil()` with Sentry.
mmproxy - Creative Linux routing to preserve client IP addresses in L7 proxies
4/18/2018
This post introduces mmproxy, a new tool that enables the preservation of client IP addresses for applications that do not natively support protocols like PROXY protocol. It details how mmproxy, in conjunction with Cloudflare Spectrum and Linux routing tricks (IP_TRANSPARENT, CONNMARK, and custom routing tables), allows for spoofing client IPs to target applications, effectively extending the reach of edge computing capabilities to legacy or non-standard applications.
Abusing Linux's firewall: the hack that allowed us to build Spectrum
4/12/2018
This post details the technical challenges and solutions involved in enabling Cloudflare Spectrum, a feature that requires accepting TCP connections on any port from 1 to 65535. It explains how Cloudflare overcame Linux limitations by using the 'AnyIP' trick to assign large IP prefixes to the loopback interface and, crucially, by leveraging the obscure `TPROXY` iptables module and the `IP_TRANSPARENT` socket option. This allows the firewall to redirect packets to a local socket without changing the packet header, effectively enabling binding to any port without relying on `conntrack` or custom kernel patches. This technical deep-dive showcases how Cloudflare engineers push the boundaries of existing operating system capabilities to build new edge services.
Cloudflare Argo Tunnel with Rust+Raspberry Pi
4/6/2018
This post introduces Cloudflare Argo Tunnel, a new capability that allows applications running on local networks (demonstrated with a Raspberry Pi) to be securely exposed to the internet without opening firewall ports or configuring routers. It details the setup process, including installing the cloudflared agent, authorizing a domain, and creating a tunnel. The post also showcases how to serve a Rust-based web application (Gotham) through Argo Tunnel, demonstrating the flexibility and power of exposing local services securely via Cloudflare's edge network.
Everyone can now run JavaScript on Cloudflare with Workers
3/13/2018
This post announces the general availability of Cloudflare Workers, a serverless JavaScript execution environment running on Cloudflare's global edge network. It details the core capabilities of Workers, including intercepting and modifying HTTP requests/responses, making outbound requests, and controlling other Cloudflare features. The post highlights the use of the Service Workers API, the V8 JavaScript engine for performance, and provides a pricing model. It also includes a code example demonstrating redirection, hotlink blocking, and serving images from Google Cloud Storage.
Using Cloudflare Workers to identify pwned passwords
2/26/2018
This post introduces the implementation of a Cloudflare Worker that intercepts POST requests, extracts a 'password' field, calculates its SHA-1 hash, and checks for its presence in Troy Hunt's Pwned Passwords API using the k-anonymity scheme. The Worker then adds a `Cf-Password-Pwnd` header to the outgoing request based on the check result. It provides example Perl and JavaScript code for the functionality and demonstrates its usage with curl.
Cloudflare Workers is now on Open Beta
2/1/2018
This post announces the open beta of Cloudflare Workers, enabling developers to run JavaScript on Cloudflare's edge network across over 120 data centers. It highlights the ability to intercept and modify requests, make outbound calls, and replace CDN configurations. The post provides instructions for getting started, links to documentation and recipes for common use cases like A/B testing, conditional routing, request filtering, response aggregation, and hotlink protection. It also mentions the availability of a GitHub repository for examples and a community forum for feedback.
2017
Code Everywhere: Why We Built Cloudflare Workers
9/29/2017
This post introduces Cloudflare Workers, a new capability that allows developers to run JavaScript code on Cloudflare's global network of data centers, effectively creating a third tier of computation between end-user devices and traditional backend servers. It highlights the motivation for this development, driven by the speed of light limitations and the desire to reduce latency by moving code closer to users. The post emphasizes the use of JavaScript for its ubiquity and the ability to update code globally in seconds, transforming Cloudflare from a service into a platform.
Introducing Cloudflare Workers: Run JavaScript Service Workers at the Edge
9/29/2017
Introduced Cloudflare Workers, a platform for running JavaScript service workers at the edge. This allows developers to deploy code to Cloudflare's global network, intercepting and responding to HTTP requests. The platform leverages the V8 JavaScript engine for security and the Service Worker API for its programming model. Examples provided demonstrate cache control, search-and-replace functionality, and a primitive template engine for edge-side includes.