
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Wed, 15 Apr 2026 21:12:53 GMT</lastBuildDate>
        <item>
            <title><![CDATA[A Workers optimization
that reduces your bill]]></title>
            <link>https://blog.cloudflare.com/workers-optimization-reduces-your-bill/</link>
            <pubDate>Fri, 14 Jan 2022 13:58:51 GMT</pubDate>
            <description><![CDATA[ Recently, we made an optimization to the Cloudflare Workers runtime which reduces the amount of time Workers need to spend in memory. We're passing the savings on to you for all your Unbound Workers ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/73dygAhS9763wLeQh24KQb/e66246cf1145aa84ffe53a598122982d/image2-20.png" />
            
            </figure><p>Recently, we made an optimization to the Cloudflare Workers runtime which reduces the amount of time Workers need to spend in memory. We're passing the savings on to you for all your Unbound Workers.</p>
    <div>
      <h3>Background</h3>
      <a href="#background">
        
      </a>
    </div>
    <p>Workers are often used to implement HTTP proxies, where JavaScript is used to rewrite an HTTP request before sending it on to an origin server, and then to rewrite the response before sending it back to the client. You can implement any kind of rewrite in a Worker, including both rewriting headers and bodies.</p><p>Many Workers, though, do not actually modify the response body, but instead simply allow the bytes to pass through from the origin to the client. In this case, the Worker's application code has finished executing as soon as the response headers are sent, before the body bytes have passed through. Historically, the Worker was nevertheless considered to be "in use" until the response body had fully finished streaming.</p><p>For billing purposes, under the Workers Unbound pricing model, we charge duration-memory (gigabyte-seconds) for the time in which the Worker is in use.</p>
    <div>
      <h3>The change</h3>
      <a href="#the-change">
        
      </a>
    </div>
    <p>On December 15-16, we made a change to the way we handle requests that are streaming through the response without modifying the content. This change means that we can mark application code as “idle” as soon as the response headers are returned.</p><p>Since no further application code will execute on behalf of the request, the system does not need to keep the request state in memory – it only needs to track the low-level native sockets and pump the bytes through. So now, during this time, the Worker will be considered idle, and could even be evicted before the stream completes (though this would be unlikely unless the stream lasts for a very long time).</p><p>Visualized it looks something like this:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7djse9b1v1MjBGgpym4A5F/fd4d66770445f7fa4978b88bf0a50810/DES-4045-Diagram.png" />
            
            </figure><p>As a result of this change, we've seen that the time a Worker is considered "in use" by any particular request has dropped by an average of 70%. Of course, this number varies a lot depending on the details of each Worker. Some may see no benefit, others may see an even larger benefit.</p><p>This change is totally invisible to the application. To any external observer, everything behaves as it did before. But, since the system now considers a Worker to be idle during response streaming, the response streaming time will no longer be billed. So, if you saw a drop in your bill, this is why!</p>
    <div>
      <h3>But it doesn’t stop there!</h3>
      <a href="#but-it-doesnt-stop-there">
        
      </a>
    </div>
    <p>The change also applies to a few other frequently used scenarios, namely Websocket proxying, reading from the cache and streaming from KV.</p><p><b>WebSockets</b>: once a Worker has arranged to proxy through a WebSocket, as long as it isn't handling individual messages in your Worker code, the Worker does not remain in use during the proxying. The change applies to regular stateless Workers, but not to Durable Objects, which are not usually used for proxying.</p>
            <pre><code>export default {
  async fetch(request: Request) {
    //Do anything before
    const upgradeHeader = request.headers.get('Upgrade')
    if (upgradeHeader || upgradeHeader === 'websocket') {
      return await fetch(request)
    }
    //Or with other requests
  }
}</code></pre>
            <p><b>Reading from Cache</b>: If you return the response from a <code>cache.match</code> call, the Worker is considered idle as soon as the response headers are returned.</p>
            <pre><code>export default {
  async fetch(request: Request) {
    let response = await caches.default.match('https://example.com')
    if (response) {
      return response
    }
    // get/create response and put into cache
  }
}</code></pre>
            <p><b>Streaming from KV</b>: And lastly, when you stream from KV. This one is a bit trickier to get right, because often people retrieve the value from KV as a string, or JSON object and then create a response with that value. But if you fetch the value as a stream, as done in the example below, you can create a Response with the ReadableStream.</p>
            <pre><code>interface Env {
  MY_KV_NAME: KVNamespace
}

export default {
  async fetch(request: Request, env: Env) {
    const readableStream = await env.MY_KV_NAME.get('hello_world.pdf', { type: 'stream' })
    if (readableStream) {
      return new Response(readableStream, { headers: { 'content-type': 'application/pdf' } })
    }
  },
}</code></pre>
            
    <div>
      <h3>Interested in Workers Unbound?</h3>
      <a href="#interested-in-workers-unbound">
        
      </a>
    </div>
    <p>If you are already using Unbound, your bill will have automatically dropped already.</p><p>Now is a great time to check out Unbound if you haven’t already, especially since recently, we’ve also <a href="/workers-now-even-more-unbound/">removed the egress fees</a>. Unbound allows you to build more complex workloads on our platform and only pay for what you use.</p><p>We are always looking for opportunities to make Workers better. Often that improvement takes the form of powerful new features such as the soon-to-be released <a href="/introducing-worker-services/">Service Bindings</a> and, of course, <a href="/cloudflare-workers-the-fast-serverless-platform/">performance enhancements</a>. This time, we are delighted to make Cloudflare Workers even cheaper than they already were.</p> ]]></content:encoded>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Workers Unbound]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">6zkd9alxKgty9fw7lNjmc9</guid>
            <dc:creator>Kenton Varda</dc:creator>
            <dc:creator>Erwin van der Koogh</dc:creator>
        </item>
        <item>
            <title><![CDATA[Workers, Now Even More Unbound: 15 Minutes, 100 Scripts, and No Egress Fees]]></title>
            <link>https://blog.cloudflare.com/workers-now-even-more-unbound/</link>
            <pubDate>Thu, 18 Nov 2021 14:00:18 GMT</pubDate>
            <description><![CDATA[ Workers is now even more Unbound, with no egress, more execution time, and more scripts. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Our mission is to enable developers to build their applications, end to end, on our platform, and ruthlessly eliminate limitations that may get in the way. Today, we're excited to announce you can build large, data-intensive applications on our network, all without breaking the bank; starting today, we're dropping <a href="https://www.cloudflare.com/learning/cloud/what-are-data-egress-fees/">egress fees</a> to zero.</p>
    <div>
      <h3>More Affordable: No Egress Fees</h3>
      <a href="#more-affordable-no-egress-fees">
        
      </a>
    </div>
    <p>Building more on any platform historically comes with a caveat — high data transfer cost. These costs often come in the form of egress fees. Especially in the case of data intensive workloads, egress data transfer costs can come at a high premium, depending on the provider.</p><p>What exactly are data egress fees? They are the costs of retrieving data from a cloud provider. Cloud infrastructure providers generally pay for bandwidth based on capacity, but often bill customers based on the amount of data transferred. Curious to learn more about what this means for end users? We recently wrote an analysis of <a href="/aws-egregious-egress/">AWS’ Egregious Egress</a> — a good read if you would like to learn more about the ‘Hotel California’ model AWS has spun up. Effectively, data egress fees lock you into their platform, making you choose your provider based not on which provider has the best infrastructure for your use case, but instead choosing the provider where your data resides.</p><p>At Cloudflare, we’re working to flip the script for our customers. Our recently announced <a href="/introducing-r2-object-storage/">R2 Storage</a> waives the data egress fees other providers implement for similar products. Cloudflare is a founding member of the <a href="https://www.cloudflare.com/bandwidth-alliance/">Bandwidth Alliance</a>, aiming to help our mutual customers overcome these data transfer fees.</p><p>We’re keeping true to our mission and, effective immediately, dropping all Egress Data Transfer fees associated with <a href="https://developers.cloudflare.com/workers/platform/pricing#pricing-1">Workers Unbound</a> and <a href="https://developers.cloudflare.com/workers/learning/using-durable-objects">Durable Objects</a>. If you’re using Workers Unbound today, your next bill will no longer include Egress Data Transfer fees. If you’re not using Unbound yet, now is a great time to experiment. With Workers Unbound, get access to longer CPU time limits and pay only for what you use, and don’t worry about the data transfer cost. When paired with Bandwidth Alliance partners, this is a cost-effective solution for any data intensive workloads.</p>
    <div>
      <h3>More Unbound: 15 Minutes</h3>
      <a href="#more-unbound-15-minutes">
        
      </a>
    </div>
    <p>This week has been about defining what the future of computing is going to look like. Workers are great for your latency sensitive workloads, with zero-milliseconds cold start times, fast global deployment, and the power of Cloudflare’s network. But Workers are not limited to lightweight tasks — we want you to run your heavy workloads on our platform as well. That’s why we’re announcing you can now use up to 15 minutes of CPU time on your Workers! You can run your most compute-intensive tasks on Workers using Cron Triggers. To get started, head to the <b>Settings</b> tab in your Worker and select the ‘Unbound’ usage model.</p><div></div><p>Once you’ve confirmed your Usage Model is Unbound, switch to the <b>Triggers</b> tab and click <b>Add Cron Trigger</b>. You’ll see a ‘Maximum Duration’ is listed, indicating whether your schedule is eligible for 15 Minute workloads.</p><div></div>
    <div>
      <h3>Wait, there’s more (literally!)</h3>
      <a href="#wait-theres-more-literally">
        
      </a>
    </div>
    <p>That’s not all. As a platform, it is validating to see our customers want to grow even more with us, and we’ve been working to address these restrictions. That’s why, starting today, all customers will be allowed to deploy up to 100 Worker scripts. With the introduction of <a href="/introducing-worker-services">Services</a>, that represents up to 100 environments per account. This higher limit will allow our customers to migrate more use cases to the Workers platform.</p><p>We’re also delighted to announce that, alongside this increase, the Workers platform will plan to support scripts larger in size. This increase will allow developers to build Workers with more libraries and new possibilities, like running Golang with WASM. Check out an <a href="https://esbuild.developers.workers.dev/">example of esbuild running on a Worker</a>, in a script that’s just over 2MB compressed. If you’re interested in larger script sizes, sign up <a href="https://www.cloudflare.com/larger-scripts-on-workers-early-access/">here</a>.</p><p>The future of cloud computing is here, and it’s on Cloudflare. Workers has always been the <a href="https://developers.cloudflare.com/workers/learning/security-model">secure</a>, <a href="/cloudflare-workers-the-fast-serverless-platform/">fast</a> serverless offering, and has recently been named a <a href="/forrester-wave-edge-development-2021/">leader</a> in the space. Now, it is even more affordable and flexible too.</p><p>We can’t wait to see what ambitious projects our customers build. Developers are now better positioned than ever to deploy large and complex applications on Cloudflare. Excited to build using Workers, or get engaged with the community? Join our <a href="https://discord.gg/rH4SsffFcc">Discord server</a> to keep up with the latest on Cloudflare Workers.</p> ]]></content:encoded>
            <category><![CDATA[Full Stack Week]]></category>
            <category><![CDATA[Egress]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Workers Unbound]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">6FeUc0F2arVJbpfBky0Jeu</guid>
            <dc:creator>Kabir Sikand</dc:creator>
        </item>
        <item>
            <title><![CDATA[Improve your page experience with AMP and Cloudflare Workers Unbound]]></title>
            <link>https://blog.cloudflare.com/amp-optimizer-on-cloudflare-workers/</link>
            <pubDate>Wed, 14 Apr 2021 13:01:00 GMT</pubDate>
            <description><![CDATA[ Google’s new page experience measurements are going to be included in their search ranking in May 2021. Learn more about how to improve your page experience with AMP and Cloudflare Workers. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>In this blog post we’re going to look at how you can optimize the page experience of your AMP pages by running AMP Optimizer in a Cloudflare Worker.</p>
    <div>
      <h2>Towards a better user experience on the web</h2>
      <a href="#towards-a-better-user-experience-on-the-web">
        
      </a>
    </div>
    <p>A great user experience on the web means more than just having a website that loads fast (although that continues to be a critical part of the user experience). There are many factors that contributing to a great experience, such as:</p><ul><li><p>Loading speed</p></li><li><p>Responsiveness</p></li><li><p>Content stability</p></li></ul><p>Traditionally, these have been hard to measure, but with <a href="https://web.dev/vitals">Core Web Vitals</a> we now have a new way to measure user experience on the web. The key is: Core Web Vitals are based on <a href="https://web.dev/vitals-measurement-getting-started/">real world user data</a>. To score well on Core Web Vitals you need to make sure that your website performs well - for all your users around the world.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/WMhd5DGEooz8bD2EGDdCV/904a09ca0ccf595b9504aff7e6686de6/image1-16.png" />
            
            </figure><p><a href="https://lh5.googleusercontent.com/HlrpevA1hZKx35h2SQdwOBdCO4FOC0YOqie9eMTiGDZx5MdSVTxY2VwPwdL58Pi68cuuG0ooeRTs3RJQEfU5woNRpgq1ZLV4SrWkzHIOH4kTnLS32i62Qf7UibEcz2xm8Gb4nT_e">Image URL</a></p><p>This becomes even more important soon, as <a href="https://www.cloudflare.com/learning/performance/what-are-core-web-vitals/">Core Web Vitals</a> are also going to be a signal in the upcoming <a href="https://developers.google.com/search/docs/guides/page-experience">page experience ranking update in Google Search</a>. You can find more details in the <a href="https://support.google.com/webmasters/thread/104436075?hl=en">page experience FAQ</a>.</p>
    <div>
      <h2>How to achieve a great page experience with AMP</h2>
      <a href="#how-to-achieve-a-great-page-experience-with-amp">
        
      </a>
    </div>
    <p><a href="https://amp.dev">AMP</a> is an <a href="https://github.com/ampproject/amphtml">open source</a> web components framework that has been <a href="https://blog.amp.dev/2020/05/06/amp-web-vitals-a-better-web-together/">developed with page experience in mind</a>. AMP ensures a good page experience by providing guardrails that help avoid common performance pitfalls. For example, AMP features a static layout system, which <a href="https://blog.amp.dev/2020/04/16/cumulative-layout-shift-in-amp/">avoids content shifts by design</a>.</p><p>However, AMP pages can still fail Core Web Vitals. The reason for this is clear: some performance best practices required for performing well on Core Web Vitals can’t be implemented at client-side. For example, image optimization, fast server-response times and effective font-loading are all critical for a good user experience, but need to be done on the server. Even AMP documents themselves can be further optimized. For example, <a href="https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/amp-optimizer-guide/explainer/?format=websites#server-side-rendering-amp-layouts">AMP’s layout system can be pre-rendered at build or serving time</a> which greatly <a href="https://blog.amp.dev/2018/10/08/how-to-make-amp-even-faster/">improves page load times</a> while still ensuring that there are no content jumps.</p><p>The good news is, if an AMP page is surfaced in Google Search or Bing, it’ll be served from an AMP Cache which performs all these optimizations for you. But when someone visits your AMP page directly, for example through a link shared on social media, they won’t get the same experience. In order to ensure that you are getting great Core Web Vitals scores for all your users, it is very important to optimize your AMP pages on your origin as well!</p><p>To help with this, the AMP team has created <a href="https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/amp-optimizer-guide/?format=websites">AMP Optimizers</a>, which will automatically perform common performance best practices for you. Using AMP Optimizers combined with Cloudflare Workers makes it super easy to serve optimized AMP pages on your own origin.</p>
    <div>
      <h2>Introducing AMP Optimizer for Cloudflare Workers</h2>
      <a href="#introducing-amp-optimizer-for-cloudflare-workers">
        
      </a>
    </div>
    <p>We are happy to announce a new AMP Optimizer integration for Cloudflare Workers. So far, there are two AMP Optimizer versions available: one for NodeJS and one for PHP. Both take an AMP HTML document as input and turn it into an optimized AMP HTML document. Depending on when your pages are created, one of these needs to be run either as part of your build system or in on your backend as part of your rendering pipeline. However, integrating an AMP Optimizer is not always straightforward, for example if you’re not using PHP or NodeJS in your backend or when you don’t control the hosting environment.</p><p>With the Cloudflare Worker integration for AMP Optimizer you can seamlessly optimize all your AMP pages. You can find installation instructions on the <a href="https://github.com/ampproject/cloudflare-amp-optimizer">Github repository</a>.</p>
    <div>
      <h2>Looking under the hood</h2>
      <a href="#looking-under-the-hood">
        
      </a>
    </div>
    <p>Let’s dive into how the Cloudflare Worker works, so that we can get a better understanding of where it optimises things.</p>
    <div>
      <h3>Request Flow</h3>
      <a href="#request-flow">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6xCiShc9Elek69vK23ut4U/1e17a5d32c23a47e722b1d7ada2a8c49/image5-5.png" />
            
            </figure><p>Whenever a request comes in for an HTML file (1), the Worker will first check in the global cache if an optimised version has already been generated (2). If that is not the case (3), the Worker will request the version of the file from your origin (4)(5), optimize the document if it is using AMP (6), and return that to the user (7). Only after the response has been fully streamed to the user will we start saving the generated version in the cache (8).</p><p>For subsequent requests, in a Worker anywhere else in the world, the result will be retrieved from the global KV cache, cached locally in that data center and returned straight away.</p>
    <div>
      <h3>Automatic preloading</h3>
      <a href="#automatic-preloading">
        
      </a>
    </div>
    <p>Because the AMP Optimizer parses the HTML document, it will discover what other resources are used, and will add preload tags for external resources such as fonts and hero images.</p>
    <div>
      <h3>Responsive images out of the box</h3>
      <a href="#responsive-images-out-of-the-box">
        
      </a>
    </div>
    <p>Images are often the biggest contributors to the total download size of a web page. Customers on the Business or Enterprise plans can automatically make use of the Cloudflare Image Optimization functionality. For those customers, the AMP Optimizer can automatically generate <a href="https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images">image source sets</a> with links for the <a href="https://developers.cloudflare.com/images/">Cloudflare Image Optimizer</a>.</p><p>Image sourcesets give the browser different options to pick the most appropriate image size for that particular browser viewport. This can greatly reduce the size of the image downloads for, say, a low end mobile phone, which needs much smaller images than a 4K desktop monitor.</p>
    <div>
      <h2>Peace of mind with Cloudflare Workers Unbound</h2>
      <a href="#peace-of-mind-with-cloudflare-workers-unbound">
        
      </a>
    </div>
    <p>While most of the requests will be handled very quickly, even the ones that need optimising, the optimisation of large files can take more than 50ms of CPU time. Which is why Workers Unbound is a perfect match for the AMP Optimizer Worker.</p><p>Workers Unbound allows Workers to execute for up to 30 seconds, so that even if it does take a bit longer than 50ms to optimize a document, your users will never see any errors.</p>
    <div>
      <h2>What are the performance gains?</h2>
      <a href="#what-are-the-performance-gains">
        
      </a>
    </div>
    <p>Web performance is much more complex than any synthetic test can prove, so you should absolutely do your own performance testing on your own sites. But here is an example of a regular AMP page with and without the Cloudflare Worker AMP Optimizer in front of it. This is tested on a simulated Moto G4 on a fast 3G network.</p><div></div>
<p></p><p>Here is the full <a href="https://www.webpagetest.org/video/compare.php?tests=210414_AiDcZY_f5be5cec9691704310f8659401bf27df,210414_BiDcZ1_f16da211a5c7f589237b5c2b0e72634d">WegPageTest data</a> if you want to explore this example further.</p><p>There is also an <a href="https://github.com/ampproject/amp-toolbox/blob/main/packages/cloudflare-optimizer-scripts/benchmark/index.js">example benchmark script</a> you can adapt if you want to run performance tests on your own site.</p>
    <div>
      <h2>Summary</h2>
      <a href="#summary">
        
      </a>
    </div>
    <p>Cloudflare Workers offer a simple way to prepare your AMP pages for Google’s upcoming page experience launch. They offer a seamless integration that doesn’t require any changes in your CMS or server. Even better — with the new Cloudflare Workers Unbound, it becomes possible to perform even more advanced optimizations. Check out the <a href="https://github.com/ampproject/cloudflare-amp-optimizer">cloudflare-amp-optimizer</a> repository for more details on how to get started.</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[AMP]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Workers Unbound]]></category>
            <category><![CDATA[Performance]]></category>
            <guid isPermaLink="false">3XzoZwY99Dv8W1PqZBOsgp</guid>
            <dc:creator>Erwin van der Koogh</dc:creator>
            <dc:creator>Sebastian Benz</dc:creator>
            <dc:creator>Jake Fried</dc:creator>
        </item>
        <item>
            <title><![CDATA[Announcing Cloudflare Workers Unbound for General Availability]]></title>
            <link>https://blog.cloudflare.com/workers-unbound-ga/</link>
            <pubDate>Wed, 14 Apr 2021 13:00:00 GMT</pubDate>
            <description><![CDATA[ Since the Workers Unbound beta announcement last year, we’ve been hard at work tuning our systems to prepare for the public launch for Workers Unbound. We’ve seen enormous demand from developers, customers, and the Cloudflare community at large.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Since the Workers Unbound beta announcement last year, we’ve been hard at work tuning our systems to prepare for the public launch for Workers Unbound. We’ve seen enormous demand from developers, customers, and the Cloudflare community at large. We’ve been inspired to see our users develop a wide range of use cases, from enterprise features to entirely new applications and unlock creativity with personal projects.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3gNJxq5oKyyLQxsiWDTzLe/abe5bfdd4de49ceadca64e6185c38b46/image4-2.png" />
            
            </figure><p>Workers Unbound is intended for applications that need long execution times. Today, we are making our extended CPU limits of up to 30 seconds for HTTP requests generally available to customers on the Workers Paid plan. Please note that you will still be able to access Bundled Workers, which are capped at 50 milliseconds, by toggling your Workers at a per script level.</p><p>In addition, we are offering a <a href="https://www.cloudflare.com/workers-unbound-beta/">private beta</a> for Cron Triggers of up to 15 minutes for those who need even longer execution times. HTTP Workers are triggered by HTTP requests as part of the Fetch API, whereas Cron Workers are scheduled jobs invoked by <a href="https://developers.cloudflare.com/workers/platform/cron-triggers#:~:text=Cron%20Triggers%20allow%20users%20to,up%2Dto%2Ddate%20data.">Cron Triggers</a>. Our aim with this release is to allow customers to bring all of their intensive workloads to Workers and access the benefits of our edge network, without having to worry about computation limits.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5NhHiWWU9dlJSIAl6LITEg/10dd6e99b7239cf208fd0c79e847ed1b/unnamed--2-.gif" />
            
            </figure><p>The feedback has been fantastic and we’re excited to see that our work to extend compute limits to unlock new use cases is resonating with our community (please join our Discord server <a href="https://discord.gg/c2eACA4qXA">here</a>)!  We want Workers Unbound to be the choice that developers turn to for any workload that might otherwise be run on traditional serverless platforms like AWS Lambda  — and we’re thrilled to see that the message is resonating.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4XkkETlZ6pn1p60dxcjczh/99ecda993c55c35f4600811793eb3602/image6-3.png" />
            
            </figure>
    <div>
      <h3>Slashing egress pricing</h3>
      <a href="#slashing-egress-pricing">
        
      </a>
    </div>
    <p>Workers Unbound aims to be the cheapest general purpose computing platform, and we’ve made changes to our pricing plan to solidify that position. As <a href="/introducing-workers-unbound/">announced</a> during the beta, the Workers Unbound pricing model includes charges for duration and egress as well as requests, but we will not include any additional charges as other providers do, such as API Gateway or <a href="https://www.cloudflare.com/cloudflare-vs-cloudfront/">CloudFront</a>.</p><p>Over the course of development, we also heard your feedback on the cost of egress. We know that these costs are top of mind for developers who need to do intensive storage and transfer operations. In response to that, we have cut our egress in half from \$0.09 per GB to \$0.045 per GB.</p><p>Furthermore, we increased the usage that is included in our $5 a month cost, detailed below. Now, as a part of the Workers Paid plan, we will give you more usage for the same rate.</p><p>We know that cost can be a major pain point for other serverless providers, and we want to make sure that developers using Workers Unbound can spend more time building applications with cutting edge technologies and less time worrying about their bill. You can read more about our pricing in these <a href="https://developers.cloudflare.com/workers/platform/limits">docs</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/745kDWgFXRQRJz1HQDTtBV/6a9917b166351ce46d1a1b7d0c006ed4/image2-8.png" />
            
            </figure>
    <div>
      <h3>Serverless as a building block for application development</h3>
      <a href="#serverless-as-a-building-block-for-application-development">
        
      </a>
    </div>
    <p>Back in 2017, when we launched the Workers platform, we opted to tackle the lower latency use cases first. This approach helped us serve our existing customers, who wanted to modify Cloudflare products they were already using, like <a href="https://www.cloudflare.com/learning/ddos/glossary/web-application-firewall-waf/">WAF</a> and who usually required little time to execute. We retained the ability to adjust the CPU time limit in special cases. Sometimes we did this for customers with specific needs, and often those customers were our own teams at Cloudflare building on Workers. As these requests became more and more frequent, we began to see the real-world practicality of offering higher compute limits to the general market. Our beta program has helped validate this hypothesis.</p><p>We’ve seen some of our early access Unbound testers use the platform for more complex compute use cases like genomic analysis. Dr. Robert Aboukhalil, a software engineer and bioinformatics specialist, used Workers Unbound to build an API that simulates DNA sequencing data, requesting subsets of a reference genome and streaming it back to the user. To power those simulations, he compiled wgsim, an open source genomics tool for simulating sequence reads from a reference genome, from C to WebAssembly using biowasm. Next, he used the human genome referenced hosted on the public repo of the <a href="https://www.internationalgenome.org/">1,000 Genomes Project</a> as a starting point to apply random modifications to simulate errors introduced during the experiment. You can read more about his explorations in this <a href="https://robaboukhalil.medium.com/serverless-genomics-c412f4bed726">blog</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7KTRC1CfbklEdFLt6DMVFD/1fc51c483890926fd6d8734e66cc0b9d/image1-15.png" />
            
            </figure><blockquote><p>In Dr. Aboukhalil’s own words: "Cloudflare Workers Unbound and KV are well-suited for complex workloads such as powering genomics analysis. For example, I was able to build an API that simulates DNA sequencing data. Workers was well suited as it features 0 ms initialization time (i.e. no “cold starts”), runs at the edge (i.e. in a data center close to your users), and has a pricing model that doesn’t require a degree in quantum physics to understand."</p></blockquote><p>We’ve also seen that Workers Unbound can be a critical part of scaling applications at large enterprise companies. Thomson Reuters used Workers Unbound to build EverCache, a cache implementation designed to improve efficiency and load times across thousands of their partner websites.</p><blockquote><p>According to Randy Kleinhuizen, an architect at Thomson Reuters, "We use Cloudflare Workers Unbound and Workers KV to reduce the burden on our origin servers and pre-populate our cache. We are early users of Unbound's long running Workers, and the simple integration with Workers KV has made it easy to use, with consistent performance and reliability."</p></blockquote><p>Furthermore, our testers have taught us that Workers Unbound is a powerful environment for sandboxing and experimentation. Customers who originally used our platform for more simple use cases are able to expand by testing out ideas, prototyping and building out optimizations with Unbound.</p><blockquote><p>As we heard from Kenn North, principal product manager at National Instruments, "Workers has been our go-to tool for scaling and tuning ni.com. We first started using Workers for redirects, and then began using Workers Unbound once we realized it could be a powerful tool for other features such as detecting the location of users and adjusting the experience accordingly. We started experimenting with using includes for deploying common header and footer HTML across the site, and currently we are improving routing, image optimization, and page caching. Our development team loves having the ability to experiment with building new features on top of Workers."</p></blockquote>
    <div>
      <h3>Getting Started with Workers Unbound</h3>
      <a href="#getting-started-with-workers-unbound">
        
      </a>
    </div>
    <p>Starting today, Workers Unbound is available to anyone with a Cloudflare Workers Paid subscription. Navigate to the Workers <a href="https://dash.cloudflare.com/?account=workers/plans">dashboard</a>, click "Change" under the Default Usage Model section, and follow the prompts to enable Unbound on your account. You can also change the Usage Model for individual Workers under the Settings tab of each Worker.</p><p>Once enabled, Unbound can also be used through wrangler, the command-line tool for deploying Workers. First, make sure to <a href="https://developers.cloudflare.com/workers/cli-wrangler/install-update">update</a> wrangler to release 1.15.1 or later. Then, configure the usage model of your Worker by setting the usage_model field in your wrangler.toml to either "bundled" or "unbound".</p><p>As a reminder, the “bundled” usage model gives you access to our original Workers model with up to 50ms of compute time. The model “unbound” opts you into the higher execution limits with the pricing listed above. If you don't specify a usage model, new Workers scripts will use the default usage model set through the dashboard.</p><p>If you want to try Workers Unbound today, please take a look at this template, licensed under the MIT license, and give it a whirl!</p>
            <pre><code>// Try running this script first with Usage Model: Bundled
// see how far it can count.
//
// Then update the script's Usage Model to Unbound to see
// how much further it can go!
//
// note: 1st requests on a connection in Bundled mode
// might get higher cpu allocation than average requests.
 
addEventListener('fetch', event =&gt; {
 event.respondWith(handleEvent(event))
})
 
async function handleEvent(event) {
 let { readable, writable } = new TransformStream()
 let countingIsDone = countToOneTrillion(writable)
 event.waitUntil(countingIsDone)
 
 // start streaming response while still counting
 return new Response(readable, {
   status: 200,
   headers: {
     'Content-Type': 'text/plain; charset=utf8',
     'X-Content-Type-Options': 'nosniff',
   },
 })
}
 
async function countToOneTrillion(writableStream) {
 // This is an example of a cpu-heavy long running task.
 //
 // Try your own example here instead!
 // Fractal Generator? ML model training?
 
 const million = 1000000
 const intro = `Hello World!
Let's count to one trillion:
(we'll stop when cpu limits are exceeded)
 
`
 const writer = writableStream.getWriter()
 const encoder = new TextEncoder()
 await writer.write(encoder.encode(intro))
 
 for (let i = 1; i &lt;= million * million; i++) {
   if (i % (2 * million) == 0) {
     // send an update to client every 2M cycles
     const count = i / million
     const line = `${count} million\n`
     await writer.write(encoder.encode(line))
   }
 }
 await writer.close()
 return
}</code></pre>
            <p>We hope you give Workers Unbound a try - and if you have any feedback or questions please let us know on our Discord server <a href="https://discord.gg/c2eACA4qXA">here</a>! If you are interested in signing up for the beta program for 15 minute Cron Workers, please contact us with <a href="https://www.cloudflare.com/workers-unbound-beta/">this form</a>.</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Workers Unbound]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">13zQI0LBFxOfPGAFmSqRUe</guid>
            <dc:creator>Nancy Gao</dc:creator>
        </item>
    </channel>
</rss>