BlogsCloudflareEdge Computing with Cloudflare Workers

Edge Computing with Cloudflare Workers

Edge Computing with Cloudflare Workers

7
posts
2018–2022

Cloudflare Workers has evolved into a powerful edge computing platform, enabling developers to run serverless code globally. Initially focused on bringing compute closer to users for reduced latency, it has expanded to support complex applications and foster community engagement. This includes enabling client-side A/B testing by hoisting critical logic to the edge, avoiding browser bottlenecks and FOUC. Furthermore, Workers are being used for server-side experimentation and feature flagging. Recent advancements include the introduction of Deployments, which allow developers to track changes to their Worker code, configuration, and bindings, providing an audit log and laying the groundwork for automated deployments and rollbacks.

2022

Keep track of Workers’ code and configuration changes with Deployments

11/17/2022

This post introduces 'Deployments' for Cloudflare Workers, a new feature that allows developers to track changes to their Worker code, configuration, and bindings. It provides an audit log of who made changes, where they came from, and when they were made, with initial support for wrangler, API, dashboard, and Terraform. The feature is currently in open beta and lays the foundation for future enhancements like automated deployments and rollbacks.

Production ready eBPF, or how we fixed the BSD socket API

2/17/2022

This post introduces 'tubular', a production-ready eBPF tooling developed by Cloudflare to address limitations of the BSD socket API. It enables advanced network traffic management at the edge, allowing for dynamic changes to service addresses, handling millions of IPs, and managing overlapping port/address configurations for products like Spectrum and DNS resolution. The post details the architecture of tubular, its user interface for managing bindings and sockets, and its use of eBPF maps for state storage and precedence encoding.

A Workers optimization that reduces your bill

1/14/2022

This post details a significant optimization to the Cloudflare Workers runtime that reduces billing duration for Unbound Workers. The change allows the system to mark application code as 'idle' as soon as response headers are returned, even if the response body is still streaming. This optimization also applies to WebSocket proxying, reading from the cache, and streaming from KV, leading to an average reduction of 70% in the time a Worker is considered 'in use' and thus reducing customer bills.

2020

Announcing wrangler dev — the Edge on localhost

8/26/2020

This post announces the General Availability of `wrangler dev`, a new tool that provides an edge-based local development environment for Cloudflare Workers. It addresses the challenges of local development by offering a high-fidelity, consistent experience that mirrors production, including live reloading, direct terminal logging, and the ability to test features like Cache API and KV namespaces without impacting production data. This significantly improves the developer experience for building and testing Workers.

2019

Live Preview: Build and Test Workers Faster with Wrangler CLI 1.2.0

8/20/2019

This post introduces a significant enhancement to the developer experience for Cloudflare Workers through the Wrangler CLI. Version 1.2.0 adds a 'live preview' and 'watch' functionality (`wrangler preview --watch`) that allows developers to see their changes reflected in a single browser tab automatically after saving files. This was achieved by implementing file system event monitoring with a cooldown period and using WebSockets for communication between the CLI and the previewer, greatly improving the speed and efficiency of the development and testing cycle for Workers.

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 specifically designed for Cloudflare Workers. It highlights how Workers' global distribution and low latency make them an ideal platform for hosting GraphQL servers, simplifying data management for full-stack developers and enabling rapid deployment of APIs worldwide.

2018

Cloudflare Workers is now on Open Beta

2/1/2018

This post announces the open beta of Cloudflare Workers, introducing the core concept of running JavaScript on Cloudflare's edge network. It highlights the ability to intercept and modify requests, make outbound calls, and replace CDN configurations. The post also provides initial use cases like A/B testing, conditional routing, request filtering, response aggregation, and hotlink protection, along with links to documentation, recipes, and community forums. It marks the public debut and initial feature set of this new edge computing platform.