Follow us
Breaking
Web Hosting

Cloudflare edge compute infrastructure and pricing

Cloudflare manages state using Durable Objects and CockroachDB while offering a Workers Paid plan for $5 monthly. The platform recently improved benchmark speeds by 25% through updates to its scheduling algorithm and V8 garbage collection settings.

Share

Cloudflare runs Durable Objects in specific data centers or clusters of four or five colos to manage state. These objects do not run in every server location, as the network includes everything from single racks in an ISP to full data centers. The system uses CockroachDB for persistent storage and replication. If a heartbeat for a durable object stops, the rest of the cluster takes ownership of the object to maintain availability. For requests with external identifiers, the control plane checks for an existing copy to ensure only one instance of a durable object exists at any time. If the system finds an existing ID, it connects the request to the correct data center. If a new ID is needed, the colo generates it and the control plane caches it for future reference. The control plane also manages the consensus of whether a specific identifier is already in use.

Cloudflare developers use Wrangler as the official CLI for Workers. The platform provides a free tier for global deployment and allows users to set jurisdictions for individual Durable Objects. This jurisdiction feature ensures data for a specific user stays in the EU or Australia depending on the settings. You should manage access control within a worker in front of your Durable Object since the objects lack inbuilt permissions. One use case for Durable Objects involves block streaming, where a builder streams data to the object and participants connect to that object to stream events. The system works toward a model called region Earth where data storage locations depend on user constraints.

Akamai and Fastly comparison

Akamai maintains a massive global infrastructure with more than 288,000 servers across 1,500 networks and 136 countries. This scale allows Akamai to handle traffic spikes for media-intensive sites or ecommerce platforms. Akamai provides an App and API Protector that includes WAF, bot mitigation, API security, and DDoS protection. Fastly operates in at least 58 cities and maintains a combined global capacity of 130 terabits per second. Fastly uses network automation to manage traffic peaks during live-streamed events and connects directly to numerous ISPs to keep video traffic close to end-users. Fastly once suffered a worldwide disruption that affected sites including Reddit and Spotify.

Large enterprises often select Akamai for its deep customization and global reach, while Cloudflare attracts developers with an intuitive interface and a free tier. Akamai does not list a free tier. Cloudflare uses its Web Application Firewall to sift malicious requests and perform analysis of incoming web traffic. Cloudflare also uses rate limiting to prevent API abuse. Fastly focuses on delivering video streams as close to the end-user as possible through direct ISP paths. Cloudflare, Fastly, and Akamai all use WebAssembly to run code at the edge. WebAssembly provides a lightweight sandbox that allows providers to run applications with high density and security.

Performance and pricing models

Cloudflare Workers Paid plan costs $5 monthly and includes 10 million requests and 30 million CPU milliseconds. Users pay $0.30 per additional million requests and $0.02 per additional million CPU milliseconds. On the entry Workers plan, users get 100,000 requests a day and 10 milliseconds of CPU time per invocation. Queues on the $5 plan cost $0.40 per million operations after 1 million included operations. A write, read, or delete of a message up to 64 KB counts as one operation. If a message reaches 100 KB, it spans two 64 KB units and the lifecycle costs six operations instead of three.

Service Component Plan Type Included Amount Additional Cost
Workers Requests Paid 10 million $0.30 / million
Workers CPU Time Paid 30 million ms $0.02 / million ms
Queues Operations Paid 1 million $0.40 / million
Workers Requests Entry 100,000 / day N/A
Workers CPU Time Entry 10 ms / invocation N/A
Workers KV Storage Paid 1 GB $0.20 / GB-month

A developer benchmark claimed Cloudflare Workers performed up to 3.5 times slower than Vercel for heavy CPU-bound tasks because the platform used outdated V8 garbage collection settings and delayed launching new isolates for heavy requests. This performance gap also involved OpenNext, where unnecessary data copying occurred when converting between Node.js Streams and Web Standard Streams. Cloudflare addressed this by updating the scheduling algorithm and removing outdated V8 garbage collection settings, which increased benchmark speeds by 25%. The entry plan for Queues provides 10,000 operations a day and 24-hour retention. Does the removal of outdated garbage collection settings resolve all long-term performance regressions for heavy workloads?

Share

Technewsdaily

Senior tech writer covering AI, gadgets and cybersecurity. Breaking down the news that matters, every day.