Cloudflare Revolutionizes Serverless Billing with New CPU Time-based Pricing Model
In an interesting move towards cloud efficiency, Cloudflare has announced today an innovative pricing structure for its Workers and Pages Functions services, promising to revolutionize the way developers pay for cloud computing. In a radical departure from existing models, Cloudflare will now bill only for the CPU time that applications actually consume, eliminating costs associated with downtime during input/output (I/O) operations.
Why is this exciting news? Up to now, major serverless computing platforms billed based on the execution duration of a function, i.e., “wall time.” However, this method often resulted in customers paying for downtime while their functions waited for network responses or other I/O operations. For example, a function running for 100ms might spend only 10ms doing CPU work, such as data processing or JSON analysis, and the rest of the time waiting for I/O.
Breaking away from the Cloudflare status quo means that developers will no longer incur costs for downtime. This change not only promotes fair and transparent billing but also incentivizes the optimization of computing time and aligns Cloudflare’s interests with those of its users: efficient use of computing resources.
Unlike duration-based billing, CPU time is predictable and controllable by the developer. This is crucial, especially when building AI applications that interact with Large Language Models (LLMs), where response time can vary significantly. With Cloudflare’s new pricing structure, an increase in response duration does not translate to a cost increase.
Starting on October 31, 2023, Cloudflare will allow users to opt-in to the new pricing structure for individual Workers and Pages Functions projects, and newly created projects will be enrolled by default. Current clients will have the option to migrate at their own pace before the transition becomes automatic on March 1, 2024.
Additionally, paying Workers customers will have the ability to set a maximum CPU time limit for each Worker, a safeguard against unexpected bills and resource-draining attacks. These security measures underscore Cloudflare’s commitment to a worry-free and transparent user experience.
On the Durable Objects front, Cloudflare maintains its duration-based billing model, with the addition of the Hibernation API, allowing to keep states in memory without incurring costs for downtime.
Another innovation worth noting is the announcement of Cloudflare Snippets, currently in alpha phase, which will allow developers to freely modify the behavior of Cloudflare’s CDN for simple tasks.
Cloudflare ends its announcement with a bold promise: to be the limitless development platform, where scale, regions, instances, and concurrency are not obstacles to global growth and operation. With these changes, Cloudflare is not only redefining the economics of cloud computing but also enabling developers’ creativity to flow without the financial constraints of outdated pricing models. The industry eagerly awaits how this new era of serverless computing will unfold under the leadership of Cloudflare.