
<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>Sun, 05 Apr 2026 12:22:16 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Announcing Workers automatic tracing, now in open beta]]></title>
            <link>https://blog.cloudflare.com/workers-tracing-now-in-open-beta/</link>
            <pubDate>Tue, 28 Oct 2025 12:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare Workers' support for automatic tracing is now in open beta! Export traces to any OpenTelemetry-compatible provider for deeper application observability -- no code changes required ]]></description>
            <content:encoded><![CDATA[ <p></p><p>When your Worker slows down or starts throwing errors, finding the root cause shouldn't require hours of log analysis and trial-and-error debugging. You should have clear visibility into what's happening at every step of your application's request flow. This is feedback we’ve heard loud and clear from developers using Workers, and today we’re excited to announce an Open Beta for tracing on <a href="https://www.cloudflare.com/developer-platform/products/workers/"><u>Cloudflare Workers</u></a>! You can now:  </p><ul><li><p><b>Get automatic instrumentation for applications on the Workers platform: </b>No manual setup, complex instrumentation, or code changes. It works out of the box. </p></li><li><p><b>Explore and investigate traces in the Cloudflare dashboard:</b> Your traces are processed and available in the Workers Observability dashboard alongside your existing logs.</p></li><li><p><b>Export logs and traces to OpenTelemetry-compatible providers:</b> Send OpenTelemetry traces (and correlated logs) to your observability provider of choice. </p></li></ul><p>In 2024, <a href="https://blog.cloudflare.com/cloudflare-acquires-baselime-expands-observability-capabilities/"><u>we set out to build</u></a> the best first-party <a href="https://www.cloudflare.com/developer-platform/products/workers-observability/"><u>observability</u></a> of any cloud platform. We launched a new metrics dashboard to give better insights into how your Worker is performing, <a href="https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs"><u>Workers Logs</u></a> to automatically ingest and store logs for your Workers, a <a href="https://developers.cloudflare.com/workers/observability/query-builder/"><u>query builder</u></a> to explore your data across any dimension and <a href="https://developers.cloudflare.com/workers/observability/logs/real-time-logs/"><u>real-time logs</u></a> to stream your logs in real time with advanced filtering capabilities. Starting today, you can get an even deeper understanding of your Workers applications by enabling automatic <b>tracing</b>!</p>
    <div>
      <h3>What is Workers Tracing? </h3>
      <a href="#what-is-workers-tracing">
        
      </a>
    </div>
    <p>Workers traces capture and emit OpenTelemetry-compliant spans to show you detailed metadata and timing information on every operation your Worker performs.<b> </b>It helps you identify performance bottlenecks, resolve errors, and understand how your Worker interacts with other services on the Workers platform. You can now answer questions like:</p><ul><li><p>Which calls are slowing down my application?</p></li><li><p>Which queries to my database take the longest? </p></li><li><p>What happened within a request that resulted in an error?</p></li></ul><p>Tracing provides a visualization of each invocation's journey through various operations. Each operation is captured as a span, a timed segment that shows what happened and how long it took. Child spans nest within parent spans to show sub-operations and dependencies, creating a hierarchical view of your invocation’s execution flow. Each span can include contextual metadata or attributes that provide details for debugging and filtering events.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4F7l3WSJ2hY0eu6kX47Rdp/c7c3934e9abbbb1f01ec979941d35b54/unnamed.png" />
          </figure>
    <div>
      <h3>Full automatic instrumentation, no code changes </h3>
      <a href="#full-automatic-instrumentation-no-code-changes">
        
      </a>
    </div>
    <p>Previously, instrumenting your application typically required an understanding of the <a href="https://opentelemetry.io/docs/specs/"><u>OpenTelemetry spec</u></a>, multiple <a href="https://opentelemetry.io/docs/concepts/instrumentation/libraries/"><u>OTel libraries</u></a>, and how they related to each other. Implementation was tedious and bloated your codebase with instrumentation code that obfuscated your application logic.</p><p>Setting up tracing typically meant spending hours integrating third-party SDKs, wrapping every database call and API request with instrumentation code, and debugging complex config files before you saw a single trace. This implementation overhead often makes observability an afterthought, leaving you without full visibility in production when issues arise.</p><p>What makes Workers Tracing truly magical is it’s <b>completely automatic – no set up, no code changes, no wasted time. </b>We took the approach of automatically instrumenting every I/O operation in your Workers, through a deep integration in <a href="https://github.com/cloudflare/workerd"><u>workerd</u></a>, our runtime, enabling us to capture the full extent of data flows through every invocation of your Workers.</p><p>You focus on your application logic. We take care of the instrumentation.</p>
    <div>
      <h4>What you can trace today</h4>
      <a href="#what-you-can-trace-today">
        
      </a>
    </div>
    <p>The operations covered today are: </p><ul><li><p><b>Binding calls:</b> Interactions with various <a href="https://developers.cloudflare.com/workers/runtime-apis/bindings/"><u>Worker bindings</u></a>. KV reads and writes, <a href="https://www.cloudflare.com/developer-platform/products/r2/">R2 object storage</a> operations, Durable Object invocations, and many more binding calls are automatically traced. This gives you complete visibility into how your Worker uses other services.</p></li><li><p><b>Fetch calls:</b> All outbound HTTP requests are automatically instrumented, capturing timing, status codes, and request metadata. This enables you to quickly identify which external dependencies are affecting your application's performance.</p></li><li><p><b>Handler calls:</b> Methods on a Worker that can receive and process external inputs, such as <a href="https://developers.cloudflare.com/workers/runtime-apis/handlers/fetch/"><u>fetch handlers</u></a>, <a href="https://developers.cloudflare.com/workers/runtime-apis/handlers/scheduled/"><u>scheduled handlers</u></a>, and <a href="https://developers.cloudflare.com/queues/configuration/javascript-apis/#consumer"><u>queue handlers</u></a>. This gives you visibility into performance of how your Worker is being invoked.</p></li></ul>
    <div>
      <h4>Automatic attributes on every span </h4>
      <a href="#automatic-attributes-on-every-span">
        
      </a>
    </div>
    <p>Our automated instrumentation captures each operation as a span. For example, a span generated by an R2 binding call (like a <code>get</code> or <code>put</code> operation) will automatically contain any available attributes, such as the operation type, the error if applicable, the object key, and duration. These detailed attributes provide the context you need to answer precise questions about your application without needing to manually log every detail.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6n5j0AdsgouMuHacgrTW9Q/60e4f73dd66a591ee666d6acdbaafc03/unnamed2.png" />
          </figure><p>We will continue to add more detailed attributes to spans and add the ability to trace an invocation across multiple Workers or external services. Our <a href="http://developers.cloudflare.com/workers/observability/traces/spans-and-attributes/"><u>documentation</u></a> contains a complete list of all instrumented spans and their attributes.</p>
    <div>
      <h3>Investigate traces in the Workers dashboard</h3>
      <a href="#investigate-traces-in-the-workers-dashboard">
        
      </a>
    </div>
    <p>You can easily<a href="http://developers.cloudflare.com/workers/observability/traces/"><u> view traces directly within a specific Worker application</u></a> in the Cloudflare dashboard, giving you immediate visibility into your application's performance. You’ll find a list of all trace events within your desired time frame and a trace visualization of each invocation including duration of each call and any available attributes. You can also query across all Workers on your account, letting you pinpoint issues occurring on multiple applications. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7HU4vktx7zr3aflWK9cdsl/73dcd1f1f9702faa65430fec9c9da8c5/unnamed_3.png" />
          </figure><p>To get started viewing traces on your Workers application, you can set: </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5e7hIAgVnjxvZSshwBTpXf/a0571af6e43be414c85e25dba106848c/1.png" />
          </figure>
    <div>
      <h3>Export traces to OpenTelemetry compatible providers </h3>
      <a href="#export-traces-to-opentelemetry-compatible-providers">
        
      </a>
    </div>
    <p>However, we realize that some development teams need Workers data to live alongside other telemetry data in the <b>tools they are already using</b>. That’s why we’re also adding tracing exports, letting your team send, visualize and query data with your existing observability stack! Starting today, you can export traces directly to providers like <a href="https://www.honeycomb.io/"><u>Honeycomb</u></a>, <a href="https://grafana.com/"><u>Grafana</u></a>, <a href="https://sentry.io/welcome/"><u>Sentry</u></a> or any other <a href="http://developers.cloudflare.com/workers/observability/exporting-opentelemetry-data/#available-opentelemetry-destinations"><u>OpenTelemetry Protocol (OTLP) provider with an available endpoint</u></a>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3GdiHZEL1bIpGn5BRhbyyT/0fbb6610a488f5f2c44f78ba3ecaf576/Export_traces_to_OpenTelemetry_compatible_providers_.png" />
          </figure>
    <div>
      <h4>Correlated logs and traces </h4>
      <a href="#correlated-logs-and-traces">
        
      </a>
    </div>
    <p>We also support exporting OTLP-formatted logs that share the same trace ID, enabling third-party platforms to automatically correlate log entries with their corresponding traces. This lets you easily jump between spans and related log messages.</p>
    <div>
      <h4>Set up your destination, enable exports, and go! </h4>
      <a href="#set-up-your-destination-enable-exports-and-go">
        
      </a>
    </div>
    <p>To start sending events to your destination of choice, first, configure your OTLP endpoint destination in the Cloudflare dashboard. For every destination you can specify a custom name and set custom headers to include API keys or app configuration. </p><p>Once you have your destination set up (e.g. <code>honeycomb-tracing</code>), set the following in your <code>wrangler.jsonc </code>and deploy: </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2xUbPsz307PvkZ6i15iUKe/452efaad0afdbeb2722f42726d0a849b/3.png" />
          </figure>
    <div>
      <h3>Coming up for Workers observability</h3>
      <a href="#coming-up-for-workers-observability">
        
      </a>
    </div>
    <p>This is just the beginning of Workers providing the workflows and tools to get you the telemetry data you want, where you want it. We’re improving our support both for native tracing in the dashboard and for exporting other types of telemetry to 3rd parties. In the upcoming months we’ll be launching: </p><ul><li><p><b>Support for more spans and attributes: </b>We are adding more automatic traces for every part of the Workers platform. While our first goal is to give you visibility into the duration of every operation within your request, we also want to add detailed attributes. Your feedback on what’s missing will be extremely valuable here. </p></li><li><p><b>Trace context propagation: </b>When building<b> </b><b><i>distributed</i></b> applications, ensuring your traces connect across all of your services (even those outside of Cloudflare), automatically linking spans together to create complete, end-to-end visibility is critical. For example, a trace from Workers could be nested from a parent service or vice versa. When fully implemented, our automatic trace context propagation will follow <a href="https://www.w3.org/TR/trace-context/"><u>W3C standards</u></a> to ensure compatibility across your existing tools and services. </p></li><li><p><b>Support for custom spans and attributes</b>: While automatic instrumentation gives you visibility into what’s happening within the Workers platform, we know you need visibility into your own application logic too. So, we’ll give you the ability to manually add your own spans as well.</p></li><li><p><b>Ability to export metrics: </b>Today, metrics, logs and traces are available for you to monitor and view within the Workers dashboard. But the final missing piece is giving you the ability to export both infrastructure metrics (like request volume, error rates, and execution duration) and custom application metrics to your preferred observability provider.</p></li></ul>
    <div>
      <h3>What you can expect from tracing pricing  </h3>
      <a href="#what-you-can-expect-from-tracing-pricing">
        
      </a>
    </div>
    <p>Today, at the start of beta, viewing traces in the Cloudflare dashboard and exporting traces to a 3rd party provider are both free. On <b>January 15, 2026</b>, tracing and log events will be charged the following pricing:</p><p><b>Viewing Workers traces in the Cloudflare dashboard</b></p><p>To view traces in the Cloudflare dashboard, you can do so on a <a href="https://www.cloudflare.com/plans/developer-platform/"><u>Workers Free and Paid plan</u></a> at the pricing shown below:</p>
<div><table><thead>
  <tr>
    <th></th>
    <th><span>Workers Free</span></th>
    <th><span>Workers Paid</span></th>
  </tr></thead>
<tbody>
  <tr>
    <td><span>Included Volume </span></td>
    <td><span>200K events per day</span></td>
    <td><span>20M events per month </span></td>
  </tr>
  <tr>
    <td><span>Additional Events </span></td>
    <td><span>N/A</span></td>
    <td><span>$0.60 per million logs </span></td>
  </tr>
  <tr>
    <td><span>Retention </span></td>
    <td><span>3 days </span></td>
    <td><span>7 days </span></td>
  </tr>
</tbody></table></div><p><b>Exporting traces and logs </b></p><p>To export traces to a 3rd-party OTLP-compatible destination, you will need a <b>Workers Paid </b>subscription. Pricing is based on total span or log events with the following inclusions:</p>
<div><table><thead>
  <tr>
    <th></th>
    <th><span>Workers Free</span></th>
    <th><span>Workers Paid</span></th>
  </tr></thead>
<tbody>
  <tr>
    <td><span>Events  </span></td>
    <td><br /><span>Not available</span></td>
    <td><span>10 million events per month </span></td>
  </tr>
  <tr>
    <td><span>Additional events </span></td>
    <td><span>$0.05 per million batched events</span></td>
  </tr>
</tbody></table></div>
    <div>
      <h3>Enable tracing today</h3>
      <a href="#enable-tracing-today">
        
      </a>
    </div>
    <p>Ready to get started with tracing on your Workers application? </p><ul><li><p><b>Check out our </b><a href="http://developers.cloudflare.com/workers/observability/traces/"><b><u>documentation</u></b></a><b>: </b>Learn how to get set up, read about current limitations and discover more about what’s coming up. </p></li><li><p><b>Join the chatter in our </b><a href="https://github.com/cloudflare/workers-sdk/discussions/11062"><b>GitHub discussion</b></a><b>:</b> Your feedback will be extremely valuable in our beta period on our automatic instrumentation, tracing dashboard, and OpenTelemetry export flow. Head to our GitHub discussion to raise issues, put in feature requests and get in touch with us!</p></li></ul><p></p> ]]></content:encoded>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Observability]]></category>
            <category><![CDATA[Tracing]]></category>
            <category><![CDATA[OpenTelemetry ]]></category>
            <guid isPermaLink="false">2Np8UAH0AuW7KjeIwym0NY</guid>
            <dc:creator>Nevi Shah</dc:creator>
            <dc:creator>Boris Tane</dc:creator>
            <dc:creator>Jeremy Morrell</dc:creator>
        </item>
        <item>
            <title><![CDATA[Thirteen new MCP servers from Cloudflare you can use today]]></title>
            <link>https://blog.cloudflare.com/thirteen-new-mcp-servers-from-cloudflare/</link>
            <pubDate>Thu, 01 May 2025 13:01:19 GMT</pubDate>
            <description><![CDATA[ You can now connect to Cloudflare's first publicly available remote Model Context Protocol (MCP) servers from any MCP client that supports remote servers.  ]]></description>
            <content:encoded><![CDATA[ <p>You can now connect to Cloudflare's first publicly available <a href="https://blog.cloudflare.com/remote-model-context-protocol-servers-mcp/"><u>remote Model Context Protocol (MCP) servers</u></a> from Claude.ai (<a href="http://anthropic.com/news/integrations"><u>now supporting remote MCP connections!</u></a>) and other <a href="https://modelcontextprotocol.io/clients"><u>MCP clients</u></a> like Cursor, Windsurf, or our own <a href="https://playground.ai.cloudflare.com/"><u>AI Playground</u></a>. Unlock Cloudflare tools, resources, and real time information through our new suite of MCP servers including: </p>
<div><table><thead>
  <tr>
    <th><span>Server</span></th>
    <th><span>Description </span></th>
  </tr></thead>
<tbody>
  <tr>
    <td><a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/docs-vectorize"><span>Cloudflare Documentation server</span></a></td>
    <td><span>Get up to date reference information from Cloudflare Developer Documentation</span></td>
  </tr>
  <tr>
    <td><a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/workers-bindings"><span>Workers Bindings server </span></a></td>
    <td><span>Build Workers applications with storage, AI, and compute primitives</span></td>
  </tr>
  <tr>
    <td><a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/workers-observability"><span>Workers Observability server </span></a></td>
    <td><span>Debug and get insight into your Workers application’s logs and analytics</span></td>
  </tr>
  <tr>
    <td><a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/sandbox-container"><span>Container server</span></a></td>
    <td><span>Spin up a sandbox development environment </span></td>
  </tr>
  <tr>
    <td><a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/browser-rendering"><span>Browser rendering server</span></a><span> </span></td>
    <td><span>Fetch web pages, convert them to markdown and take screenshots</span></td>
  </tr>
  <tr>
    <td><a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/radar"><span>Radar server </span></a></td>
    <td><span>Get global Internet traffic insights, trends, URL scans, and other utilities</span></td>
  </tr>
  <tr>
    <td><a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/logpush"><span>Logpush server </span></a></td>
    <td><span>Get quick summaries for Logpush job health</span></td>
  </tr>
  <tr>
    <td><a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/ai-gateway"><span>AI Gateway server </span></a></td>
    <td><span>Search your logs, get details about the prompts and responses</span></td>
  </tr>
  <tr>
    <td><a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/autorag"><span>AutoRAG server</span></a></td>
    <td><span>List and search documents on your AutoRAGs</span></td>
  </tr>
  <tr>
    <td><a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/auditlogs"><span>Audit Logs server </span></a></td>
    <td><span>Query audit logs and generate reports for review</span></td>
  </tr>
  <tr>
    <td><a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/dns-analytics"><span>DNS Analytics server </span></a></td>
    <td><span>Optimize DNS performance and debug issues based on current set up</span></td>
  </tr>
  <tr>
    <td><a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/dex-analysis"><span>Digital Experience Monitoring server </span></a></td>
    <td><span>Get quick insight on critical applications for your organization</span></td>
  </tr>
  <tr>
    <td><a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/cloudflare-one-casb"><span>Cloudflare One CASB server </span></a></td>
    <td><span>Quickly identify any security misconfigurations for SaaS applications to safeguard applications, users, and data</span></td>
  </tr>
</tbody></table></div><p>… all through a natural language interface! </p><p>Today, we also <a href="http://blog.cloudflare.com/mcp-demo-day"><u>announced our collaboration with Anthropic</u></a> to bring remote MCP to <a href="https://claude.ai/"><u>Claude</u></a> users, and showcased how other leading companies such as <a href="https://www.atlassian.com/platform/remote-mcp-server"><u>Atlassian</u></a>, <a href="https://developer.paypal.com/tools/mcp-server/"><u>PayPal</u></a>, <a href="https://docs.sentry.io/product/sentry-mcp/"><u>Sentry</u></a>, and <a href="https://mcp.webflow.com"><u>Webflow</u></a> have built remote MCP servers on Cloudflare to extend their service to their users. We’ve also been using the same infrastructure and tooling to build out our own suite of remote servers, and today we’re excited to show customers what’s ready for use and share what we’ve learned along the way. </p>
    <div>
      <h3>Cloudflare’s MCP servers available today: </h3>
      <a href="#cloudflares-mcp-servers-available-today">
        
      </a>
    </div>
    <p>These <a href="https://www.cloudflare.com/learning/ai/what-is-model-context-protocol-mcp/">MCP servers</a> allow your <a href="https://modelcontextprotocol.io/clients"><u>MCP Client</u></a> to read configurations from your account, process information, make suggestions based on data, and even make those suggested changes for you. All of these actions can happen across Cloudflare's many services including application development, security, and performance.</p>
    <div>
      <h4><b>Cloudflare Documentation Server: </b>Get up-to-date reference information on Cloudflare </h4>
      <a href="#cloudflare-documentation-server-get-up-to-date-reference-information-on-cloudflare">
        
      </a>
    </div>
    <p>Our <a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/docs-vectorize"><u>Cloudflare Documentation server</u></a> enables any MCP Client to access up-to-date <a href="https://developers.cloudflare.com/"><u>documentation</u></a> in real-time, rather than relying on potentially outdated information from the model's training data. If you’re new to building with Cloudflare, this server synthesizes information right from our documentation and exposes it to your MCP Client, so you can get reliable, up-to-date responses to any complex question like “Search Cloudflare for the best way to build an AI Agent”.  </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3vanQPwy6YSwI7bsDTk2md/09cb4763ddbd4858fcd90aca00106bb9/BLOG-2808_2.png" />
          </figure>
    <div>
      <h4><b>Workers Bindings server: </b>Build with developer resources </h4>
      <a href="#workers-bindings-server-build-with-developer-resources">
        
      </a>
    </div>
    <p>Connecting to the <a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/workers-bindings"><u>Bindings MCP server</u></a> lets you leverage application development primitives like D1 databases, <a href="https://www.cloudflare.com/developer-platform/products/r2/">R2 object storage</a> and Key Value stores on the fly as you build out a Workers application. If you're leveraging your MCP Client to generate code, the bindings server provides access to read existing resources from your account or create fresh resources to implement in your application. In combination with our <a href="https://developers.cloudflare.com/workers/get-started/prompting/"><u>base prompt</u></a> designed to help you build robust Workers applications, you can add the Bindings MCP server to give your client all it needs to start generating full stack applications from natural language. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6N0Y8BCBz5ULSHbj0JCIkL/3a6a9ef269202a6c05d18444f313ce87/BLOG-2808_3.png" />
          </figure><p>
Full example output using the Workers Bindings MCP server can be found <a href="https://claude.ai/share/273dadf7-b060-422d-b2b6-4f436d537136"><u>here</u></a>.</p>
    <div>
      <h4><b>Workers Observability server: </b>Debug your application </h4>
      <a href="#workers-observability-server-debug-your-application">
        
      </a>
    </div>
    <p>The <a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/workers-observability"><u>Workers Observability MCP server</u></a> integrates with <a href="https://developers.cloudflare.com/workers/observability/logs/workers-logs/"><u>Workers Logs</u></a> to browse invocation logs and errors, compute statistics across invocations, and find specific invocations matching specific criteria. By querying logs across all of your Workers, this MCP server can help isolate errors and trends quickly. The telemetry data that the MCP server returns can also be used to create new visualizations and improve <a href="https://www.cloudflare.com/learning/performance/what-is-observability/">observability</a>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1rydyUALBbwtPrT477xAKM/81547e1fb3cec5ffadd90ee5e68e1a5e/BLOG-2808_4.png" />
          </figure>
    <div>
      <h4><b>Container server:</b> Spin up a development environment</h4>
      <a href="#container-server-spin-up-a-development-environment">
        
      </a>
    </div>
    <p>The <a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/sandbox-container"><u>Container MCP server</u></a> provides any MCP client with access to a secure, isolated execution environment running on Cloudflare’s network where it can run and test code if your MCP client does not have a built in development environment (e.g. claude.ai). When building and generating application code, this lets the AI run its own commands and validate its assumptions in real time. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1rXgpQ3znIE01ccY1Qd2cQ/058902719a90af14175b8e838b09b78e/BLOG-2808_5.png" />
          </figure>
    <div>
      <h4><b>Browser Rendering server: </b>Fetch and convert web pages, take screenshots </h4>
      <a href="#browser-rendering-server-fetch-and-convert-web-pages-take-screenshots">
        
      </a>
    </div>
    <p>The <a href="https://developers.cloudflare.com/browser-rendering/"><u>Browser Rendering</u></a> MCP server provides AI friendly tools from our <a href="https://developers.cloudflare.com/browser-rendering/rest-api/"><u>RESTful interface</u></a> for common browser actions such as capturing screenshots, extracting HTML content, and <a href="https://blog.cloudflare.com/markdown-for-agents/">converting pages to Markdown</a>. These are particularly useful when building agents that require interacting with a web browser.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3aQtQxzj1hP6cbtbY4CHXI/27535e9f9a041187c12f6b41ba36afdb/BLOG-2808_6.png" />
          </figure>
    <div>
      <h4><b>Radar server: </b>Ask questions about how we see the Internet and Scan URLs</h4>
      <a href="#radar-server-ask-questions-about-how-we-see-the-internet-and-scan-urls">
        
      </a>
    </div>
    <p>The <a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/radar"><u>Cloudflare Radar MCP server</u></a> exposes tools that allow any MCP client to explore our aggregated <a href="https://radar.cloudflare.com/traffic#http-traffic"><u>HTTP traffic data</u></a>, get information on <a href="https://radar.cloudflare.com/traffic/as701"><u>Autonomous Systems</u></a> (AS) and <a href="https://radar.cloudflare.com/ip/72.74.50.251"><u>IP addresses</u></a>, list traffic anomalies from our <a href="https://radar.cloudflare.com/outage-center"><u>Outage Center</u></a>, get <a href="https://radar.cloudflare.com/domains"><u>trending domains</u></a>, and domain rank information. It can even create charts. Here’s a chat where we ask "show me the <a href="https://claude.ai/public/artifacts/34c8a494-abdc-4755-9ca7-cd8e0a8bea41"><u>HTTP traffic from Portugal</u></a> for the last week":</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/9yg9Fnkoz6t6QOwUK1a5r/b11756fd82058f04037740678160cc7c/BLOG-2808_7.png" />
          </figure>
    <div>
      <h4><b>Logpush server: </b>Get quick summaries for Logpush job health </h4>
      <a href="#logpush-server-get-quick-summaries-for-logpush-job-health">
        
      </a>
    </div>
    <p><a href="https://developers.cloudflare.com/logs/about/"><u>Logpush</u></a> jobs deliver comprehensive logs to your destination of choice, allowing near real-time information processing. The Logpush MCP server can help you analyze your Logpush job results and understand your job health at a high level, allowing you to filter and narrow down for jobs or scenarios you care about. For example, you can ask “provide me with a list of recently failed jobs.” Now, you can quickly find out which jobs are failing with which error message and when, summarized in a human-readable format. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4ltuXD2TgEhiblx6aNhm4d/d63b14f151fd3a239b0a3cf0dfb92ebf/BLOG-2808_8.png" />
          </figure>
    <div>
      <h4><b>AI Gateway server: </b>Check out your AI Gateway logs </h4>
      <a href="#ai-gateway-server-check-out-your-ai-gateway-logs">
        
      </a>
    </div>
    <p>Use this <a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/ai-gateway"><u>MCP server</u></a> to inspect your <a href="https://www.cloudflare.com/developer-platform/products/ai-gateway/">AI Gateway</a> logs and get details about the data from your prompts and the AI models responses. In this example we ask our agent “What is my average latency for my AI Gateway logs in the <i>Cloudflare Radar</i> account?”</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7dYzkZ0cYcXPjFKlhdqkMp/52f2b7e62fe2bb05c91fc563738ddfc2/BLOG-2808_9.png" />
          </figure>
    <div>
      <h4><b>AutoRAG server:</b> List and search documents on your AutoRAGs</h4>
      <a href="#autorag-server-list-and-search-documents-on-your-autorags">
        
      </a>
    </div>
    <p>Having AutoRAG RAGs available to query as MCP tools greatly expands the typical static one-shot retrieval​ and opens doors to use cases where the agent can dynamically decide if and when to retrieve information from one or more <a href="https://www.cloudflare.com/learning/ai/retrieval-augmented-generation-rag/">RAGs</a>, combine them with other tools and APIs, cross-check information and generate a much more rich and complete final answer.</p><p>Here we have a RAG that has a few blog posts that talk about retrocomputers. If we ask "tell me about restoring an amiga 1000 using the blog-celso autorag" the agent will go into a sequence of <a href="https://claude.ai/share/18f1be31-9936-48c0-9de0-151d64f3534e"><u>reasoning steps</u></a>:</p><ul><li><p>“Now that I have some information about Amiga 1000 restoration from blog-celso, let me search for more specific details.”</p></li><li><p>“Let me get more specific information about hardware upgrades and fixes for the Amiga 1000.”</p></li><li><p>“Let me get more information about the DiagROM and other tools used in the restoration.”</p></li><li><p>“Let me search for information about GBA1000 and other expansions mentioned in the blog.”</p></li><li><p>And finally, “Based on the comprehensive information I've gathered from the blog-celso AutoRAG, I can now provide you with a detailed guide on restoring an Amiga 1000.”</p></li></ul><p>And at the end, it generates a very detailed answer based on all the data from all the queries:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4Z8BJSvd4x233FPZDePeSk/e59b8676a92f828d32feb1d28381a216/BLOG-2808_10.png" />
          </figure>
    <div>
      <h4><b>Audit Logs server: </b>Query audit logs and generate reports for review</h4>
      <a href="#audit-logs-server-query-audit-logs-and-generate-reports-for-review">
        
      </a>
    </div>
    <p>Audit Logs record detailed information about actions and events within a system, providing a transparent history of all activity. However, because these logs can be large and complex, it may take effort to query and reconstruct a clear sequence of events. The <a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/auditlogs"><u>Audit Logs MCP server</u></a> helps by allowing you to query audit logs and generate reports. Common queries include if anything notable happened in a Cloudflare account under a user around a particular time of the day, or identifying whether any users used API keys to perform actions on the account. For example, you can ask “Were there any suspicious changes made to my Cloudflare account yesterday around lunchtime?” and obtain the following response: </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/YdV73LhsCmjdQtOK8U7Ii/89f11db15e079190a234665ac4794754/BLOG-2808_11.png" />
          </figure>
    <div>
      <h4><b>DNS Analytics server: </b>Optimize DNS performance and debug issues based on current set up</h4>
      <a href="#dns-analytics-server-optimize-dns-performance-and-debug-issues-based-on-current-set-up">
        
      </a>
    </div>
    <p><a href="https://www.cloudflare.com/application-services/products/analytics/"><u>Cloudflare’s DNS Analytics</u></a> provides detailed insights into DNS traffic, which helps you monitor, analyze, and troubleshoot DNS performance and security across your domains. With Cloudflare’s <a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/dns-analytics"><u>DNS Analytics MCP server</u></a>, you can review DNS configurations across all domains in your account, access comprehensive DNS performance reports, and receive recommendations for performance improvements. By leveraging documentation, the MCP server can help identify opportunities for improving performance. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3X7w64xQvvFbv24HaFeLDv/3fefb7ff9e912207c5897200beefd26f/image4.png" />
          </figure>
    <div>
      <h4><b>Digital Experience Monitoring server</b>: Get quick insight on critical applications for your organization </h4>
      <a href="#digital-experience-monitoring-server-get-quick-insight-on-critical-applications-for-your-organization">
        
      </a>
    </div>
    <p>Cloudflare <a href="https://www.cloudflare.com/learning/performance/what-is-digital-experience-monitoring/">Digital Experience Monitoring (DEM)</a> was built to help network professionals understand the performance and availability of their critical applications from self-hosted applications like Jira and Bitbucket to SaaS applications like Figma or Salesforce. The <a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/dex-analysis"><u>Digital Experience Monitoring MCP server</u></a> fetches DEM test results to surface performance and availability trends within your Cloudflare One deployment, providing quick insights on users, applications, and the networks they are connected to. You can ask questions like: Which users had the worst experience? What times of the day were applications most and least performant? When do I see the most HTTP status errors? When do I see the shortest, longest, or most instability in the network path? </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7Ctxdt7tw04Rfzl9Ihxnkw/fc9c9ab553daa58f59e024dd66dd3dea/BLOG-2808_12.png" />
          </figure>
    <div>
      <h4><b>CASB server</b>: Insights from SaaS Integrations</h4>
      <a href="#casb-server-insights-from-saas-integrations">
        
      </a>
    </div>
    <p><a href="https://www.cloudflare.com/zero-trust/products/casb/"><u>Cloudflare CASB</u></a> provides the ability to integrate with your organization’s <a href="https://developers.cloudflare.com/cloudflare-one/applications/casb/casb-integrations/"><u>SaaS and cloud applications</u></a> to discover assets and surface any security misconfigurations that may be present. A core task is helping security teams understand information about users, files, and other assets they care about that transcends any one SaaS application. The <a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/cloudflare-one-casb"><u>CASB MCP server</u></a> can explore across users, files, and the many other asset categories to help understand relationships from data that can exist across many different integrations. A common query may include “Tell me about “Frank Meszaros” and what SaaS tools they appear to have accessed”.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3aJOta5YYZ1FqZyHF0wVnx/2c79512fb674eb2762395e5ccaac9700/BLOG-2808_13.png" />
          </figure>
    <div>
      <h3>Get started with our MCP servers </h3>
      <a href="#get-started-with-our-mcp-servers">
        
      </a>
    </div>
    <p>You can start using our Cloudflare MCP servers today! If you’d like to read more about specific tools available in each server, you can find them in our <a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main"><u>public GitHub repository</u></a>. Each server is deployed to a server URL, such as</p><p><code>https://observability.mcp.cloudflare.com/sse.</code></p><p>If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL directly within its interface. For example, if you are using <a href="https://claude.ai/settings/profile"><u>claude.ai</u></a>, you can: </p><ol><li><p>Navigate to your <a href="https://claude.ai/settings/profile"><u>settings</u></a> and add a new “Integration” by entering the URL of your MCP server</p></li><li><p>Authenticate with Cloudflare</p></li><li><p>Select the tools you’d like claude.ai to be able to call</p></li></ol>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5zWyWq2gS08CZsCQNB2fFZ/4e2c88abc90e11055159127e2abaf7b2/BLOG-2808_14.png" />
          </figure><p>If your client does not yet support remote MCP servers, you will need to set up its respective configuration file (mcp_config.json) using <a href="https://www.npmjs.com/package/mcp-remote"><u>mcp-remote</u></a> to specify which servers your client can access.</p>
            <pre><code>{
	"mcpServers": {
		"cloudflare-observability": {
			"command": "npx",
			"args": ["mcp-remote", "https://observability.mcp.cloudflare.com/sse"]
		},
		"cloudflare-bindings": {
			"command": "npx",
			"args": ["mcp-remote", "https://bindings.mcp.cloudflare.com/sse"]
		}
	}
}
</code></pre>
            
    <div>
      <h3>Have feedback on our servers?</h3>
      <a href="#have-feedback-on-our-servers">
        
      </a>
    </div>
    <p>While we're launching with these initial 13 MCP servers, we are just getting started! We want to hear your feedback as we shape existing and build out more Cloudflare MCP servers that unlock the most value for your teams leveraging AI in their daily workflows. If you’d like to provide feedback, request a new MCP server, or report bugs, please raise an issue on our <a href="https://github.com/cloudflare/mcp-server-cloudflare/tree/main"><u>GitHub repository. </u></a> </p>
    <div>
      <h3>Building your own MCP server?</h3>
      <a href="#building-your-own-mcp-server">
        
      </a>
    </div>
    <p>If you’re interested in building your own servers, we've discovered valuable best practices that we're excited to share with you as we’ve been building ours. While MCP is really starting to gain momentum and many organizations are just beginning to build their own servers, these principals should help guide you as you start building out MCP servers for your customers. </p><ol><li><p><b>An MCP server is not our entire API schema: </b>Our goal isn't to build a large wrapper around all of Cloudflare’s API schema, but instead focus on optimizing for specific jobs to be done and reliability of the outcome. This means while one tool from our MCP server may map to one API, another tool may map to many. We’ve found that fewer but more powerful tools may be better for the agent with smaller context windows, less costs, a faster output, and likely more valid answers from LLMs. Our MCP servers were created directly by the product teams who are responsible for each of these areas of Cloudflare – application development, security and performance – and are designed with user stories in mind. This is a pattern you will continue to see us use as we build out more Cloudflare servers. </p></li><li><p><b>Specialize permissions with multiple servers:</b> We built out several specialized servers rather than one for a critical reason: security through precise permission scoping. Each MCP server operates with exactly the permissions needed for its specific task – nothing more. By separating capabilities across multiple servers, each with its own authentication scope, we prevent the common security pitfall of over-privileged access. </p></li><li><p><b>Add robust server descriptions within parameters:</b> Tool descriptions were core to providing helpful context to the agent. We’ve found that more detailed descriptions help the agent understand not just the expected data type, but also the parameter's purpose, acceptable value ranges, and impact on server behavior. This context allows agents to make intelligent decisions about parameter values rather than providing arbitrary and potentially problematic inputs, allowing your natural language to go further with the agent. </p></li><li><p><b>Using evals at each iteration:</b> For each server, we implemented evaluation tests or “evals” to assess the model's ability to follow instructions, select appropriate tools, and provide correct arguments to those tools. This gave us a programmatic way to understand if any regressions occurred through each iteration, especially when tweaking tool descriptions. </p></li></ol><p>Ready to start building? Click the button below to deploy your first remote MCP server to production: </p><a href="https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/ai/tree/main/demos/remote-mcp-authless"><img src="https://deploy.workers.cloudflare.com/button" /></a>
<p></p><p>Or check out our documentation to learn more! If you have any questions or feedback for us, you can reach us via email at <a><u>1800-mcp@cloudflare.com</u></a> or join the chatter in the <a href="https://discord.com/channels/595317990191398933/1354548448635912324"><u>Cloudflare Developers Discord</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[Model Context Protocol]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Agents]]></category>
            <category><![CDATA[Open Source]]></category>
            <category><![CDATA[MCP]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">17j3OSuM89oMb5wurF4Tij</guid>
            <dc:creator>Nevi Shah</dc:creator>
            <dc:creator>Maximo Guk </dc:creator>
            <dc:creator>Christian Sparks</dc:creator>
        </item>
        <item>
            <title><![CDATA[Skip the setup: deploy a Workers application in seconds]]></title>
            <link>https://blog.cloudflare.com/deploy-workers-applications-in-seconds/</link>
            <pubDate>Tue, 08 Apr 2025 13:00:00 GMT</pubDate>
            <description><![CDATA[ You can now add a Deploy to Cloudflare button to your repository’s README when building a Workers application, making it simple for other developers to set up and deploy your project!  ]]></description>
            <content:encoded><![CDATA[ <p>You can now add a <a href="http://developers.cloudflare.com/workers/platform/deploy-buttons/"><u>Deploy to Cloudflare button</u></a> to the README of your Git repository containing a Workers application — making it simple for other developers to quickly set up and deploy your project! </p><a href="https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/templates/tree/main/saas-admin-template"><img src="https://deploy.workers.cloudflare.com/button" /></a>
<p></p><p>The Deploy to Cloudflare button: </p><ol><li><p><b>Creates a new Git repository on your GitHub/ GitLab account: </b>Cloudflare will automatically clone and create a new repository on your account, so you can continue developing. </p></li><li><p><b>Automatically provisions resources the app needs:</b> If your repository requires Cloudflare primitives like a <a href="https://developers.cloudflare.com/kv/"><u>Workers KV namespace</u></a>, a <a href="https://www.cloudflare.com/developer-platform/products/d1/"><u>D1 database</u></a>, or an <a href="https://developers.cloudflare.com/r2/buckets/"><u>R2 bucket</u></a>, Cloudflare will automatically provision them on your account and bind them to your Worker upon deployment. </p></li><li><p><b>Configures Workers Builds (CI/CD): </b>Every new push to your production branch on your newly created repository will <a href="https://www.cloudflare.com/learning/serverless/glossary/what-is-ci-cd/">automatically build and deploy</a> courtesy of <a href="https://developers.cloudflare.com/workers/ci-cd/builds/"><u>Workers Builds</u></a>. </p></li><li><p><b>Adds preview URLs to each pull request: </b>If you’d like to test your changes before deploying, you can push changes to a <a href="https://developers.cloudflare.com/workers/ci-cd/builds/build-branches/#configure-non-production-branch-builds"><u>non-production branch</u></a> and <a href="https://developers.cloudflare.com/workers/configuration/previews/"><u>preview URLs</u></a> will be generated and <a href="https://developers.cloudflare.com/workers/ci-cd/builds/git-integration/github-integration/#pull-request-comment"><u>posted back to GitHub as a comment</u></a>.   </p></li></ol>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1mViUpslwRWYrQqkr1I0dU/a890e9ae5d4d36278c4b6ff3a002c3b5/Introducing_Deploy_to_Cloudflare_Buttons_2.png" />
          </figure><p>There is nothing more frustrating than struggling to kick the tires on a new project because you don’t know where to start. Over the past couple of months, we’ve launched some improvements to getting started on Workers, including a gallery of <a href="https://dash.cloudflare.com/?to=/:account/workers-and-pages/templates"><u>Git-connected templates</u></a> that help you kickstart your development journey. </p><p>But we think there’s another part of the story. Everyday, we see new Workers applications being built and open-sourced by developers in the community, ranging from starter projects to mission critical applications. These projects are designed to be shared, deployed, customized, and contributed to. But first and foremost, they must be simple to deploy.</p>
    <div>
      <h2>Ditch the setup instructions</h2>
      <a href="#ditch-the-setup-instructions">
        
      </a>
    </div>
    <p>If you’ve open-sourced a new Workers application before, you may have listed in your README the following in order to get others going with your repository:</p><ol><li><p>“Clone this repo” </p></li><li><p>“Install these packages”</p></li><li><p>“Install Wrangler” </p></li><li><p>“Create this database”</p></li><li><p>“Paste the database ID back into your config file” </p></li><li><p>“Run this command to deploy” </p></li><li><p>“Push to a new Git repo” </p></li><li><p>“Set up CI” </p></li></ol><p>And the list goes on the more complicated your application gets, deterring other developers and making your project feel intimidating to deploy. Now, your project can be up and running in one shot — which means more traction, more feedback, and more contributions.</p>
    <div>
      <h2>Self-hosting made easy </h2>
      <a href="#self-hosting-made-easy">
        
      </a>
    </div>
    <p>We’re not just talking about building and sharing small starter apps but also complex pieces of software. If you’ve ever <a href="https://www.cloudflare.com/developer-platform/solutions/hosting/">self-hosted your own instance of an application</a> on a traditional cloud provider before, you’re likely familiar with the pain of tedious setup, operational overhead, or hidden costs of your infrastructure. </p><table><tr><td><p><b>Self-hosting with traditional cloud provider</b></p></td><td><p><b>Self-hosting with Cloudflare </b></p></td></tr><tr><td><p>Setup a VPC</p><p>Install tools and dependencies  </p><p>Set up and provision storage </p><p>Manually configure CI/CD pipeline to automate deployments </p><p>Scramble to manually secure your environment if a runtime vulnerability is discovered</p><p>Configure autoscaling policies and manage idle servers</p></td><td><p>✅Serverless</p><p>✅Highly-available global network</p><p>✅Automatic provisioning of datastores like D1 databases and R2 buckets</p><p>✅Built-in CI/CD workflow configured out of the box</p><p>✅Automatic runtime updates to keep your environment secure</p><p>✅Scale automatically and only pay for what you use.</p></td></tr></table><p>By making your open-source repository accessible with a Deploy to Cloudflare button, you can allow other developers to deploy their own instance of your app without requiring deep infrastructure expertise. </p>
    <div>
      <h2>From starter projects to full-stack applications</h2>
      <a href="#from-starter-projects-to-full-stack-applications">
        
      </a>
    </div>
    <p>We’re inviting all Workers developers looking to open-source their project to add Deploy to Cloudflare buttons to their projects and help others get up and running faster. We’ve already started working with open-source app developers! Here are a few great examples to explore: </p>
    <div>
      <h3>Test and explore your APIs with Fiberplane </h3>
      <a href="#test-and-explore-your-apis-with-fiberplane">
        
      </a>
    </div>
    <p><a href="https://fiberplane.com/"><u>Fiberplane</u></a> helps developers build, test and explore <a href="https://hono.dev/"><u>Hono</u></a> APIs and AI Agents in an embeddable playground. This Developer Week, Fiberplane released a set of sample Worker applications built on the ‘<a href="http://honc.dev/"><u>HONC</u></a>' stack — Hono, <a href="https://orm.drizzle.team/"><u>Drizzle</u></a> ORM, <a href="https://developers.cloudflare.com/d1/"><u>D1 Database</u></a>, and <a href="https://developers.cloudflare.com/workers/"><u>Cloudflare Workers</u></a> — that you can use as the foundation for your own projects. With an easy one-click Deploy to Cloudflare, each application comes preconfigured with the <a href="https://github.com/fiberplane/fiberplane"><u>open source</u></a> Fiberplane API Playground, making it easy to generate OpenAPI docs, test your handlers, and explore your API, all within one embedded interface.</p><a href="https://deploy.workers.cloudflare.com/?url=https://github.com/fiberplane/create-honc-app/tree/main/examples/uptime-monitor"><img src="https://deploy.workers.cloudflare.com/button" /></a>
<p></p>
    <div>
      <h3>Deploy your first remote MCP server </h3>
      <a href="#deploy-your-first-remote-mcp-server">
        
      </a>
    </div>
    <p>You can now <a href="https://blog.cloudflare.com/remote-model-context-protocol-servers-mcp/"><u>build and deploy remote Model Context Protocol (MCP) servers</u></a> on Cloudflare Workers! <a href="https://www.cloudflare.com/learning/ai/what-is-model-context-protocol-mcp/">MCP servers</a> provide a standardized way for AI agents to interact with services directly, enabling them to complete actions on users' behalf. Cloudflare's remote MCP server implementation supports authentication, allowing users to login to their service from the agent to give it scoped permissions. This gives users the ability to interact with services without navigating dashboards or learning APIs — they simply tell their AI agent what they want to accomplish.</p><a href="https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/ai/tree/main/demos/remote-mcp-server"><img src="https://deploy.workers.cloudflare.com/button" /></a>
<p></p>
    <div>
      <h3>Start building your first agent </h3>
      <a href="#start-building-your-first-agent">
        
      </a>
    </div>
    <p><a href="https://www.cloudflare.com/learning/ai/what-is-agentic-ai/">AI agents are intelligent systems</a> capable of autonomously executing tasks by making real-time decisions about which tools to use and how to structure their workflows. Unlike traditional automation (which follows rigid, predefined steps), agents dynamically adapt their strategies based on context and evolving inputs. This template serves as a starting point for building AI-driven chat agents on Cloudflare's Agent platform. Powered by Cloudflare’s <a href="https://www.npmjs.com/package/agents"><u>Agents SDK</u></a>, it provides a solid foundation for creating interactive AI chat experiences with a modern UI and tool integrations capabilities.</p><a href="https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/agents-starter"><img src="https://deploy.workers.cloudflare.com/button" /></a>
<p></p>
    <div>
      <h2>Try it now</h2>
      <a href="#try-it-now">
        
      </a>
    </div>
    <p>You can start using <a href="http://developers.cloudflare.com/workers/platform/deploy-buttons/"><u>Deploy to Cloudflare buttons</u></a> today!</p>
    <div>
      <h3>Add a Deploy to Cloudflare button to your README</h3>
      <a href="#add-a-deploy-to-cloudflare-button-to-your-readme">
        
      </a>
    </div>
    <p>Be sure to make your Git repository public and add the following snippet including your Git repository URL.</p>
            <pre><code>[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=&lt;YOUR_GIT_REPO_URL&gt;)</code></pre>
            <p>When another developer clicks your Deploy to Cloudflare button, Cloudflare will parse the Wrangler configuration file, provision any resources detected, and create a new repo on their account that’s updated with information about newly created resources. For example:</p>
            <pre><code>{
  "compatibility_date": "2024-04-03",

  "d1_databases": [
    {
      "binding": "MY_D1_DATABASE",

	//will be updated with newly created database ID
      "database_id": "1234567890abcdef1234567890abcdef"
    }
  ]
}</code></pre>
            <p>Check out our <a href="http://developers.cloudflare.com/workers/platform/deploy-buttons/"><u>documentation</u></a> for more information on how to set up a deploy button for your application and best practices to ensure a successful deployment for other developers. </p>
    <div>
      <h3>Start building </h3>
      <a href="#start-building">
        
      </a>
    </div>
    <p>For new Cloudflare developers, keep an eye out for “Deploy to Cloudflare” buttons across the web, or simply paste the URL of any public GitHub or GitLab repository containing a Workers application into the <a href="https://dash.cloudflare.com/?to=/:account/workers-and-pages/create/deploy-to-workers"><u>Cloudflare dashboard</u></a> to get started.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/64oCplgDSH0jgE9Nsqt4VL/57083c66d1c6240c03973a43642da9e9/Screenshot_2025-04-07_at_17.29.16.png" />
          </figure><p>During Developer Week, <a href="https://blog.cloudflare.com/"><u>tune in to our blog</u></a> as we unveil new features and announcements — many including Deploy to Cloudflare buttons — so you can jump right in and start building!</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Open Source]]></category>
            <guid isPermaLink="false">18znr6c8JHaWhYT3czW9hw</guid>
            <dc:creator>Nevi Shah</dc:creator>
        </item>
        <item>
            <title><![CDATA[Builder Day 2024: 18 big updates to the Workers platform]]></title>
            <link>https://blog.cloudflare.com/builder-day-2024-announcements/</link>
            <pubDate>Thu, 26 Sep 2024 21:00:00 GMT</pubDate>
            <description><![CDATA[ To celebrate Builder Day 2024, we’re shipping 18 updates inspired by direct feedback from developers building on Cloudflare. This includes new capabilities, like running evals with AI Gateway, beta  ]]></description>
            <content:encoded><![CDATA[ <p>To celebrate <a href="https://builderday.pages.dev/"><u>Builder Day 2024</u></a>, we’re shipping 18 updates inspired by direct feedback from developers building on Cloudflare. Choosing a platform isn't just about current technologies and services — it's about betting on a partner that will evolve with your needs as your project grows and the tech landscape shifts. We’re in it for the long haul with you.</p>
    <div>
      <h3>Watch on Cloudflare TV</h3>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <div>
  
</div><p><b>Starting today, you can:</b></p><ul><li><p><a href="#logs-for-every-worker">Persist logs from your Worker and query them directly on the Cloudflare dashboard</a></p></li><li><p><a href="#connect-to-private-databases-from-workers">Connect your Worker to private databases (isolated in VPCs) using Hyperdrive</a></p></li><li><p><a href="#improved-node.js-compatibility-is-now-ga">Use a wider set of NPM packages on Cloudflare Workers, via improved Node.js compatibility</a></p></li><li><p><a href="#cloudflare-joins-opennext">Deploy Next.js apps that use the Node.js runtime to Cloudflare, via OpenNext</a></p></li><li><p><a href="https://blog.cloudflare.com/workers-ai-bigger-better-faster/">Run Evals with AI Gateway, now in Open Beta</a></p></li><li><p><a href="https://blog.cloudflare.com/sqlite-in-durable-objects">Read from and write to SQLite with zero-latency from every Durable Object</a></p></li></ul><p><b>We’ve brought key features from </b><a href="https://blog.cloudflare.com/pages-and-workers-are-converging-into-one-experience/"><b><u>Pages to Workers</u></b></a><b>, allowing you to: </b></p><ul><li><p><a href="#static-asset-hosting">Upload and serve static assets as part of your Worker, and use popular frameworks with Workers</a></p></li><li><p><a href="#continuous-integration-and-delivery">Automatically build and deploy each pull request to your Worker’s git repository</a></p></li><li><p><a href="#workers-preview-urls">Get back a preview deployment URL for each version of your Worker</a></p></li></ul><p><b>Four things are going GA and are officially production-ready:</b></p><ul><li><p><a href="#gradual-deployments">Gradual Deployments</a>: Deploy changes to your Worker gradually, on a percentage basis of traffic</p></li><li><p><a href="#queues-is-ga">Cloudflare Queues</a><b>:</b> Now with much higher throughput and concurrency limits</p></li><li><p><a href="#event-notifications-for-r2-is-now-ga">R2 Event Notifications</a><b>:</b> Tightly integrated with Queues for event-driven applications</p></li><li><p><a href="https://blog.cloudflare.com/workers-ai-bigger-better-faster/">Vectorize</a>: Globally distributed vector database, now faster, with larger indexes, and new pricing</p></li></ul><p><b>The Workers platform is getting faster:</b></p><ul><li><p><a href="https://blog.cloudflare.com/faster-workers-kv">We made Workers KV up to 3x faster.</a> Which makes serving static assets from Workers and Pages faster!</p></li><li><p><a href="https://blog.cloudflare.com/making-workers-ai-faster/ ">Workers AI now has much faster Time-to-First-Token (TTFT)</a>, backed by more powerful GPUs</p></li></ul><p><b>And we’re lowering the cost of building on Cloudflare:</b></p><ul><li><p><a href="#removing-serverless-microservices-tax">Requests made through Service Bindings and to Tail Workers are now free</a></p></li><li><p><a href="#image-optimization-free-for-everyone">Cloudflare Images is introducing a free tier for everyone with a Cloudflare account</a></p></li><li><p>We’ve <a href="https://blog.cloudflare.com/workers-ai-bigger-better-faster">simplified Workers AI pricing</a> to use industry standard units of measure</p></li></ul><p>Everything in this post is available for you to use today. Keep reading to learn more, and watch the <a href="https://cloudflare.tv/event/builder-day-live-stream/xvm4qdgm"><u>Builder Day Live Stream</u></a> for demos and more.</p><h2>Persistent Logs for every Worker</h2><p>Starting today in open beta, you can automatically retain logs from your Worker, with full search, query, and filtering capabilities available directly within the Cloudflare dashboard. All newly created Workers will have this setting automatically enabled. This marks the first step in the development of our observability platform, following <a href="https://blog.cloudflare.com/cloudflare-acquires-baselime-expands-observability-capabilities/"><u>Cloudflare’s acquisition of Baselime</u></a>.</p><p>Getting started is easy – just add two lines to your Worker’s wrangler.toml and redeploy:</p>
            <pre><code>[observability]
enabled = true
</code></pre>
            <p>Workers Logs allow you to view all logs emitted from your Worker. When enabled, each <code>console.log</code> message, error, and exception is published as a separate event. Every Worker invocation (i.e. requests, alarms, rpc, etc.) also publishes an enriched execution log that contains invocation metadata. You can view logs in the <code>Logs</code> tab of your Worker in the dashboard, where you can filter on any event field, such as time, error code, message, or your own custom field.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3rPKtYlXEgN1u8utUuXxJR/c2fc4dcff2a7574d8ad9f92edbe867fe/image2.png" />
          </figure><p>If you’ve ever had to piece together the puzzle of unusual metrics, such as a spike in errors or latency, you know how frustrating it is to connect metrics to traces and logs that often live in independent data silos. Workers Logs is the first piece of a new observability platform we are building that helps you easily correlate telemetry data, and surfaces insights to help you <i>understand</i>. We’ll structure your telemetry data so you have the full context to ask the right questions, and can quickly and easily analyze the behavior of your applications. This is just the beginning for observability tools for Workers. We are already working on automatically emitting distributed traces from Workers, with real time errors and wide, high dimensionality events coming soon as well. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/XiRuQjqzVEld2eCIVVHPh/7c8938479e1f254699487dfe23caade4/Screenshot_2024-09-25_at_3.06.00_PM.png" />
          </figure><p>Starting November 1, 2024, Workers Logs will cost $0.60 per million log lines written after the included volume, as shown in the table below. Querying your logs is free. This makes it easy to estimate and forecast your costs — we think you shouldn’t have to calculate the number of ‘Gigabytes Ingested’ to understand what you’ll pay.</p>
<div><table><thead>
  <tr>
    <th></th>
    <th><span>Workers Free</span></th>
    <th><span>Workers Paid</span></th>
  </tr></thead>
<tbody>
  <tr>
    <td><span>Included Volume</span></td>
    <td><span>200,000 logs per day</span></td>
    <td><span>20,000,000 logs per month</span></td>
  </tr>
  <tr>
    <td><span>Additional Events</span></td>
    <td><span>N/A</span></td>
    <td><span>$0.60 per million logs</span></td>
  </tr>
  <tr>
    <td><span>Retention</span></td>
    <td><span>3 days</span></td>
    <td><span>7 days</span></td>
  </tr>
</tbody></table></div><p>Try out Workers Logs today. You can learn more from our <a href="https://developers.cloudflare.com/workers/observability/logs/workers-logs/"><u>developer documentation</u></a>, and give us feedback directly in the #workers-observability channel on <a href="https://discord.cloudflare.com/"><u>Discord</u></a>.</p><h2>Connect to private databases from Workers</h2><p>Starting today, you can now use <a href="https://developers.cloudflare.com/hyperdrive/"><u>Hyperdrive</u></a>, <a href="https://www.cloudflare.com/en-ca/products/tunnel/"><u>Cloudflare Tunnels</u></a> and <a href="https://www.cloudflare.com/zero-trust/products/access/"><u>Access</u></a> together to securely connect to databases that are isolated in a private network. </p><p><a href="https://developers.cloudflare.com/hyperdrive/"><u>Hyperdrive</u></a> enables you to build on Workers with your existing regional databases. It accelerates database queries using Cloudflare’s network, caching data close to end users and pooling connections close to the database. But there’s been a major blocker preventing you from building with Hyperdrive: network isolation.</p><p>The majority of databases today aren’t publicly accessible on the Internet. Data is highly sensitive and placing databases within private networks like a <a href="https://www.cloudflare.com/learning/cloud/what-is-a-virtual-private-cloud/"><u>virtual private cloud (VPC)</u></a> keeps data secure. But to date, that has also meant that your data is held captive within your cloud provider, preventing you from building on Workers. </p><p>Today, we’re enabling Hyperdrive to <a href="https://developers.cloudflare.com/hyperdrive/configuration/connect-to-private-database/"><u>securely connect to private databases</u></a> using <a href="https://www.cloudflare.com/en-ca/products/tunnel/"><u>Cloudflare Tunnels</u></a> and <a href="https://www.cloudflare.com/zero-trust/products/access/"><u>Cloudflare Access</u></a>. With a Cloudflare Tunnel running in your private network, Hyperdrive can securely connect to your database and start speeding up your queries.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3ozsfXdsWFJlfRhhulMClT/61ec772a843880370e81eeec190000fa/BLOG-2517_4.png" />
          </figure><p>With this update, Hyperdrive makes it possible for you to build full-stack applications on Workers with your existing databases, network-isolated or not. Whether you’re using <a href="https://developers.cloudflare.com/hyperdrive/examples/aws-rds-aurora/"><u>Amazon RDS</u></a>, <a href="https://developers.cloudflare.com/hyperdrive/examples/aws-rds-aurora/"><u>Amazon Aurora</u></a>, <a href="https://developers.cloudflare.com/hyperdrive/examples/google-cloud-sql/"><u>Google Cloud SQL</u></a>, <a href="https://azure.microsoft.com/en-gb/products/category/databases"><u>Azure Database</u></a>, or any other provider, Hyperdrive can connect to your databases and optimize your database connections to provide the fast performance you’ve come to expect with building on Workers.</p><h2>Improved Node.js compatibility is now GA</h2><p>Earlier this month, we <a href="https://blog.cloudflare.com/more-npm-packages-on-cloudflare-workers-combining-polyfills-and-native-code/"><u>overhauled our support for Node.js APIs in the Workers runtime</u></a>. With <a href="https://workers-nodejs-compat-matrix.pages.dev/"><u>twice as many Node APIs</u></a> now supported on Workers, you can now use a wider set of NPM packages to build a broader range of applications. Today, we’re happy to announce that improved Node.js compatibility is GA.</p><p>To give it a try, enable the nodejs_compat compatibility flag, and set your compatibility date to on or after 2024-09-23:</p>
            <pre><code>compatibility_flags = ["nodejs_compat"]
compatibility_date = "2024-09-23"
</code></pre>
            <p>Read the <a href="https://developers.cloudflare.com/workers/runtime-apis/nodejs/"><u>developer documentation</u></a> to learn more about how to opt-in your Workers to try it today. If you encounter any bugs or want to report feedback, <a href="https://github.com/cloudflare/workers-sdk/issues/new?assignees=&amp;labels=bug&amp;projects=&amp;template=bug-template.yaml&amp;title=%F0%9F%90%9B+BUG%3A"><u>open an issue</u></a>.</p><h2>Build frontend applications on Workers with Static Asset Hosting</h2><p>Starting today in open beta, you now can upload and serve HTML, CSS, and client-side JavaScript directly as part of your Worker. This means you can build dynamic, server-side rendered applications on Workers using popular frameworks such as Astro, Remix, Next.js and Svelte (full list <a href="https://developers.cloudflare.com/workers/frameworks"><u>here</u></a>), with more coming soon.</p><p>You can now deploy applications to Workers that previously could only be deployed to Cloudflare Pages and use features that are not yet supported in Pages, including <a href="https://developers.cloudflare.com/workers/observability/logging/logpush/"><u>Logpush</u></a>, <a href="https://developers.cloudflare.com/hyperdrive/#_top"><u>Hyperdrive</u></a>, <a href="https://developers.cloudflare.com/workers/configuration/cron-triggers/"><u>Cron Triggers</u></a>, <a href="https://developers.cloudflare.com/queues/configuration/configure-queues/#consumer"><u>Queue Consumers</u></a>, and <a href="https://developers.cloudflare.com/workers/configuration/versions-and-deployments/"><u>Gradual Deployments</u></a>. </p><p>To get started, create a new project with <a href="https://developers.cloudflare.com/workers/frameworks"><u>create-cloudflare</u></a>. For example, to create a new Astro project:  </p>
            <pre><code>npm create cloudflare@latest -- my-astro-app --framework=astro --experimental
</code></pre>
            <p>Visit our <a href="https://developers.cloudflare.com/workers/static-assets/"><u>developer documentation</u></a> to learn more about setting up a new front-end application on Workers and watch a <a href="https://youtu.be/W45MIi_t_go"><u>quick demo</u></a> to learn about how you can deploy an existing application to Workers. Static assets aren’t just for Workers written in JavaScript! You can serve static assets from <a href="https://developers.cloudflare.com/workers/languages/python/"><u>Workers written in Python</u></a> or even <a href="https://github.com/cloudflare/workers-rs/tree/main/templates/leptos/README.md"><u>deploy a Leptos app using workers-rs</u></a>.</p><p>If you’re wondering “<i>What about Pages?” </i>— rest assured, Pages will remain fully supported. We’ve heard from developers that as we’ve added new features to Workers and Pages, the choice of which product to use has become challenging. We’re closing this gap by bringing asset hosting, CI/CD and Preview URLs to Workers this Birthday Week.</p><p>To make the upfront choice Cloudflare Workers and Pages more transparent, we’ve created a <a href="https://developers.cloudflare.com/workers/static-assets/compatibility-matrix/"><u>compatibility matrix</u></a>. Looking ahead, we plan to bridge the remaining gaps between Workers and Pages and provide ways to migrate your Pages projects to Workers.</p><h2>Cloudflare joins OpenNext to deploy Next.js apps to Workers</h2><p>Starting today, as an early developer preview, you can use <a href="https://opennext.js.org//cloudflare"><u>OpenNext</u></a> to deploy Next.js apps to Cloudflare Workers via <a href="https://npmjs.org/@opennextjs/cloudflare"><u>@opennextjs/cloudflare</u></a>, a new npm package that lets you use the <a href="https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes"><u>Node.js “runtime” in Next.js</u></a> on Workers.</p><p>This new adapter is powered by our <a href="https://blog.cloudflare.com/more-npm-packages-on-cloudflare-workers-combining-polyfills-and-native-code/"><u>new Node.js compatibility layer</u></a>, newly introduced <a href="#static-asset-hosting"><u>Static Assets for Workers</u></a>, and Workers KV, which is <a href="https://blog.cloudflare.com/faster-workers-kv"><u>now up to 3x faster</u></a>. It unlocks support for <a href="https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration"><u>Incremental Static Regeneration (ISR)</u></a>, <a href="https://nextjs.org/docs/pages/building-your-application/routing/custom-error"><u>custom error pages</u></a>, and other Next.js features that our previous adapter, <a href="https://developers.cloudflare.com/pages/framework-guides/nextjs/ssr/get-started/"><u>@cloudflare/next-on-pages</u></a>, could not support, as it was only compatible with the Edge “runtime” in Next.js.</p><p><a href="https://blog.cloudflare.com/aws-egregious-egress/"><u>Cloud providers shouldn’t lock you in</u></a>. Like cloud compute and storage, open source frameworks should be portable — you should be able to deploy them to different cloud providers. The goal of the OpenNext project is to make sure you can deploy Next.js apps to any cloud platform, originally to AWS, and now Cloudflare. We’re excited to contribute to the OpenNext community, and give developers the freedom to run on the cloud that fits their applications needs (and <a href="https://blog.cloudflare.com/workers-pricing-scale-to-zero/"><u>budget</u></a>) best.</p><p>To get started by reading the <a href="https://opennext.js.org//cloudflare/get-started"><u>OpenNext docs</u></a>, which provide examples and a guide on how to add <a href="https://npmjs.org/@opennextjs/cloudflare"><u>@opennextjs/cloudflare</u></a> to your Next.js app.</p><p>We want your feedback! Report issues and contribute code at <a href="https://github.com/opennextjs/opennextjs-cloudflare/"><u>opennextjs/opennextjs-cloudflare on GitHub</u></a>, and join the discussion on the <a href="https://discord.gg/WUNsBM69"><u>OpenNext Discord</u></a>.</p>
            <pre><code>npm create cloudflare@latest -- my-next-app --framework=next --experimental
</code></pre>
            <h2>Continuous Integration &amp; Delivery (CI/CD) with Workers Builds</h2><p>Now in open beta, you can connect a GitHub or GitLab repository to a Worker, and Cloudflare will automatically build and deploy your changes each time you push a commit. Workers Builds provides an integrated CI/CD workflow you can use to build and deploy everything from full-stack applications built with the most popular frameworks to simple static websites. Just add your build command and let Workers Builds take care of the rest. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1K9izEbBxIlA0nXbNKJ1Od/55ecf9e56ecbc33aeb88df7ede1afddc/BLOG-2517_5.png" />
          </figure><p>While in open beta, Workers Builds is free to use, with a limit of one concurrent build per account, and unlimited build minutes per month. Once Workers Builds is Generally Available in early 2025, you will be billed based on the number of build minutes you use each month, and have a higher number of concurrent builds.</p>
<div><table><thead>
  <tr>
    <th></th>
    <th><span>Workers Free</span></th>
    <th><span>Workers Paid</span></th>
  </tr></thead>
<tbody>
  <tr>
    <td><span>Build minutes, </span><span>open beta</span></td>
    <td><span>Unlimited</span></td>
    <td><span>Unlimited</span></td>
  </tr>
  <tr>
    <td><span>Concurrent builds, </span><span>open beta</span></td>
    <td><span>1</span></td>
    <td><span>1</span></td>
  </tr>
  <tr>
    <td><span>Build minutes, </span><span>general availability</span></td>
    <td><span>3,000 minutes included per month</span></td>
    <td><span>6,000 minutes included per month </span><br /><span>+$0.005 per additional build minute</span></td>
  </tr>
  <tr>
    <td><span>Concurrent builds, </span><span>general availability</span></td>
    <td><span>1</span></td>
    <td><span>6</span></td>
  </tr>
</tbody></table></div><p><a href="https://developers.cloudflare.com/workers/ci-cd/builds/"><u>Read the docs</u></a> to learn more about how to deploy your first project with Workers Builds.</p><h2>Workers preview URLs</h2><p>Each newly uploaded version of a Worker now automatically generates a preview URL. Preview URLs make it easier for you to collaborate with your team during development, and can be used to test and identify issues in a preview environment before they are deployed to production.</p><p>When you upload a version of your Worker via the Wrangler CLI, Wrangler will display the preview URL once your upload succeeds. You can also find preview URLs for each version of your Worker in the Cloudflare dashboard:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/29iDm0x8QQex5ryatk23e1/ecfdba5b98b6e0c22350087a6035442d/BLOG-2517_6.png" />
          </figure><p>Preview URLs for Workers are similar to Pages <a href="https://developers.cloudflare.com/pages/configuration/preview-deployments/"><u>preview deployments</u></a> — they run on your Worker’s <code>workers.dev</code> subdomain and allow you to view changes applied on a new version of your application before the changes are deployed.</p><p>Learn more about preview URLs by visiting our <a href="https://developers.cloudflare.com/workers/configuration/previews"><u>developer documentation</u></a>. </p><h2>Safely release to production with Gradual Deployments</h2><p>At Developer Week, we launched <a href="https://developers.cloudflare.com/workers/configuration/versions-and-deployments/gradual-deployments/#_top"><u>Gradual Deployments</u></a> for Workers and Durable Objects to make it safer and easier to deploy changes to your applications. Gradual Deployments is now GA — we have been using it ourselves at Cloudflare for mission-critical services built on Workers since early 2024.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2FOHnaYqTyhuJRZVdERWdh/52df3d29622ccca9118d1cb49de19ae8/BLOG-2517_7.png" />
          </figure><p>Gradual deployments can help you stay on top of availability SLAs and minimize application downtime by surfacing issues early. Internally at Cloudflare, every single service built on Workers uses gradual deployments to roll out new changes. Each new version gets released in stages —– 0.05%, 0.5%, 3%, 10%, 25%, 50%, 75% and 100% with time to soak between each stage. Throughout the roll-out, we keep an eye on metrics (which are often instrumented with <a href="https://developers.cloudflare.com/analytics/analytics-engine/"><u>Workers Analytics Engine</u></a>!) and we <a href="https://developers.cloudflare.com/workers/configuration/versions-and-deployments/rollbacks/"><u>roll back</u></a> if we encounter issues. </p><p>Using gradual deployments is as simple as swapping out the <a href="https://developers.cloudflare.com/workers/wrangler/commands/#versions"><u>wrangler commands</u></a>, <a href="https://developers.cloudflare.com/api/operations/worker-versions-upload-version"><u>API endpoints</u></a>, and/or using “Save version” in the code editor that is built into the Workers dashboard. Read the <a href="https://developers.cloudflare.com/workers/configuration/versions-and-deployments/"><u>developer documentation</u></a> to learn more and get started. </p><h2>Queues is GA, with higher throughput and concurrency limits</h2><p><a href="https://developers.cloudflare.com/queues/"><u>Cloudflare Queues</u></a> is now generally available with higher limits. </p><p>Queues let a developer decouple their Workers into event driven services. <i>Producer </i>Workers write events to a Queue, and <i>consumer </i>Workers are invoked to take actions on the events. For example, you can use a Queue to decouple an e-commerce website from a service which sends purchase confirmation emails to users.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3cpkxgIQSYLrwbfhDSL2A5/97818131c1f4f7d2e8b8d76dcc8c7f9a/BLOG-2517_8.png" />
          </figure><p>Throughput and concurrency limits for Queues are now significantly higher, which means you can push more messages through a Queue, and consume them faster.</p><ul><li><p><b>Throughput:</b> Each queue can now process 5000 messages per second (previously 400 per second).</p></li><li><p><b>Concurrency:</b> Each queue can now have up to 250 <a href="https://developers.cloudflare.com/queues/configuration/consumer-concurrency/"><u>concurrent consumers</u></a> (previously 20 concurrent consumers). </p></li></ul><p>Since we <a href="https://blog.cloudflare.com/introducing-cloudflare-queues/"><u>announced Queues in beta</u></a>, we’ve added the following functionality:</p><ul><li><p><a href="https://developers.cloudflare.com/queues/configuration/batching-retries/#batching"><u>Batch sizes can be customized</u></a>, to reduce the number of consumer Worker invocations and thus reduce cost.</p></li><li><p><a href="https://developers.cloudflare.com/queues/configuration/batching-retries/#delay-messages"><u>Individual messages can be delayed</u></a>, so you can back off due to external API rate limits.</p></li><li><p><a href="https://developers.cloudflare.com/queues/configuration/pull-consumers/"><u>HTTP Pull consumers</u></a> allow messages to be consumed outside Workers, with zero data egress costs.</p></li></ul><p>Queues can be used by any developer on a Workers Paid plan. Head over to our <a href="https://developers.cloudflare.com/queues/get-started/"><u>getting started</u><i><u> </u></i><u>guide</u></a> to start building with Queues.</p><h2>Event notifications for R2 is now GA</h2><p>We’re excited to announce that event notifications for R2 is now generally available. Whether it’s kicking off image processing after a user uploads a file or triggering a sync to an external data warehouse when new analytics data is generated, many applications need to be able to reliably respond when events happen. <a href="https://blog.cloudflare.com/r2-events-gcs-migration-infrequent-access/#event-notifications-open-beta"><u>Event notifications</u></a> for <a href="https://developers.cloudflare.com/r2/"><u>Cloudflare R2</u></a> give you the ability to build event-driven applications and workflows that react to changes in your data.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/73t1PtQg576iv7m95HHjGL/26cd028004f5b669e41a89a7265c5a14/BLOG-2517_9.png" />
          </figure><p>Here’s how it works: When data in your R2 bucket changes, event notifications are sent to your queue. You can consume these notifications with a <a href="https://developers.cloudflare.com/queues/reference/how-queues-works/#create-a-consumer-worker"><u>consumer Worker </u></a>or <a href="https://developers.cloudflare.com/queues/configuration/pull-consumers/"><u>pull them over HTTP</u></a> from outside of Cloudflare Workers.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4NSN5r40rmXy0FMGOKvdAd/7d0c0637ccc478881528339304942948/BLOG-2517_10.png" />
          </figure><p>Since we introduced event notifications in <a href="https://blog.cloudflare.com/r2-events-gcs-migration-infrequent-access/#event-notifications-open-beta"><u>open beta</u></a> earlier this year, we’ve made significant improvements based on your feedback:</p><ul><li><p>We increased reliability of event notifications with throughput improvements from Queues. R2 event notifications can now scale to thousands of writes per second.</p></li><li><p>You can now configure event notifications directly from the Cloudflare dashboard (in addition to <a href="https://developers.cloudflare.com/workers/wrangler/commands/#notification-create"><u>Wrangler</u></a>).</p></li><li><p>There is now support for receiving notifications triggered by <a href="https://developers.cloudflare.com/r2/buckets/object-lifecycles/"><u>object lifecycle deletes</u></a>.</p></li><li><p>You can now set up multiple notification rules for a single queue on a bucket.</p></li></ul><p>Visit <a href="https://developers.cloudflare.com/r2/buckets/event-notifications/"><u>our documentation</u></a> to learn about how to set up event notifications for your R2 buckets.</p><h2>Removing the serverless microservices tax: No more request fees for Service Bindings and Tail Workers</h2><p>Earlier this year, we quietly changed Workers pricing to lower your costs. As of July 2024, you are no longer charged for requests between Workers on your account made via <a href="https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/"><u>Service Bindings</u></a>, or for invocations of <a href="https://developers.cloudflare.com/workers/observability/logging/tail-workers/"><u>Tail Workers.</u></a> For example, let’s say you have the following chain of Workers: </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1PTgWu9XiGJNoWrHTduQdB/84e1f6ee0788f99684440a9db7b4e6c1/BLOG-2517_11.png" />
          </figure><p>Each request from a client results in three Workers invocations. Previously, we charged you for each of these invocations, plus the CPU time for each of these Workers. With this change, we only charge you for the first request from the client, plus the CPU time used by each Worker.</p><p>This eliminates the additional cost of breaking a monolithic serverless app into microservices. In 2023, we introduced new <a href="https://blog.cloudflare.com/workers-pricing-scale-to-zero/"><u>pricing based on CPU time</u></a>, rather than duration, so you don’t have to worry about being billed for time spent waiting on I/O. This includes I/O to other Workers. With this change, you’re only billed for the first request in the chain, eliminating the other additional cost of using multiple Workers.</p><p>When you build microservices on Workers, you face fewer trade offs than on other compute platforms. Service bindings have <a href="https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/"><u>zero network overhead</u></a> by default, a built-in <a href="https://blog.cloudflare.com/javascript-native-rpc/"><u>JavaScript RPC system</u></a>, and a security model with <a href="https://blog.cloudflare.com/workers-environment-live-object-bindings/"><u>fewer footguns and simpler configuration</u></a>. We’re excited to improve this further with this pricing change.</p><h2>Image optimization is available to everyone for free — no subscription needed</h2><p>Starting today, you can use <a href="https://developers.cloudflare.com/images/transform-images/transform-via-url/"><u>Cloudflare Images</u></a> for free to optimize your images with up to 5,000 transformations per month.</p><p>Large, oversized images can throttle your application speed and page load times. We built <a href="https://developers.cloudflare.com/images/"><u>Cloudflare Images</u></a> to let you dynamically optimize images in the correct dimensions and formats for each use case, all while storing only the original image.</p><p>In the spirit of Birthday Week, we’re making image optimization available to everyone with a Cloudflare account, no subscription needed. You’ll be able to use Images to transform images that are stored outside of Images, such as in R2.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/49UPZRpeAp79qugqstqbT7/5e23fb4c7a458f5d00b401383bd6e777/BLOG-2517_12.png" />
          </figure><p>Transformations are served from your zone through a specially formatted URL with parameters that specify how an image should be optimized. For example, the transformation URL below uses the <code>format</code> parameter to automatically serve the image in the most optimal format for the requesting browser:</p>
            <pre><code>https://example.com/cdn-cgi/image/format=auto/thumbnail.png</code></pre>
            <p>This means that the original PNG image may be served as AVIF to one user and WebP to another. Without a subscription, transforming images from remote sources is free up to 5,000 unique transformations per month. Once you exceed this limit, any already cached transformations will continue to be served, but you’ll need a <a href="https://dash.cloudflare.com/?to=/:account/images"><u>paid Images plan</u></a> to request new transformations or to purchase storage within Images.</p><p>To get started, navigate to <a href="https://dash.cloudflare.com/?to=/:account/images"><u>Images in the dashboard</u></a> to enable transformations on your zone.</p>
    <div>
      <h2>Dive deep into more announcements from Builder Day</h2>
      <a href="#dive-deep-into-more-announcements-from-builder-day">
        
      </a>
    </div>
    <p>We shipped so much that we couldn’t possibly fit it all in one blog post. These posts dive into the technical details of what we’re announcing at Builder Day:</p><ul><li><p><a href="https://blog.cloudflare.com/workers-ai-bigger-better-faster"><u>Cloudflare’s Bigger, Better, Faster AI platform</u></a></p></li><li><p><a href="https://blog.cloudflare.com/making-workers-ai-faster"><u>Making Workers AI faster with KV cache compression, speculative decoding, and upgraded hardware</u></a></p></li><li><p><a href="https://blog.cloudflare.com/faster-workers-kv"><u>We made Workers KV up to 3x faster — here’s the data</u></a></p></li><li><p><a href="https://blog.cloudflare.com/sqlite-in-durable-objects"><u>Zero-latency SQLite storage in every Durable Object</u></a></p></li></ul>
    <div>
      <h2>Build the next big thing on Cloudflare</h2>
      <a href="#build-the-next-big-thing-on-cloudflare">
        
      </a>
    </div>
    <p>Cloudflare is for builders, and everything we’re announcing at Builder Day, you can start building with right away. We’re now offering <a href="http://blog.cloudflare.com/startup-program-250k-credits"><u>$250,000 in credits to use on our Developer Platform to qualified startups</u></a>, so that you can get going even faster, and become the next company to reach hypergrowth scale with a small team, and not waste time provisioning infrastructure and doing undifferentiated heavy lifting. Focus on shipping, and we’ll take care of the rest.</p><p>Apply to the startup program <a href="https://www.cloudflare.com/forstartups/"><u>here</u></a>, or stop by and say hello in the <a href="https://discord.cloudflare.com/"><u>Cloudflare Developers Discord</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[undefined]]></category>
            <category><![CDATA[Queues]]></category>
            <category><![CDATA[Cloudflare Images]]></category>
            <guid isPermaLink="false">6ct91ZmJYzPu9n9pt8sNBm</guid>
            <dc:creator>Tanushree Sharma</dc:creator>
            <dc:creator>Rohin Lohe</dc:creator>
            <dc:creator>Anni Wang</dc:creator>
            <dc:creator>Nevi Shah</dc:creator>
        </item>
        <item>
            <title><![CDATA[Announcing Pages support for monorepos, wrangler.toml, database integrations and more!]]></title>
            <link>https://blog.cloudflare.com/pages-workers-integrations-monorepos-nextjs-wrangler/</link>
            <pubDate>Thu, 04 Apr 2024 13:00:16 GMT</pubDate>
            <description><![CDATA[ Today, we’re launching four improvements to Pages that bring functionality previously restricted to Workers, with the goal of unifying the development experience between the two.  Support for monorepos, wrangler.toml, new additions to Next.js support and database integrations ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Pages <a href="/cloudflare-pages-ga">launched</a> in 2021 with the goal of empowering developers to go seamlessly from idea to production. With <a href="https://developers.cloudflare.com/pages/get-started/git-integration/#configure-your-deployment">built-in CI/CD</a>, <a href="https://developers.cloudflare.com/pages/configuration/preview-deployments/">Preview Deployments</a>, <a href="https://developers.cloudflare.com/pages/configuration/git-integration/">integration with GitHub and GitLab</a>, and support for all the most popular <a href="https://developers.cloudflare.com/pages/framework-guides/">JavaScript frameworks</a>, Pages lets you build and deploy both static and full-stack apps globally to our network in seconds.</p><p>Pages has superpowers like these that Workers does not have, and vice versa. Today you have to choose upfront whether to build a Worker or a Pages project, even though the two products largely overlap. That’s why during 2023’s <a href="/pages-and-workers-are-converging-into-one-experience">Developer Week</a>, we started bringing both products together to give developers the benefit of the best of both worlds. And it’s why we announced that like Workers, Pages projects can now directly access <a href="https://developers.cloudflare.com/workers/configuration/bindings/">bindings</a> to Cloudflare services — using <a href="https://github.com/cloudflare/workerd">workerd</a> under-the-hood — even when using the local development server provided by a full-stack framework like <a href="https://developers.cloudflare.com/pages/framework-guides/deploy-an-astro-site/">Astro,</a> <a href="https://developers.cloudflare.com/pages/framework-guides/nextjs/deploy-a-nextjs-site/">Next.js,</a> <a href="https://developers.cloudflare.com/pages/framework-guides/deploy-a-nuxt-site/">Nuxt,</a> <a href="https://developers.cloudflare.com/pages/framework-guides/deploy-a-qwik-site/">Qwik,</a> <a href="https://developers.cloudflare.com/pages/framework-guides/deploy-a-remix-site/">Remix,</a> <a href="https://developers.cloudflare.com/pages/framework-guides/deploy-a-solid-site/">SolidStart, or</a> <a href="https://developers.cloudflare.com/pages/framework-guides/deploy-a-svelte-site/">SvelteKit</a>. Today, we’re thrilled to be launching some new improvements to Pages that bring functionality previously restricted to Workers. Welcome to the stage: monorepos, wrangler.toml, new additions to Next.js support, and database integrations!</p>
    <div>
      <h3>Pages now supports monorepos</h3>
      <a href="#pages-now-supports-monorepos">
        
      </a>
    </div>
    <p>Many development teams use monorepos – repositories that contain multiple apps, with each residing in its own subdirectory. This approach is extremely helpful when these apps share code.</p><p>Previously, the Pages CI/CD set-up limited users to one repo per project. To use a monorepo with Pages, you had to <a href="https://developers.cloudflare.com/pages/get-started/direct-upload/">directly upload it</a> on your own, using the Wrangler CLI. If you did this, you couldn’t use Pages’ integration with GitHub or Gitlab, or have Pages CI/CD handle builds and deployments. With Pages support for monorepos, development teams can trigger builds to their various projects with each push.</p><p><b>Manage builds and move fast</b>You can now include and exclude specific paths to watch for in each of your projects to avoid unnecessary builds from commits to your repo.</p><p>Let’s say a monorepo contains 4 subdirectories – a marketing app, an ecommerce app, a design library, and a package. The marketing app depends on the design library, while the ecommerce app depends on the design library and the package.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/435MhqmGH7CJ4dXIvMEbN2/2ec159aecf92ea18f5b686b75024484d/image3-7.png" />
            
            </figure><p>Updates to the design library should rebuild and redeploy both applications, but an update to the marketing app shouldn’t rebuild and deploy the ecommerce app. However, by default, any push you make to my-monorepo triggers a build for both projects regardless of which apps were changed. Using the include/exclude build controls, you can specify paths to build and ignore for your project to help you track dependencies and build more efficiently.</p><p><b>Bring your own tools</b>Already using tools like <a href="https://turbo.build/">Turborepo</a>, <a href="https://nx.dev/">NX</a>, and <a href="https://lerna.js.org/">Lerna</a>? No problem! You can also bring your favorite <a href="https://developers.cloudflare.com/pages/configuration/monorepos/#monorepo-management-tools">monorepo management tooling</a> to Pages to help manage your dependencies quickly and efficiently.</p><p>Whatever your tooling and however you’re set up, check out our <a href="https://developers.cloudflare.com/pages/configuration/monorepos/">documentation</a> to get started with your monorepo right out of the box.</p>
    <div>
      <h3>Configure Pages projects with wrangler.toml</h3>
      <a href="#configure-pages-projects-with-wrangler-toml">
        
      </a>
    </div>
    <p>Today, we’re excited to announce that you can now configure Pages projects using wrangler.toml — the same configuration file format that is already used for configuring Workers.</p><p>Previously, Pages projects had to be configured exclusively in the dashboard. This forced you to context switch from your development environment any time you made a configuration change, like adding an environment variable or <a href="https://developers.cloudflare.com/workers/configuration/bindings/">binding</a>. It also separated configuration from code, making it harder to know things like what bindings are being used in your project. If you were developing as a team, all the users on your team had to have access to your account to make changes – even if they had access to make changes to the source code via your repo.</p><p>With wrangler.toml, you can:</p><ul><li><p><b>Store your configuration file in source control.</b> Keep your configuration in your repo alongside the rest of your code.</p></li><li><p><b>Edit your configuration via your code editor.</b> Remove the need to switch back and forth between interfaces.</p></li><li><p><b>Write configuration that is shared across environments.</b> Define bindings and environment variables for local, preview, and production in one file.</p></li><li><p><b>Ensure better access control.</b> By using a configuration file in your repo, you can control who has access to make changes without giving access to your Cloudflare dashboard.</p></li></ul><p><b>Migrate existing projects</b>If you have an existing Pages project, we’ve added a new Wrangler CLI command that downloads your existing configuration and provides you with a valid <code>wrangler.toml</code> file.</p>
            <pre><code>$ npx wrangler@latest pages download config &lt;PROJECT_NAME&gt;</code></pre>
            <p>Run this command, add the wrangler.toml file that it generates to your project’s root directory, and then when you deploy, your project will be configured based on this configuration file.</p><p>If you are already using wrangler.toml to define your local development configuration, you can continue doing so. By default, your existing wrangler.toml file will continue to only apply to local development. When you run <code>wrangler pages deploy</code>, Wrangler will show you the additional fields that you must add in order for your configuration to apply to production and preview environments. Add these fields to your wrangler.toml, and then when you deploy your changes, the configuration you’ve defined in wrangler.toml will be used by your Pages project.</p><p>Refer to the <a href="https://developers.cloudflare.com/pages/functions/wrangler-configuration/">documentation</a> for more information on exactly what’s supported and how to leverage wrangler.toml in your development workflows.</p>
    <div>
      <h3>Integrate Pages projects with your favorite database</h3>
      <a href="#integrate-pages-projects-with-your-favorite-database">
        
      </a>
    </div>
    <p>You can already connect to <a href="https://developers.cloudflare.com/d1/">D1</a>, Cloudflare’s <a href="https://www.cloudflare.com/developer-platform/products/d1/">serverless SQL database</a>, directly from Pages projects. And you can connect directly to your existing PostgreSQL database using <a href="https://developers.cloudflare.com/hyperdrive/">Hyperdrive</a>. Today, we’re making it even easier for you to connect 3rd party databases to Pages with just a couple of clicks. Pages now integrates directly with <a href="https://developers.cloudflare.com/workers/databases/native-integrations/neon/">Neon</a>, <a href="https://developers.cloudflare.com/workers/databases/native-integrations/planetscale/">PlanetScale</a>, <a href="https://developers.cloudflare.com/workers/databases/native-integrations/supabase/">Supabase</a>, <a href="https://developers.cloudflare.com/workers/databases/native-integrations/turso/">Turso</a>, <a href="https://developers.cloudflare.com/workers/databases/native-integrations/upstash/">Upstash</a>, and <a href="https://developers.cloudflare.com/workers/databases/native-integrations/xata/">Xata</a>!</p><p>Simply navigate to your Pages project’s settings, select your database provider, and we’ll add <a href="https://developers.cloudflare.com/pages/functions/bindings/#environment-variableshttps://developers.cloudflare.com/pages/functions/bindings/#environment-variables">environment variables</a> with credentials needed to connect as well a <a href="https://developers.cloudflare.com/pages/functions/bindings/#secrets">secret</a> with the API key from the provider for you automatically.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2seOXZ1bXjWnBbHTV7zs4U/6e180084ddfcbcc3a661afdacb8b1dc9/image1-4.png" />
            
            </figure><p>Not ready to ship to production yet? You can deploy your changes to Pages’ preview environment alongside your staging database and test your deployment with its unique preview URL.</p><p><b>What’s coming up for integrations?</b>We’re just getting started with database integrations, with many more providers to come. In the future, we’re also looking to expand our integrations platform to include seamless set up when building other components of your app – think authentication and observability!</p><p>Want to bring your favorite tools to Cloudflare but don’t see the integration option? Want to build out your own integration?</p><p>Not only are we looking for <a href="https://docs.google.com/forms/d/e/1FAIpQLScUzm1bpWzR0SlJLGI80HchcAz9emPWG2lIXO107KNZTcfo-w/viewform">user input on new integrations</a> to add, but we’re also opening up the integrations platform to builders who want to submit their own products! We’ll be releasing step-by-step documentation and tooling to easily build and publish your own integration. If you’re interested in submitting your own integration, please fill out our <a href="https://docs.google.com/forms/d/e/1FAIpQLScUzm1bpWzR0SlJLGI80HchcAz9emPWG2lIXO107KNZTcfo-w/viewform">integration intake form</a> and we’ll be in touch!</p>
    <div>
      <h3>Improved Next.js Support for Pages</h3>
      <a href="#improved-next-js-support-for-pages">
        
      </a>
    </div>
    <p>With <a href="https://github.com/cloudflare/next-on-pages/releases">30 minor and patch releases</a> since the 1.0 launch of <a href="https://github.com/cloudflare/next-on-pages">next-on-pages</a> during Dev Week 2023, our <a href="https://nextjs.org/">Next.js</a> integration has been continuously maturing and keeping up with the evolution of Next.js. In addition to performance improvements, and compatibility and bug fixes, we released three significant improvements.</p><p>First, the <a href="https://eslint.org/">ESLint</a> plugin <a href="https://www.npmjs.com/package/eslint-plugin-next-on-pages">eslint-plugin-next-on-pages</a> is a great way to catch and fix compatibility issues as you are writing your code before you build and deploy applications. The plugin contains <a href="https://github.com/cloudflare/next-on-pages/tree/main/packages/eslint-plugin-next-on-pages/docs/rules">several rules</a> for the most common coding mistakes we see developers make, with more being added as we identify problematic scenarios.</p><p>Another noteworthy change is the addition of <a href="https://github.com/cloudflare/next-on-pages/blob/3846730c4a0d12/packages/next-on-pages/README.md#cloudflare-platform-integration">getRequestContext()</a> APIs, which provides you with access to Cloudflare-specific resources and metadata about the request currently being processed by your application, allowing for example you to take client’s location or browser preferences into account when generating a response.</p><p>Last but not least, we have completely <a href="https://developers.cloudflare.com/pages/framework-guides/nextjs/deploy-a-nextjs-site/">overhauled the local development workflow for Next.js</a> as well as other full-stack frameworks. Thanks to the new <a href="https://github.com/cloudflare/next-on-pages/tree/main/internal-packages/next-dev">setupDevPlatform()</a> API, you can now use the default development server <code>next dev</code>, with support for instant edit &amp; refresh experience, while also using D1, <a href="https://www.cloudflare.com/developer-platform/r2/">R2</a>, KV and other resources provided by the Cloudflare development platform. Want to take it for a quick spin? Use <a href="https://developers.cloudflare.com/pages/get-started/c3/">C3</a> to scaffold a new Next.js application with just one command.</p><p>To learn more about our Next.js integration, check out our <a href="https://developers.cloudflare.com/pages/framework-guides/nextjs/deploy-a-nextjs-site/">Next.js framework guide</a>.</p>
    <div>
      <h3>What’s next for the convergence of Workers and Pages?</h3>
      <a href="#whats-next-for-the-convergence-of-workers-and-pages">
        
      </a>
    </div>
    <p>While today’s launch represents just a few of the many upcoming additions to converge Pages and Workers, we also wanted to share a few milestones that are on the horizon, planned later in 2024</p><p><b>Pages features coming soon to Workers</b></p><ul><li><p><b>Workers CI/CD.</b> Later this year, we plan to bring the <a href="https://www.cloudflare.com/learning/serverless/glossary/what-is-ci-cd/">CI/CD system</a> from Cloudflare Pages to Cloudflare Workers. Connect your repositories to Cloudflare and trigger builds for your Workers with every commit.</p></li><li><p><b>Serve static assets from Workers.</b> You will be able to deploy and serve static assets as part of Workers – just like you can with Pages today – and build Workers using full-stack frameworks! This will also extend to Workers for Platforms, allowing you to build platforms that let your customers deploy complete, full-stack applications that serve both dynamic and static assets.</p></li><li><p><b>Workers</b> <a href="https://developers.cloudflare.com/pages/configuration/preview-deployments"><b>preview URLs</b></a><b>.</b> Preview versions of your Workers with every change and share a unique URL with your team for testing.</p></li></ul><p><b>Workers features coming soon to Pages</b></p><ul><li><p><b>Add</b> <a href="https://developers.cloudflare.com/workers/observability/logging/tail-workers/"><b>Tail Workers</b></a> <b>to Pages projects.</b> Get observability into your Pages Functions by capturing <code>console.log()</code> messages, unhandled exceptions, and request metadata, and then forward the information to external destinations.</p></li><li><p><a href="https://developers.cloudflare.com/workers/observability/logging/logpush/"><b>Workers Trace Events Logpush</b></a><b>.</b> Push your Pages Functions logs to supported destinations like <a href="https://developers.cloudflare.com/r2/">R2</a>, Datadog, or any HTTP destination for long term storage, auditing, and compliance.</p></li><li><p><a href="https://developers.cloudflare.com/workers/configuration/versions-and-deployments/gradual-deployments/"><b>Gradual Deployments</b></a><b>.</b> Gradually deploy new versions of your Pages Function to reduce risk when making changes to critical applications.</p></li></ul><p>You might also notice that the Pages and Workers interfaces in the Cloudflare Dash will begin to look more similar through the rest of this year. These changes aren’t just superficial, or us porting over functionality from one product to another. Under-the-hood, we are unifying the way that Workers and Pages projects are composed and then deployed to our network, ensuring that as we add new products and features, they can work with both Pages and Workers on day one.</p><p>In the meantime, bring your monorepo, a wrangler.toml, and your favorite databases to Pages and let’s rock! Be sure to show off what you’ve built in the <a href="https://discord.cloudflare.com/">Cloudflare Developer Discord</a> or by giving us a shout at <a href="https://twitter.com/CloudflareDev">@CloudflareDev</a>.</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Cloudflare Pages]]></category>
            <category><![CDATA[Wrangler]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <guid isPermaLink="false">4P2K139AXugqOLE4sR5wIu</guid>
            <dc:creator>Nevi Shah</dc:creator>
            <dc:creator>Adam Murray</dc:creator>
            <dc:creator>Igor Minar</dc:creator>
        </item>
        <item>
            <title><![CDATA[Making Cloudflare Pages the fastest way to serve your sites]]></title>
            <link>https://blog.cloudflare.com/how-we-decreased-pages-latency/</link>
            <pubDate>Fri, 23 Jun 2023 13:00:37 GMT</pubDate>
            <description><![CDATA[ Pages is now the fastest way to serve your sites across Netlify, Vercel and many others and we’re so proud ]]></description>
            <content:encoded><![CDATA[ <p></p><p>In an era where visitors expect instant gratification and content on-demand, every millisecond counts. If you’re a web application developer, it’s an excellent time to be in this line of business, but with great power comes great responsibility. You’re tasked with creating an experience that is not only intuitive and delightful but also quick, reactive and responsive – sometimes with the two sides being at odds with each other. To add to this, if your business completely runs on the internet (say ecommerce), then your site’s Core Web Vitals could make or break your bottom line.</p><p>You don’t just need fast – you need <i>magic</i> fast. For the past two years, Cloudflare Pages has been serving up performant applications for users across the globe, but this week, we’re showing off our brand new, lightning fast architecture, decreasing the TTFB by up to 10X when serving assets.</p><p>And while a magician never reveals their secrets, this trick is too good to keep to ourselves. For all our application builders, we’re thrilled to share the juicy technical details on how we adopted Workers for Platforms — our extension of Workers to build SaaS businesses on top of — to make Pages one of the fastest ways to serve your sites.</p>
    <div>
      <h3>The problem</h3>
      <a href="#the-problem">
        
      </a>
    </div>
    <p>When we <a href="/cloudflare-pages-ga/">launched Pages in 2021</a>, we didn’t anticipate the exponential growth we would experience for our platform in the months and years to come. As our users began to adopt Pages into their development workflows, usage of our platform began to skyrocket. However, while riding the high of Pages’ success, we began to notice a problem – a rather large one. As projects grew in size, with every deployment came a pinch more latency, slowly affecting the end users visiting the Pages site. Customers with tens of thousands of deployments were at risk of introducing latency to their site – a problem that needed to be solved.</p><p>Before we dive into our technical solution, let’s first explore further the setup of Pages and the relationship between number of deployments and the observed latency.</p>
    <div>
      <h3>How could this be?</h3>
      <a href="#how-could-this-be">
        
      </a>
    </div>
    <p>Built on top of Cloudflare Workers, Pages serves static assets through a highly optimised Worker. We refer to this as the Asset Server Worker.</p><p>Users can also add dynamic content through Pages Functions which eventually get compiled into a separate Worker. Every single Pages deployment corresponds to unique instances of these Workers composed in a pipeline.</p><p>When a request hits Cloudflare we need to look up which pipeline to execute. As you’d expect, this is a function of the hostname in the URL.</p><p>If a user requested <a href="https://2b469e16.example.pages.dev/index.html">https://2b469e16.example.pages.dev/index.html</a>, the hostname is <a href="https://2b469e16.example.pages.dev/index.html">2b469e16.example.pages.dev</a> which is unique across all deployments on Pages — 2b469e16 is typically the commit hash and example in this case refers to the name of the project.</p><p>Every Pages project has its own routing table which is used to look up the pipeline to execute. The routing table happens to be a JSON object with a list of regexes for possible paths in that project (in our case, one for every deployment) and their corresponding pipelines.</p><p>The script_hash in the example below refers to the pipeline identifier. Naming is hard indeed.</p>
            <pre><code>{
 "filters": [
   {
     "pattern": "^(?:2b469e16.example.pages.dev(?:[:][0-9]+)?\\/(?&lt;p1&gt;.*))$",
     "script_hash": "..."
   },
   {
     "pattern": "^(?:example.pages.dev(?:[:][0-9]+)?\\/(?&lt;p1&gt;.*))$",
     "script_hash": "..."
   },
   {
     "pattern": "^(?:test.example.com(?:[:][0-9]+)?\\/(?&lt;p1&gt;.*))$",
     "script_hash": "..."
   }
 ],
 "v": 1
}</code></pre>
            <p>So to look up the pipeline in question, we would: download this JSON object from Quicksilver, parse it, and then iterate through this until it finds a regex that matches the current request.</p><p>Unsurprisingly, this is expensive. Let’s take a look at a quick real world example to see <i>how</i> expensive.</p><p>In one realistic case, it took us 107ms just to <i>parse</i> the JSON. The larger the JSON object gets, the more compute it takes to parse it — with tens of thousands of deployments (not unusual for very active projects that deploy immutable preview deployments for every git commit), this JSON could be several megabytes in size!</p><p>It doesn’t end there though. After parsing this, it took 29ms to then iterate and test several regexes to find the one that matched the current request.</p><p>To summarise, every single request to this project would take 136ms to just pick the right pipeline to execute. While this was the median case for projects with 10,000 deployments on average, we’ve seen projects with <b>seconds</b> in added latency making them unusable after 50,000 deployments, punishing users for using our platform.</p><p>Given most web sites load more than one asset for a page, this leads to timeouts and breakage leading to an unstable and unacceptable user experience.</p>
    <div>
      <h3>The secret sauce is Workers for Platforms</h3>
      <a href="#the-secret-sauce-is-workers-for-platforms">
        
      </a>
    </div>
    <p>We launched <a href="/workers-for-platforms/">Workers for Platforms</a> last year as a way to build ambitious platforms on top of Workers. Workers for Platforms lets one build complex pipelines where a request may be served by a Worker built and maintained by you but could then dispatch to a Worker written by a user of your platform. This allows your platform’s users to write their own Worker like they’ve been used to but while you control how and when they are executed.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/27P8dholN414dEiSnVKtUb/87156e682888a0a329799a756e0578ef/image4-23.png" />
            
            </figure><p>This isn’t very different from what we do with Pages. Users write their Pages functions which compile into a Worker. Users also upload their own static assets which are then bound to our special Asset Server Worker in unique pipelines for each of their deployments. And we control how and when which Worker gets executed based on a hostname in their URL.</p><p>Runtime lookups shouldn’t be O(n) though but O(1). Because Workers for Platforms was designed to build entire platforms on top of, lookups when trying to dispatch to a user’s Worker were designed as O(1) ensuring latency wasn’t a function of number of Workers in an account.</p>
    <div>
      <h3>The solution</h3>
      <a href="#the-solution">
        
      </a>
    </div>
    <p>By default, Workers for Platforms hashes the name of the Worker with a secret and uses that for lookups at runtime. However, because we need to dispatch by hostname, we had a different idea. At deployment time, we could hash the pipeline for the deployment by its hostname — <a href="https://2b469e16.example.pages.dev/index.html">2b469e16.example.pages.dev</a>, for example.</p><p>When a request comes in, we hash the hostname from the URL with our predefined secret and then use that value to look up the pipeline to execute. This entirely removes the necessity to fetch, parse and traverse the routing table JSON from before, now making our lookup O(1).</p><p>Once we were happy with our new setup from internal testing we wanted to onboard a real user. Our <a href="https://developers.cloudflare.com">Developer Docs</a> have been <a href="/new-dev-docs/">running on Pages</a> since the start of 2022 and during that time, we’ve dogfooded many different features and experiments. Due to the great relationship between our two teams and them being a sizable customer of ours we wanted to bring them onto our new Workers for Platform routing.</p><p>Before opting them in, TTFB was averaging at about 600ms.</p><p>After opting them in, TTFB is now 60ms. <a href="https://developers.cloudflare.com/analytics/web-analytics">Web Analytics</a> shows a noticeable drop in entire page load time as a result.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2hOpJu5iOcgDj5g7A9MR6W/690f8c5c96c4cc9a07f17d0a5d784472/Untitled.png" />
            
            </figure><p>This improvement was also visible through <a href="https://developer.chrome.com/en/docs/lighthouse/performance/performance-scoring/">Lighthouse scores</a> now approaching a perfect score of 100 instead of 78 which was the average we saw previously.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1DOMSoGft9tLCzg68wtXSN/bb3440d4f5e0c82a906dfb9793d71cfd/Untitled--1-.png" />
            
            </figure><p>The team was ecstatic about this especially given all of this happened under the hood with no downtime or required engineering team on their end. Not only is <a href="https://developers.cloudflare.com/">https://developers.cloudflare.com/</a> faster, we’re using less compute to serve it to all of you.</p>
    <div>
      <h3>The big migration</h3>
      <a href="#the-big-migration">
        
      </a>
    </div>
    <p>Migrating <a href="https://developers.cloudflare.com/">developers.cloudflare.com</a> was a big milestone for us and meant our new infrastructure was capable of handling traffic at scale. But a goal we were very certain of was migrating every Pages deployment ever created. We didn’t want to leave any users behind.</p><p>Turns out, that wasn’t a small number. There’d been over 14 million deployments so far over the years. This was about to be one of the biggest migrations we’d done to runtime assets and the risk was that we’d take down someone’s site.</p><p>We approached this migration with some key goals:</p><ul><li><p>Customer impact in terms of downtime was a no go, all of this needed to happen under the hood without anyone’s site being affected;</p></li><li><p>We needed the ability to A/B test the old and new setup so we could revert on a per site basis if something went wrong or was incompatible;</p></li><li><p>Migrations at this scale have the ability to cause incidents because they exceed the typical request capacity of our APIs in a short window so they need to run slowly;</p></li><li><p>Because this was likely to be a long running migration, we needed the ability to look at metrics and retry failures.</p></li></ul><p>The first step to all of this was to add the ability to A/B test between the legacy setup and the new one. To ensure we could A/B between the legacy setup and new one at any time, we needed to deploy both a regular pipeline (and updated routing table) and new Workers for Platforms hashed one for every deployment.</p><p>We also added a feature flag that allowed us to route to either the legacy setup or the new one per site or per data centre with the ability to explicitly opt out a site when an edgecase didn’t work.</p><p>With this setup, we started running our long running migration behind the scenes that duplicated every single deployment to the new Workers for Platforms enabled pipelines.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6cH3RPk39q50jgPD42nDej/d1ef38c399ffe3a8bb9a2e889863f267/unnamed--1-.png" />
            
            </figure><p>Duplicating them instead of replacing them meant that risk was low and A/B would be possible with the tradeoff of more cleanup after we finished but we picked that with reliability for users in mind.</p><p>A few days in after all 14 million deployments had finished migrating over, we started rollout to the new infrastructure with a percentage based rollout. This was a great way for us to find issues and ensure we were ready to serve all runtime traffic for Pages without the risk of an incident.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3UKjjt2upheD8aALjmDMT4/9634075b6f2d3d823ff7e257ed1e1f98/image--2-.png" />
            
            </figure>
    <div>
      <h3>Feeding three birds with one scone</h3>
      <a href="#feeding-three-birds-with-one-scone">
        
      </a>
    </div>
    <p>Alongside the significant latency improvements for Pages projects, this change also gave improvements in other areas:</p><ul><li><p><b><b><b>Lower CPU usage</b></b></b> - Since we no longer need to parse a huge JSON blob and do potentially thousands of regex matches, we saved a nice amount of CPU time across thousands of machines across our data centres.</p></li><li><p><b><b><b>Higher LRU hit rate</b></b></b> - We have LRU caches for things we fetch from <a href="/introducing-quicksilver-configuration-distribution-at-internet-scale/">Quicksilver</a> this is to reduce load on Quicksilver and improve performance. However, with the large routing tables we had previously, we could easily fill up this cache with one or just a few routing tables. Now that we have turned this into tiny single entry JSONs, we have improved the cache hit rate for <i>all Workers</i>.</p></li><li><p><b><b><b>Quicksilver storage reduction</b></b></b> - We also reduced the storage we take up with our routing tables by <b>92%</b>. This is a reduction of approximately 12 GiB on each of our hundreds of data centres.</p></li></ul>
    <div>
      <h3>We’re just getting started</h3>
      <a href="#were-just-getting-started">
        
      </a>
    </div>
    <p>Pages is now the <a href="https://www.webpagetest.org/video/compare.php?tests=230323_BiDcFV_ABE,230323_BiDcMX_ABF">fastest way</a> to serve your sites across Netlify, <a href="https://www.webpagetest.org/video/compare.php?tests=230323_AiDc65_AFF,230323_BiDcGD_ABX">Vercel</a> and many others and we’re so proud.</p><p>But it’s going to get even faster. With projects like <a href="/building-cloudflare-on-cloudflare/">Flame</a>, we can’t wait to shave off many more milliseconds to every request a user makes to your site.</p><p>To a faster web for all of us.</p> ]]></content:encoded>
            <category><![CDATA[Speed Week]]></category>
            <category><![CDATA[Cloudflare Pages]]></category>
            <category><![CDATA[Performance]]></category>
            <guid isPermaLink="false">5LCX7XNiq3YobLf0Mqolzp</guid>
            <dc:creator>Sid Chatterjee</dc:creator>
            <dc:creator>Daniel Walsh</dc:creator>
            <dc:creator>Nevi Shah</dc:creator>
        </item>
        <item>
            <title><![CDATA[Bringing a unified developer experience to Cloudflare Workers and Pages]]></title>
            <link>https://blog.cloudflare.com/pages-and-workers-are-converging-into-one-experience/</link>
            <pubDate>Wed, 17 May 2023 13:00:48 GMT</pubDate>
            <description><![CDATA[ Today we’re excited to announce that over the next year we will be working to bring together the best traits and attributes you know and love from each product into one powerful platform!  ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3PeofAYkofLOlbvWxKSbyp/0103898bf22da7dbe8e70e7705f32d43/image4-13.png" />
            
            </figure><p>Today, we’re thrilled to announce that Pages and Workers will be joining forces into one singular product experience!</p><p>We’ve all been there. In a surge of creativity, you visualize in your head the application you want to build so clearly with the pieces all fitting together – maybe a server side rendered frontend and an SQLite database for your backend. You head to your computer with the wheels spinning. You know you can build it, you just need the right tools. You log in to your Cloudflare dashboard, but then you’re faced with an incredibly difficult decision:</p><p><i>Cloudflare Workers or Pages?</i></p><p>Both seem so similar at a glance but also different in the details, so which one is going to make your idea become a reality? What if you choose the wrong one? What are the tradeoffs between the two? These are questions our users should never have to think about, but the reality is, they often do. Speaking with our wide community of users and customers, we hear it ourselves! Decision paralysis hits hard when choosing between Pages and Workers with both products made to build out serverless applications.</p><p>In short, we don’t want this for our users — especially when you’re on the verge of a great idea – no, a big idea. That’s why we’re excited to show off the first milestone towards bringing together the best of both beloved products — Workers and Pages into <b>one powerful development platform!</b> This is the beginning of the journey towards a shared fate between the two products, so we wanted to take the opportunity to tell you why we were doing this, what you can use today, and what’s next.</p>
    <div>
      <h2>More on the “why”</h2>
      <a href="#more-on-the-why">
        
      </a>
    </div>
    <p>The relationship between Pages and Workers has always been intertwined. Up until today, we always looked at the two as siblings — each having their own distinct characteristics but both allowing their respective users to <a href="https://www.cloudflare.com/developer-platform/solutions/hosting/">build rich and powerful applications</a>. Each product targeted its own set of use cases.</p><p>Workers first started as a way to extend our <a href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/">CDN</a> and then expanded into a highly configurable general purpose compute platform. Pages first started as a static web hosting that expanded into <a href="https://www.cloudflare.com/learning/performance/what-is-jamstack/">Jamstack</a> territory. Over time, Pages began acquiring more of Workers' powerful compute features, while Workers began adopting the rich developer features introduced by Pages. The lines between these two products blurred, making it difficult for our users to understand the differences and pick the right product for their application needs.</p><p>We know we can do better to help alleviate this decision paralysis and help you move fast throughout your development experience.</p>
    <div>
      <h2>Cool, but what do you mean?</h2>
      <a href="#cool-but-what-do-you-mean">
        
      </a>
    </div>
    <p>Instead of being forced to make tradeoffs between these two products, we want to bring you the best of the both worlds: a single development platform that has both powerful compute and superfast static asset hosting – that seamlessly integrates with our portfolio of storage products like <a href="https://www.cloudflare.com/developer-platform/r2/">R2</a>, Queues, D1, and others, and provides you with rich tooling like <a href="https://www.cloudflare.com/learning/serverless/glossary/what-is-ci-cd/">CI/CD</a>, git-ops workflows, live previews, and flexible environment configurations.</p>
    <div>
      <h3>All the details in one place</h3>
      <a href="#all-the-details-in-one-place">
        
      </a>
    </div>
    <p>Today, a lot of our developers use both Pages and Workers to build pieces of their applications. However, they still live in separate parts of the Cloudflare dashboard and don’t always translate from one to the other, making it difficult to combine and keep track of your app’s stack. While we’re still vision-boarding the look and feel, we’re planning a world where users have the ability to manage all of their applications in one central place.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3ZPV9OB9b2zjePkxRGefek/57cedd3e2ee1d701bdd8aca2334dd134/image1-44.png" />
            
            </figure><p>No more scrambling all over the dashboard to find the pieces of your application – you’ll have all the information you need about a project right at your fingertips.</p>
    <div>
      <h3>Primitives</h3>
      <a href="#primitives">
        
      </a>
    </div>
    <p>With Pages and Workers converging, we’ll also be redefining the concept of a “project” , introducing a new blank canvas of possibilities to plug and play. Within a project, you will be able to add (1) static assets, (2) serverless functions (Workers), (3) resources or (4) any combination of each.</p><p>To unlock the full potential of your application, we’re exploring project capabilities that allow you to auto-provision and directly integrate with resources like KV, Durable Objects, R2 and D1. With the possibility of all of these primitives on a project, more importantly, you'll be able to safely perform rollbacks and previews, as we'll keep the versions of your assets, functions and resources in sync with every deployment. No need to worry about any of them becoming stale on your next deployment.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/74kTM29cuEOsePnmglreAA/fd4c9e7c9a62aad15c07dd7bf2ef3430/image5-8.png" />
            
            </figure>
    <div>
      <h3>Deployments</h3>
      <a href="#deployments">
        
      </a>
    </div>
    <p>One of Pages’ most notable qualities is its git-ops centered deployments. In our converged world, you’ll be able to optionally connect, build and deploy git repos that contain any combination of static assets, serverless functions and bindings to resources, as well as take advantage of the same high-performance CI system that exists in Pages today.</p><p>Like Pages, you will be able to preview deployments of your project with unique URLs protected by Cloudflare Access, available in your PRs or via Wrangler command. Because we know that great ideas take lots of vetting before the big release, we’ll also have a first-class concept of environments to enable testing in different setups.</p>
    <div>
      <h3>Local development</h3>
      <a href="#local-development">
        
      </a>
    </div>
    <p>Arguably one of the most important parts to consider is our local development story in a post-converged world. This developer experience should be no different from how we’re converging the products. In the future, as you work with our Wrangler CLI, you can expect a unified and predictable set of commands to use on your project – e.g. a simple <code>wrangler dev</code> and <code>wrangler deploy</code>. Using a configuration file that applies to your entire project along with all of its components, you can have the confidence that your command will act on the entire project – not just pieces of it!</p>
    <div>
      <h2>What are the benefits?</h2>
      <a href="#what-are-the-benefits">
        
      </a>
    </div>
    <p>With Workers and Pages converging, we’re not just unlocking all the golden developer features of each product into one development platform. We’re bringing all the performance, cost and load benefits too. This includes:</p><ul><li><p><b>Super low latency</b> with globally distributed static assets and compute on our network that is just 50ms away from 95% of Internet-connected world-wide population.</p></li><li><p><b>Free egress</b> and also free static asset hosting.</p></li><li><p><b>Standards-based JavaScript runtime</b> with seamless compatibility across the packages and libraries you're already familiar with.</p></li></ul>
    <div>
      <h2>Seamless migrations for all</h2>
      <a href="#seamless-migrations-for-all">
        
      </a>
    </div>
    <p>If you’re already a Pages or Workers user and are starting to get nervous about what this means for your existing projects – never fear. As we build out this merged architecture, seamless migration is our top priority and the North Star for every step on the way to a unified development platform. Existing projects on both Pages and Workers will continue to work without users needing to lift a finger. Instead, you'll see more and more features become available to enrich your existing projects and workflows, regardless of the product you started with.</p>
    <div>
      <h2>What’s new today?</h2>
      <a href="#whats-new-today">
        
      </a>
    </div>
    <p>We’ll be working over the next year to converge Pages and Workers into one singular experience, blending not only the products themselves but also our product, engineering and design teams behind the scenes.</p><p>While we can’t wait to welcome you to the new converged world, this change unfortunately won’t happen overnight. We’re planning to hit some big but incremental milestones over the next few quarters to ensure a smooth transition into convergence, and this Developer Week, we’re excited to take our first step toward convergence. In the dashboard, things might feel a bit different!</p>
    <div>
      <h3>Get started together</h3>
      <a href="#get-started-together">
        
      </a>
    </div>
    <p>Combining the onboarding experience for Pages and Workers into one flow, you’ll notice some changes on our dashboard when you’re creating a project. We’re slowly bringing the two products closer together by unifying the creation flow giving you access to create either a Pages project or Worker from one screen.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1puZCEGhC57tvtVrZelPxQ/7a2dce2d00e60a04494c2877e0c78ebb/image2-25.png" />
            
            </figure>
    <div>
      <h3>Go faster with templates</h3>
      <a href="#go-faster-with-templates">
        
      </a>
    </div>
    <p>We understand the classic developer urge to immediately get hands dirty and hit the ground running on their big vision. We’re making it easier than ever to go from an idea to an application that’s live on the Cloudflare network. In a couple of clicks, you can deploy a starter template, ranging from a simple Hello World Worker to a ChatGPT plugin. In the future, we’re working on Pages templates in our dashboard, allowing you to automatically create a new repo and deploy starter full-stack apps with a couple of buttons.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3rE4bQXXGIVLL1GJHRwp7K/689712caa64a9898a9e1d1cec23f9530/image6-8.png" />
            
            </figure>
    <div>
      <h3>Your favorite full stack frameworks at your fingertips</h3>
      <a href="#your-favorite-full-stack-frameworks-at-your-fingertips">
        
      </a>
    </div>
    <p>We're not stopping with static templates or our dashboard either. Bringing the framework of your choice doesn't mean you have to leave behind the tools you already know and love. If you’re itching to see just what we mean when we say “deploy with your favorite full-stack framework” or “check out the power of Workers”, simply execute:</p>
            <pre><code>npm create cloudflare@latest</code></pre>
            <p>from your terminal and enjoy the ride! This <a href="/making-cloudflare-for-web">new CLI experience integrates</a> with CLIs from some of our first class and solidly supported full-stack frameworks like Angular, Next, Qwik and Remix giving you full control of how you create new projects. From this tool you can also deploy a variety of Workers using our powerful starter templates, with a wizard-like experience.</p><div></div>
<p></p>
    <div>
      <h3>One singular place to find all of your applications</h3>
      <a href="#one-singular-place-to-find-all-of-your-applications">
        
      </a>
    </div>
    <p>We’re taking one step closer to a unified experience by merging the Pages and Workers project list dashboards together. Once you’ve deployed your application, you’ll notice all of your Pages and Workers on one page, so you don’t have to navigate to different parts of your dashboard. Track your usage analytics for Workers / Pages Functions in one spot. In the future, these cards won’t be identifiable as Pages and Workers – just “projects” with a combination of assets, functions and resources!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1ecIiaeqYcjq16PZ0zuHu8/961af03314a1308f9deedd301a007fe4/image3-14.png" />
            
            </figure>
    <div>
      <h2>What’s next?</h2>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>As we begin executing, you’ll notice that each product will slowly become more and more similar as we unlock features for each platform until they’re ready to be one such as git integration for your Workers and a config file for your Pages projects!</p><p>Keep an eye out on <a href="https://twitter.com/CloudflareDev">Twitter</a> to hear about the newest capabilities and more on what’s to come in every milestone.</p>
    <div>
      <h2>Have thoughts?</h2>
      <a href="#have-thoughts">
        
      </a>
    </div>
    <p>Of course, we wouldn’t be able to build an amazing platform without first listening to the voice of our community. In fact, <a href="https://docs.google.com/forms/d/1I48UoUpCH6GS1pkZJ_B0W-lTXqn1LeoHp8ILJlRo5dY/viewform?edit_requested=true">we’ve put together a survey</a> to collect more information about our users and receive input on what you’d like to see. If you have a few minutes, you can fill it out or reach out to us on the <a href="https://discord.com/invite/cloudflaredev">Cloudflare Developers Discord</a> or <a href="https://twitter.com/cloudflaredev">Twitter @CloudflareDev</a>.</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Developers]]></category>
            <guid isPermaLink="false">13ljyrS4VKTddHw6qlhWyw</guid>
            <dc:creator>Nevi Shah</dc:creator>
            <dc:creator>Natalie Rogers</dc:creator>
        </item>
        <item>
            <title><![CDATA[Spice up your sites on Cloudflare Pages with Pages Functions General Availability]]></title>
            <link>https://blog.cloudflare.com/pages-function-goes-ga/</link>
            <pubDate>Thu, 17 Nov 2022 14:05:00 GMT</pubDate>
            <description><![CDATA[ Pages is officially a full stack platform with Pages Functions now Generally Available. Pages is harnessing the power and scalability of Workers and specializing them to align with the Pages developer experience. ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4Qt2PNf7dtFOmbvvzhQvnn/03e6c9de323ee7a011607e61c5443610/image2-37.png" />
            
            </figure><p>Before we launched Pages back in April 2021, we knew it would be the start of something magical – an experience that felt “just right”. We envisioned an experience so simple yet so smooth that <b><i>any developer</i></b> could ship a website in seconds and add more to it by using the rest of our Cloudflare ecosystem.</p><p>A few months later, when we announced that Pages was a full stack platform in November 2021, that vision became a reality. Creating a development platform for just static sites was not the end of our Pages story, and with Cloudflare Workers already a part of our ecosystem, we knew we were sitting on untapped potential. With the introduction of Pages Functions, we empowered developers to take any static site and easily add in dynamic content with the power of Cloudflare Workers.</p><p>In the last year since Functions has been in open beta, we dove into an exploration on what kinds of full stack capabilities developers are looking for on their projects – and set out to fine tune the Functions experience into what it is today.</p><p><b>We’re thrilled to announce that Pages Functions is now generally available!</b></p>
    <div>
      <h2>Functions recap</h2>
      <a href="#functions-recap">
        
      </a>
    </div>
    <p>Though called “Functions” in the context of Pages, these functions running on our Cloudflare network are Cloudflare Workers in “disguise”. Pages harnesses the power and scalability of Workers and specializes them to align with the Pages experience our users know and love.</p><p>With Functions you can dream up the possibilities of dynamic functionality to add to your site – integrate with storage solutions, connect to third party services, use server side rendering with your favorite full stack frameworks and more. As Pages Functions opens its doors to production traffic, let’s explore some of the exciting features we’ve improved and added on this release.</p>
    <div>
      <h2>The experience</h2>
      <a href="#the-experience">
        
      </a>
    </div>
    
    <div>
      <h3>Deploy with Git</h3>
      <a href="#deploy-with-git">
        
      </a>
    </div>
    <p>Love to code? We’ll handle the infrastructure, and leave you to it.</p><p>Simply write a JavaScript/Typescript Function and drop it into a <b>functions</b> directory by committing your code to your Git provider. Our lightning fast CI system will build your code and deploy it alongside your static assets.</p>
    <div>
      <h3>Directly upload your Functions</h3>
      <a href="#directly-upload-your-functions">
        
      </a>
    </div>
    <p>Prefer to handle the build yourself? Have a special git provider not yet supported on Pages? No problem! After dropping your Function in your <b>functions</b> folder, you can build with your preferred CI tooling and then upload your project to Pages to be deployed.</p>
    <div>
      <h3>Debug your Functions</h3>
      <a href="#debug-your-functions">
        
      </a>
    </div>
    <p>While in beta, we learned that you and your teams value visibility above all. As on Cloudflare Workers, we’ve built a simple way for you to watch your functions as it processes requests – the faster you can understand an issue the faster you can react.</p><p>You can now easily view logs for your Functions by “tailing” your logs. For basic information like outcome and request IP, you can navigate to the Pages dashboard to obtain relevant logs.</p><div></div><p>For more specific filters, you can use</p>
            <pre><code>wrangler pages deployment tail</code></pre>
            <p>to receive a live feed of console and exception logs for each request your Function receives.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1Bc7Zz0wMrVCuLV3Ll8RFN/e581f4cb24dc8c78f28346195d0cd789/image1-52.png" />
            
            </figure>
    <div>
      <h3>Get real time Functions metrics</h3>
      <a href="#get-real-time-functions-metrics">
        
      </a>
    </div>
    <p>In the dashboard, Pages aggregates data for your Functions in the form of request successes/error metrics and invocation status. You can refer to your metrics dashboard not only to better understand your usage on a per-project basis but also to get a pulse check on the health of your Functions by catching success/error volumes.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/20rgwkkI2erSSmySgkpdzV/8d1aba3bb5081816d1de891e28efb7eb/image4-20.png" />
            
            </figure>
    <div>
      <h3>Quickly integrate with the Cloudflare ecosystem</h3>
      <a href="#quickly-integrate-with-the-cloudflare-ecosystem">
        
      </a>
    </div>
    
    <div>
      <h4><b>Storage bindings</b></h4>
      <a href="#storage-bindings">
        
      </a>
    </div>
    <p>Want to go truly full stack? We know finding a storage solution that fits your needs and fits your ecosystem is not an easy task – but it doesn’t have to be!</p><p>With Functions, you can take advantage of our broad range of storage products including Workers KV, Durable Objects, R2, D1 and – very soon – <a href="https://developers.cloudflare.com/queues/">Queues</a> and <a href="https://developers.cloudflare.com/analytics/analytics-engine/">Workers Analytics Engine</a>! Simply create your namespace, bucket or database and add your binding in the Pages dashboard to get your full stack site up and running in just a few clicks.</p><p>From dropping in a quick comment system to rolling your own authentication to creating database-backed <a href="https://www.cloudflare.com/ecommerce/">eCommerce sites</a>, integrating with existing products in our developer platform unlocks an exponential set of use cases for your site.</p>
    <div>
      <h4><b>Secret bindings</b></h4>
      <a href="#secret-bindings">
        
      </a>
    </div>
    <p>In addition to adding environment variables that are available to your project at both build-time and runtime, you can now also add “secrets” to your project. These are encrypted environment variables which cannot be viewed by any dashboard interfaces, and are a great home for sensitive data like API tokens or passwords.</p>
    <div>
      <h3>Integrate with 3rd party services</h3>
      <a href="#integrate-with-3rd-party-services">
        
      </a>
    </div>
    <p>Our goal with Pages is always to meet you where you are when it comes to the tools you love to use. During this beta period we also noticed some consistent patterns in how you were employing Functions to integrate with common third party services. <a href="https://developers.cloudflare.com/pages/platform/functions/plugins/">Pages Plugins</a> – our ready-made snippets of code – offers a plug and play experience for you to build the ecosystem of your choice around your application.</p><p>In essence, a Pages Plugin is a reusable – and customizable – chunk of runtime code that can be incorporated anywhere within your Pages application. It’s a “composable” Pages Function, granting Plugins the full power of Functions (i.e. Workers), including the ability to set up middleware, parameterized routes, and static assets.</p><p>With Pages Plugins you can integrate with a plethora of 3rd party applications – including officially supported <a href="https://developers.cloudflare.com/pages/platform/functions/plugins/sentry/">Sentry</a>, <a href="https://developers.cloudflare.com/pages/platform/functions/plugins/honeycomb/">Honeycomb</a>, <a href="https://developers.cloudflare.com/pages/platform/functions/plugins/stytch/">Stytch</a>, <a href="https://developers.cloudflare.com/pages/platform/functions/plugins/mailchannels/">MailChannels</a> and more.</p>
    <div>
      <h3>Use your favorite full stack frameworks</h3>
      <a href="#use-your-favorite-full-stack-frameworks">
        
      </a>
    </div>
    <p>In the spirit of meeting developers where they are at, this sentiment also comes in the form of Javascript frameworks. As a big supporter of not only widely adopted frameworks but up and coming frameworks, our team works with a plethora of framework authors to create opportunities for you to play with their new tech and deploy on Pages right out of the box.</p>
    <div>
      <h4>Now compatible with Next.js 13 and more!</h4>
      <a href="#now-compatible-with-next-js-13-and-more">
        
      </a>
    </div>
    <p>Recently, we announced our <a href="/next-on-pages/">support for Next.js applications</a> which opt in to the Edge Runtime. Today we’re excited to announce we are now compatible with Next.js 13. Next.js 13 brings some most-requested modern paradigms to the Next.js framework, including nested routing, React 18's Server Components and streaming.</p><p>Have a different preference of framework? No problem.</p><p>Go full stack on Pages to take advantage of server side rendering (SSR) with one of many other officially supported frameworks like <a href="https://remix.run/">Remix</a>, <a href="https://kit.svelte.dev/">SvelteKit</a>, <a href="https://qwik.builder.io/qwikcity/overview/">QwikCity,</a> <a href="https://start.solidjs.com/getting-started/what-is-solidstart">SolidStart</a>, <a href="https://astro.build/">Astro</a> and <a href="https://nuxtjs.org/">Nuxt</a>. You can <a href="/pages-full-stack-frameworks">check out our blog post on SSR support on Pages</a> and how to get started with some of these frameworks.</p>
    <div>
      <h3>Go fast in advanced mode</h3>
      <a href="#go-fast-in-advanced-mode">
        
      </a>
    </div>
    <p>While Pages Functions are powered by Workers, we understand that at face-value they are not exactly the same. Nevertheless, for existing users who are perhaps using Workers and are keen on trying Cloudflare Pages, we’ve <a href="https://developers.cloudflare.com/pages/platform/functions/advanced-mode/">got a direct path</a> to get you started quickly.</p><p>If you already have a single Worker and want an easy way to go full stack on Pages, you can use Pages Function’s “advanced mode”. Generate an <a href="https://developers.cloudflare.com/workers/runtime-apis/fetch-event/#syntax-module-worker">ES module Worker</a> called <code>_worker.js</code> in the output directory of your project and deploy!This can be especially helpful if you’re a framework author or perhaps have a more complex use case that does not fit into our file-based router.</p>
    <div>
      <h2>Scaling without limits</h2>
      <a href="#scaling-without-limits">
        
      </a>
    </div>
    <p>So today, as we announce Functions as generally available we are thrilled to allow your traffic to scale. During the Open Beta period, we imposed a daily limit of 100,000 free requests per day as a way to let you try out the feature. While 100,000 requests per day remains the free limit today, you can now pay to truly go unlimited.</p><p>Since Functions are just “special” Workers, with this announcement you will begin to see your Functions usage reflected on your bill under the Workers Paid subscription or via your Workers Enterprise contract. Like Workers, when on a paid plan, you have the option to choose between our two usage models – Bundled and Unbound – and will be billed accordingly.</p><p>Keeping Pages on brand as Cloudflare’s “gift to the Internet”, you will get unlimited free static asset requests and will be billed primarily on dynamic requests. You can <a href="https://developers.cloudflare.com/pages/platform/functions/pricing/">read more</a> about how billing with Functions works in our documentation.</p>
    <div>
      <h2>Get started today</h2>
      <a href="#get-started-today">
        
      </a>
    </div>
    <p>To start jamming, head over to the <a href="https://developers.cloudflare.com/pages/platform/functions/">Pages Functions docs</a> and <a href="/pages-full-stack-frameworks">check out our blog</a> on some of the best frameworks to use to deploy your first full stack application. As you begin building out your projects be sure to let us know in the <a href="https://discord.com/channels/595317990191398933/910978223968518144">#functions channel</a> under Pages of our <a href="https://discord.gg/cloudflaredev">Cloudflare Developers Discord</a>. Happy building!</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Cloudflare Pages]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Full Stack]]></category>
            <category><![CDATA[JAMstack]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[Developers]]></category>
            <guid isPermaLink="false">0qAOpwZHFx8u2Lq0PKf8c</guid>
            <dc:creator>Nevi Shah</dc:creator>
        </item>
        <item>
            <title><![CDATA[UPDATE Supercloud SET status = 'open alpha' WHERE product = 'D1';]]></title>
            <link>https://blog.cloudflare.com/d1-open-alpha/</link>
            <pubDate>Wed, 16 Nov 2022 14:01:00 GMT</pubDate>
            <description><![CDATA[ As we continue down the road to making D1 production ready, it wouldn’t be “the Cloudflare way” unless we stopped for feedback first. D1 is now in Open Alpha! ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7w9UvQOVgrNbxPrz1tOWJz/611cdc1253d0c6971709f5dddacc0811/image1-48.png" />
            
            </figure><p>In May 2022, we <a href="/introducing-d1/">announced</a> our quest to simplify databases – building them, maintaining them, integrating them. Our goal is to empower you with the tools to run a database that is <a href="https://www.cloudflare.com/developer-platform/products/d1/">powerful, scalable, with world-beating performance</a> without any hassle. And we first set our sights on reimagining the database development experience for every type of user – not just database experts.</p><p>Over the past couple of months, we’ve <a href="/whats-new-with-d1/">been working</a> to create just that, while learning some very important lessons along the way. As it turns out, building a global relational database product on top of Workers pushes the boundaries of the developer platform to their absolute limit, and often beyond them, but in a way that’s absolutely thrilling to us at Cloudflare. It means that while our progress might seem slow from outside, every improvement, bug fix or stress test helps lay down a path for <i>all</i> of our customers to build the world’s most <a href="/welcome-to-the-supercloud-and-developer-week-2022/">ambitious serverless application</a>.</p><p>However, as we continue down the road to making D1 production ready, it wouldn’t be “the Cloudflare way” unless we stopped for feedback first – even though it’s not <i>quite</i> finished yet. In the spirit of Developer Week, <b>there is no better time to introduce the D1 open alpha</b>!</p><p>An “open alpha” is a new concept for us. You'll likely hear the term “open beta” on various announcements at Cloudflare, and while it makes sense for many products here, it wasn’t quite right for D1. There are still some crucial pieces that are still in active development and testing, so before we release the fully-formed D1 as a public beta for you to start building real-world apps with, we want to make sure everybody can start to get a feel for the product on their hobby apps or side-projects.</p>
    <div>
      <h2>What’s included in the alpha?</h2>
      <a href="#whats-included-in-the-alpha">
        
      </a>
    </div>
    <p>While a lot is still changing behind the scenes with D1, we’ve put a lot of thought into how you, as a developer, interact with it – even if you’re new to databases.</p>
    <div>
      <h3>Using the D1 dashboard</h3>
      <a href="#using-the-d1-dashboard">
        
      </a>
    </div>
    <p>In a few clicks you can get your D1 database up and running right from within your dashboard. In our D1 interface, you can create, maintain and view your database as you please. Changes made in the UI are instantly available to your Worker - no redeploy required!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6vOzmnP9cvUYbJanSvprvl/b4a01d4edcc3dcada5a326e352b5f0e2/image2-30.png" />
            
            </figure>
    <div>
      <h3>Use Wrangler</h3>
      <a href="#use-wrangler">
        
      </a>
    </div>
    <p>If you’re looking to get your hands a little dirty, you can also work with your database using our Wrangler CLI. Create your database and begin adding your data manually or bootstrap your database with one of two ways:</p><p><b>1.  Execute an SQL file</b></p>
            <pre><code>$ wrangler d1 execute my-database-name --file ./customers.sql</code></pre>
            <p>where your <code>.sql</code> file looks something like this:</p><p>customers.sql</p>
            <pre><code>DROP TABLE IF EXISTS Customers;
CREATE TABLE Customers (CustomerID INT, CompanyName TEXT, ContactName TEXT, PRIMARY KEY (`CustomerID`));
INSERT INTO Customers (CustomerID, CompanyName, ContactName) 
VALUES (1, 'Alfreds Futterkiste', 'Maria Anders'),(4, 'Around the Horn', 'Thomas Hardy'),(11, 'Bs Beverages', 'Victoria Ashworth'),(13, 'Bs Beverages', 'Random Name');</code></pre>
            <p><b>2. Create and run migrations</b></p><p>Migrations are a way to version your database changes. With D1, you can <a href="https://developers.cloudflare.com/d1/migrations/">create a migration</a> and then apply it to your database.</p><p>To create the migration, execute:</p>
            <pre><code>wrangler d1 migrations create &lt;my-database-name&gt; &lt;short description of migration&gt;</code></pre>
            <p>This will create an SQL file in a <code>migrations</code> folder where you can then go ahead and add your queries. Then apply the migrations to your database by executing:</p>
            <pre><code>wrangler d1 migrations apply &lt;my-database-name&gt;</code></pre>
            
    <div>
      <h3>Access D1 from within your Worker</h3>
      <a href="#access-d1-from-within-your-worker">
        
      </a>
    </div>
    <p>You can attach your D1 to a Worker by adding the D1 binding to your <code>wrangler.toml</code> configuration file. Then interact with D1 by executing queries inside your Worker like so:</p>
            <pre><code>export default {
 async fetch(request, env) {
   const { pathname } = new URL(request.url);

   if (pathname === "/api/beverages") {
     const { results } = await env.DB.prepare(
       "SELECT * FROM Customers WHERE CompanyName = ?"
     )
       .bind("Bs Beverages")
       .all();
     return Response.json(results);
   }

   return new Response("Call /api/beverages to see Bs Beverages customers");
 },
};</code></pre>
            
    <div>
      <h3>Or access D1 from within your Pages Function</h3>
      <a href="#or-access-d1-from-within-your-pages-function">
        
      </a>
    </div>
    <p>In this Alpha launch, D1 also supports integration with <a href="https://pages.cloudflare.com/">Cloudflare Pages</a>! You can add a D1 binding inside the Pages dashboard, and write your queries inside a Pages Function to build a full-stack application! Check out the <a href="https://developers.cloudflare.com/pages/platform/functions/bindings/#d1-database">full documentation</a> to get started with Pages and D1.</p>
    <div>
      <h2>Community built tooling</h2>
      <a href="#community-built-tooling">
        
      </a>
    </div>
    <p>During our private alpha period, the excitement behind D1 led to some valuable contributions to the D1 ecosystem and developer experience by members of the community. Here are some of our favorite projects to date:</p>
    <div>
      <h3>d1-orm</h3>
      <a href="#d1-orm">
        
      </a>
    </div>
    <p>An Object Relational Mapping (ORM) is a way for you to query and manipulate data by using JavaScript. Created by a Cloudflare Discord Community Champion, the <code>d1-orm</code> seeks to provide a strictly typed experience while using D1:</p>
            <pre><code>const users = new Model(
    // table name, primary keys, indexes etc
    tableDefinition,
    // column types, default values, nullable etc
    columnDefinitions
)

// TS helper for typed queries
type User = Infer&lt;type of users&gt;;

// ORM-style query builder
const user = await users.First({
    where: {
        id: 1,
    },
});</code></pre>
            <p>You can check out the <a href="https://docs.interactions.rest/d1-orm/">full documentation</a>, and provide feedback by making an issue on the <a href="https://github.com/Interactions-as-a-Service/d1-orm/issues">GitHub repository</a>.</p>
    <div>
      <h3>workers-qb</h3>
      <a href="#workers-qb">
        
      </a>
    </div>
    <p>This is a zero-dependency query builder that provides a simple standardized interface while keeping the benefits and speed of using raw queries over a traditional ORM. While not intended to provide ORM-like functionality, <code>workers-qb</code> makes it easier to interact with the database from code for direct SQL access:</p>
            <pre><code>const qb = new D1QB(env.DB)

const fetched = await qb.fetchOne({
  tableName: 'employees',
  fields: 'count(*) as count',
  where: {
    conditions: 'department = ?1',
    params: ['HQ'],
  },
})</code></pre>
            <p>You can read more about the query builder <a href="https://workers-qb.massadas.com/">here</a>.</p>
    <div>
      <h3>d1-console</h3>
      <a href="#d1-console">
        
      </a>
    </div>
    <p>Instead of running the <code>wrangler d1 execute</code> command in your terminal every time you want to interact with your database, you can interact with D1 from within the <code>d1-console</code>. Created by a Discord Community Champion, this gives the benefit of executing multi-line queries, obtaining command history, and viewing a cleanly formatted table output.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4QR9Tf5DXnp3brBVvlvgJq/7f5b5083198492190dfc9f24e4fb70e0/image3-23.png" />
            
            </figure><p>While this is a community project today, we plan to natively support a “D1 Console” in the future. For now, get started by checking out the <code>d1-console</code> package <a href="https://github.com/isaac-mcfadyen/d1-console">here</a>.</p>
    <div>
      <h3>D1 adapter for <a href="https://github.com/koskimas/kysely">Kysely</a></h3>
      <a href="#d1-adapter-for">
        
      </a>
    </div>
    <p>Kysely is a type-safe and autocompletion-friendly typescript SQL query builder. With this adapter you can interact with D1 with the familiar Kysely interface:</p>
            <pre><code>// Create Kysely instance with kysely-d1
const db = new Kysely&lt;Database&gt;({ 
  dialect: new D1Dialect({ database: env.DB })
});
    
// Read row from D1 table
const result = await db
  .selectFrom('kv')
  .selectAll()
  .where('key', '=', key)
  .executeTakeFirst();</code></pre>
            <p>Check out the project <a href="https://github.com/aidenwallis/kysely-d1">here</a>.</p>
    <div>
      <h2>What’s still in testing?</h2>
      <a href="#whats-still-in-testing">
        
      </a>
    </div>
    <p>The biggest pieces that have been disabled for this alpha release are replication and JavaScript transaction support. While we’ll be rolling out these changes gradually, we want to call out some limitations that exist today that we’re actively working on testing:</p><ul><li><p><b>Database location:</b> Each D1 database only runs a single instance. It’s created close to where you, as the developer, create the database, and does not currently move regions based on access patterns. Workers running elsewhere in the world will see higher latency as a result.</p></li><li><p><b>Concurrency limitations:</b> Under high load, read and write queries may be queued rather than triggering new replicas to be created. As a result, the performance &amp; throughput characteristics of the open alpha won’t be representative of the final product.</p></li><li><p><b>Availability limitations:</b> Backups will block access to the DB while they’re running. In most cases this should only be a second or two, and any requests that arrive during the backup will be queued.</p></li></ul><p>You can also check out a more detailed, up-to-date list on <a href="https://developers.cloudflare.com/d1/platform/limits/">D1 alpha Limitations</a>.</p>
    <div>
      <h2>Request for feedback</h2>
      <a href="#request-for-feedback">
        
      </a>
    </div>
    <p>While we can make all sorts of guesses and bets on the kind of databases you want to use D1 for, we are not the users – you are! We want developers from all backgrounds to preview the D1 tech at its early stages, and let us know where we need to improve to make it suitable for your production apps.</p><p>For general feedback about your experience and to interact with other folks in the alpha, join our <a href="https://discord.com/channels/595317990191398933/992060581832032316">#d1-open-alpha</a> channel in the <a href="https://discord.gg/cloudflaredev">Cloudflare Developers Discord</a>. We plan to make any important announcements and changes in this channel as well as on our <a href="https://discord.com/channels/595317990191398933/832698219824807956">monthly community calls</a>.</p><p>To file more specific feature requests (no matter how wacky) and report any bugs, create a thread in the <a href="https://community.cloudflare.com/c/developers/d1">Cloudflare Community forum</a> under the D1 category. We will be maintaining this forum as a way to plan for the months ahead!</p>
    <div>
      <h2>Get started</h2>
      <a href="#get-started">
        
      </a>
    </div>
    <p>Want to get started right away? Check out our <a href="https://developers.cloudflare.com/d1/">D1 documentation</a> to get started today. <a href="https://github.com/cloudflare/d1-northwind">Build</a> our classic <a href="https://northwind.d1sql.com/">Northwind Traders demo</a> to explore the D1 experience and deploy your first D1 database!</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Database]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Supercloud]]></category>
            <category><![CDATA[D1]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">1rFO7pAwS1HGnsa6rhrIXa</guid>
            <dc:creator>Nevi Shah</dc:creator>
            <dc:creator>Glen Maddern</dc:creator>
            <dc:creator>Sven Sauleau</dc:creator>
        </item>
        <item>
            <title><![CDATA[D1: our quest to simplify databases]]></title>
            <link>https://blog.cloudflare.com/whats-new-with-d1/</link>
            <pubDate>Tue, 27 Sep 2022 13:00:00 GMT</pubDate>
            <description><![CDATA[ Get an inside look on the D1 experience today, what the team is currently working on and what’s coming up!  ]]></description>
            <content:encoded><![CDATA[ <p><i></i></p><p><i>This blog post references a feature which has updated documentation. For the latest reference content, visit </i><a href="https://developers.cloudflare.com/d1/best-practices/read-replication/"><i>D1 read replication documentation</i></a><i>.</i></p><p>When we announced D1 in May of this year, we knew it would be the start of something new – our first SQL database with Cloudflare Workers. Prior to D1 we’ve announced storage options like KV (key-value store), Durable Objects (single location, strongly consistent data storage) and <a href="https://www.cloudflare.com/learning/cloud/what-is-blob-storage/">R2 (blob storage)</a>. But the question always remained “How can I store and query relational data without latency concerns and an easy API?”</p><p>The long awaited “Cloudflare Database'' was the true missing piece to build your application <b>entirely</b> on Cloudflare’s global network, going from a blank canvas in VSCode to a full stack application in seconds. Compatible with the popular SQLite API, D1 empowers developers to build out their databases without getting bogged down by complexity and having to manage every underlying layer.</p><p>Since our launch announcement in May and private beta in June, we’ve made great strides in building out our vision of a <a href="https://www.cloudflare.com/developer-platform/products/d1/">serverless database</a>. With D1 still in <a href="https://www.cloudflare.com/lp/d1/">private beta</a> but an open beta on the horizon, we’re excited to show and tell our journey of building D1 and what’s to come.</p>
    <div>
      <h2>The D1 Experience</h2>
      <a href="#the-d1-experience">
        
      </a>
    </div>
    <p>We knew from Cloudflare Workers feedback that using Wrangler as the mechanism to create and deploy applications is loved and preferred by many. That’s why when <a href="/10-things-i-love-about-wrangler/">Wrangler 2.0</a> was announced this past May alongside D1, we took advantage of the new and improved CLI for every part of the experience from data creation to every update and iteration. Let’s take a quick look on how to get set up in a few easy steps.</p>
    <div>
      <h3>Create your database</h3>
      <a href="#create-your-database">
        
      </a>
    </div>
    <p>With the latest version of <a href="https://github.com/cloudflare/wrangler2">Wrangler</a> installed, you can create an initialized empty database with a quick</p><p><code>npx wrangler d1 create my_database_name</code></p><p>To get your database up and running! Now it’s time to add your data.</p>
    <div>
      <h3>Bootstrap it</h3>
      <a href="#bootstrap-it">
        
      </a>
    </div>
    <p>It wouldn’t be the “Cloudflare way” if you had to sit through an agonizingly long process to get set up. So we made it easy and painless to bring your existing data from an old database and bootstrap your new D1 database.  You can run</p><p><code>wrangler d1 execute my_database-name --file ./filename.sql</code></p><p>and pass through an existing SQLite .sql file of your choice. Your database is now ready for action.</p>
    <div>
      <h3>Develop &amp; Test Locally</h3>
      <a href="#develop-test-locally">
        
      </a>
    </div>
    <p>With all the improvements we’ve made to Wrangler since version 2 launched <a href="/wrangler-v2-beta/">a few months ago</a>, we’re pleased to report that D1 has full remote &amp; local wrangler dev support:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7JRGM62yWrL3h7BKLhj5Jf/6d324ce4a2b19691ef4ec39095d2e43b/image2-43.png" />
            
            </figure><p>When running <code>wrangler dev -–local -–persist</code>, an SQLite file will be created inside <code>.wrangler/state</code>. You can then use a local GUI program for managing it, like SQLiteFlow (<a href="https://www.sqliteflow.com/">https://www.sqliteflow.com/</a>) or Beekeeper (<a href="https://www.beekeeperstudio.io/">https://www.beekeeperstudio.io/</a>).</p><p>Or you can simply use SQLite directly with the SQLite command line by running <code>sqlite3 .wrangler/state/d1/DB.sqlite3</code>:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7wSVzsxnFxKpJDbF5pO4hs/89aab6231071b6cd8cc657a9fd2bd24b/image6-8.png" />
            
            </figure>
    <div>
      <h3>Automatic backups &amp; one-click restore</h3>
      <a href="#automatic-backups-one-click-restore">
        
      </a>
    </div>
    <p>No matter how much you test your changes, sometimes things don’t always go according to plan. But with Wrangler you can create a backup of your data, view your list of backups or restore your database from an existing backup. In fact, during the beta, we’re taking backups of your data every hour automatically and storing them in R2, so you will have the option to rollback if needed.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7BgC81NRBtxLJAl4Gf09oz/03084ab36894c484675f0ec7e58e9462/image1-53.png" />
            
            </figure><p>And the best part – if you want to use a production snapshot for local development or to reproduce a bug, simply copy it into the .wrangler/state directory and <code>wrangler dev –-local –-persist</code> will pick it up!</p><p>Let’s download a D1 backup to our local disk. It’s SQLite compatible.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4lGMre56aSosKozuHmITRD/51b282602897ed9af9d0813461f81732/image4-14.png" />
            
            </figure><p>Now let’s run our D1 worker locally, from the backup.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4t10c5k7VKcT2tF4CjW9Dw/eb5ba21817f6a38b1d1f450d6e2e2c3a/image5-16.png" />
            
            </figure>
    <div>
      <h3>Create and Manage from the dashboard</h3>
      <a href="#create-and-manage-from-the-dashboard">
        
      </a>
    </div>
    <p>However, we realize that CLIs are not everyone’s jam. In fact, we believe databases should be accessible to every kind of developer – even those without much database experience! D1 is available right from the Cloudflare dashboard giving you near total command parity with Wrangler in just a few clicks. Bootstrapping your database, creating tables, updating your database, viewing tables and triggering backups are all accessible right at your fingertips.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2mXkO7uRDs4lVvgjm8VC4r/c32f96a738980294dfea5db7f2ea8794/image3-32.png" />
            
            </figure><p>Changes made in the UI are instantly available to your Worker — no deploy required!</p><p>We’ve told you about some of the improvements we’ve landed since we first announced D1, but as always, we also wanted to give you a small taste (with some technical details) of what’s ahead. One really important functionality of a database is transactions — something D1 wouldn’t be complete without.</p>
    <div>
      <h2>Sneak peek: how we're bringing JavaScript transactions to D1</h2>
      <a href="#sneak-peek-how-were-bringing-javascript-transactions-to-d1">
        
      </a>
    </div>
    <p>With D1, we strive to present a dramatically simplified interface to creating and querying relational data, which for the most part is a good thing. But simplification occasionally introduces drawbacks, where a use-case is no longer easily supported without introducing some new concepts. D1 transactions are one example.</p>
    <div>
      <h3>Transactions are a unique challenge</h3>
      <a href="#transactions-are-a-unique-challenge">
        
      </a>
    </div>
    <p>You don't need to specify where a Cloudflare Worker or a D1 database run—they simply run everywhere they need to. For Workers, that is as close as possible to the users that are hitting your site right this second. For D1 today, we don't try to run a copy in every location worldwide, but dynamically manage the number and location of read-only replicas based on how many queries your database is getting, and from where. However, for queries that make changes to a database (which we generally call "writes" for short), they all have to travel back to the single Primary D1 instance to do their work, to ensure consistency.</p><p>But what if you need to do a series of updates at once? While you can send multiple SQL queries with <code>.batch()</code> (which does in fact use database transactions under the hood), it's likely that, at some point, you'll want to interleave database queries &amp; JS code in a single unit of work.</p><p>This is exactly what database transactions were invented for, but if you try running <code>BEGIN TRANSACTION</code> in D1 you'll get an error. Let's talk about why that is.</p><p><b>Why native transactions don't work</b>The problem arises from SQL statements and JavaScript code running in dramatically different places—your SQL executes inside your D1 database (primary for writes, nearest replica for reads), but your Worker is running near the user, which might be on the other side of the world. And because D1 is built on SQLite, only one write transaction can be open at once. Meaning that, if we permitted <code>BEGIN TRANSACTION</code>, any one Worker request, anywhere in the world, could effectively block your whole database! This is a quite dangerous thing to allow:</p><ul><li><p>A Worker could start a transaction then crash due to a software bug, without calling <code>ROLLBACK</code>. The primary would be blocked, waiting for more commands from a Worker that would never come (until, probably, some timeout).</p></li><li><p>Even without bugs or crashes, transactions that require multiple round-trips between JavaScript and SQL could end up blocking your whole system for multiple seconds, dramatically limiting how high an application built with Workers &amp; D1 could scale.</p></li></ul><p>But allowing a developer to define transactions that mix both SQL and JavaScript makes building applications with Workers &amp; D1 so much more flexible and powerful. We need a new solution (or, in our case, a new version of an old solution).</p><p><b>A way forward: stored procedures</b>Stored procedures are snippets of code that are uploaded to the database, to be executed directly next to the data. Which, at first blush, sounds exactly like what we want.</p><p>However, in practice, stored procedures in traditional databases are notoriously frustrating to work with, as anyone who's developed a system making heavy use of them will tell you:</p><ul><li><p>They're often written in a different language to the rest of your application. They're usually written in (a specific dialect of) SQL or an embedded language like Tcl/Perl/Python. And while it's technically possible to write them in JavaScript (using an embedded V8 engine), they run in such a different environment to your application code it still requires significant context-switching to maintain them.</p></li><li><p>Having both application code and in-database code affects every part of the development lifecycle, from authoring, testing, deployment, rollbacks and debugging. But because stored procedures are usually introduced to solve a specific problem, not as a general purpose application layer, they're often managed completely manually. You can end up with them being written once, added to the database, then never changed for fear of breaking something.</p></li></ul><p>With D1, we can do better.</p><p>The <i>point</i> of a stored procedure was to execute directly next to the data—uploading the code and executing it inside the database was simply a means to that end. But we're using Workers, a global JavaScript execution platform, can we use them to solve this problem?</p><p>It turns out, absolutely! But here we have a few options of exactly how to make it work, and we're working with our private beta users to find the right <a href="https://www.cloudflare.com/learning/security/api/what-is-an-api/">API</a>. In this section, I'd like to share with you our current leading proposal, and invite you all to give us your feedback.</p><p>When you connect a Worker project to a D1 database, you add the section like the following to your <code>wrangler.toml</code>:</p>
            <pre><code>[[ d1_databases ]]
# What binding name to use (e.g. env.DB):
binding = "DB"
# The name of the DB (used for wrangler d1 commands):
database_name = "my-d1-database"
# The D1's ID for deployment:
database_id = "48a4224e-...3b09"
# Which D1 to use for `wrangler dev`:
# (can be the same as the previous line)
preview_database_id = "48a4224e-...3b09"

# NEW: adding "procedures", pointing to a new JS file:
procedures = "./src/db/procedures.js"</code></pre>
            <p>That D1 Procedures file would contain the following (note the new <code>db.transaction()</code> API, that is only available within a file like this):</p>
            <pre><code>export default class Procedures {
  constructor(db, env, ctx) {
    this.db = db
  }

  // any methods you define here are available on env.DB.Procedures
  // inside your Worker
  async Checkout(cartId: number) {
    // Inside a Procedure, we have a new db.transaction() API
    const result = await this.db.transaction(async (txn) =&gt; {
      
      // Transaction has begun: we know the user can't add anything to
      // their cart while these actions are in progress.
      const [cart, user] = Helpers.loadCartAndUser(cartId)

      // We can update the DB first, knowing that if any of the later steps
      // fail, all these changes will be undone.
      await this.db
        .prepare(`UPDATE cart SET status = ?1 WHERE cart_id = ?2`)
        .bind('purchased', cartId)
        .run()
      const newBalance = user.balance - cart.total_cost
      await this.db
        .prepare(`UPDATE user SET balance = ?1 WHERE user_id = ?2`)
        // Note: the DB may have a CHECK to guarantee 'user.balance' can not
        // be negative. In that case, this statement may fail, an exception
        // will be thrown, and the transaction will be rolled back.
        .bind(newBalance, cart.user_id)
        .run()

      // Once all the DB changes have been applied, attempt the payment:
      const { ok, details } = await PaymentAPI.processPayment(
        user.payment_method_id,
        cart.total_cost
      )
      if (!ok) {
        // If we throw an Exception, the transaction will be rolled back
        // and result.error will be populated:
        // throw new PaymentFailedError(details)
        
        // Alternatively, we can do both of those steps explicitly
        await txn.rollback()
        // The transaction is rolled back, our DB is now as it was when we
        // started. We can either move on and try something new, or just exit.
        return { error: new PaymentFailedError(details) }
      }

      // This is implicitly called when the .transaction() block finishes,
      // but you can explicitly call it too (potentially committing multiple
      // times in a single db.transaction() block).
      await txn.commit()

      // Anything we return here will be returned by the 
      // db.transaction() block
      return {
        amount_charged: cart.total_cost,
        remaining_balance: newBalance,
      }
    })

    if (result.error) {
      // Our db.transaction block returned an error or threw an exception.
    }

    // We're still in the Procedure, but the Transaction is complete and
    // the DB is available for other writes. We can either do more work
    // here (start another transaction?) or return a response to our Worker.
    return result
  }
}</code></pre>
            <p>And in your Worker, your DB binding now has a “Procedures” property with your function names available:</p>
            <pre><code>const { error, amount_charged, remaining_balance } =
  await env.DB.Procedures.Checkout(params.cartId)

if (error) {
  // Something went wrong, `error` has details
} else {
  // Display `amount_charged` and `remaining_balance` to the user.
}</code></pre>
            <p>Multiple Procedures can be triggered at one time, but only one <code>db.transaction()</code> function can be active at once: any other write queries or other transaction blocks will be queued, but all read queries will continue to hit local replicas and run as normal. This API gives you the ability to ensure consistency when it’s essential but with the minimal impact on total overall performance worldwide.</p>
    <div>
      <h3>Request for feedback</h3>
      <a href="#request-for-feedback">
        
      </a>
    </div>
    <p>As with all our products, feedback from our users drives the roadmap and development. While the D1 API is in beta testing today, we're still seeking feedback on the specifics. However, we’re pleased that it solves both the problems with transactions that are specific to D1 and the problems with stored procedures described earlier:</p><ul><li><p>Code is executing as close as possible to the database, removing network latency while a transaction is open.</p></li><li><p>Any exceptions or cancellations of a transaction cause an instant rollback—there is no way to accidentally leave one open and block the whole D1 instance.</p></li><li><p>The code is in the same language as the rest of your Worker code, in the exact same dialect (e.g. same TypeScript config as it's part of the same build).</p></li><li><p>It's deployed seamlessly as part of your Worker. If two Workers bind to the same D1 instance but define different procedures, they'll only see their own code. If you want to share code between projects or databases, extract a library as you would with any other shared code.</p></li><li><p>In local development and test, the procedure works just like it does in production, but without the network call, allowing seamless testing and debugging as if it was a local function.</p></li><li><p>Because procedures and the Worker that define them are treated as a single unit, rolling back to an earlier version never causes a skew between the code in the database and the code in the Worker.</p></li></ul>
    <div>
      <h2>The D1 ecosystem: contributions from the community</h2>
      <a href="#the-d1-ecosystem-contributions-from-the-community">
        
      </a>
    </div>
    <p>We've told you about what we've been up to and what's ahead, but one of the unique things about this project is all the contributions from our users. One of our favorite parts of private betas is not only getting feedback and feature requests, but also seeing what ideas and projects come to fruition. While sometimes this means personal projects, with D1, we’re seeing some incredible contributions to the D1 ecosystem. Needless to say, the work on D1 hasn’t just been coming from within the D1 team, but also from the wider community and other developers at Cloudflare. Users have been showing off their D1 additions within our Discord private beta channel and giving others the opportunity to use them as well. We wanted to take a moment to highlight them.</p>
    <div>
      <h3>workers-qb</h3>
      <a href="#workers-qb">
        
      </a>
    </div>
    <p>Dealing with raw SQL syntax is powerful (and using the D1 .bind() API, safe against <a href="https://www.cloudflare.com/learning/security/threats/how-to-prevent-sql-injection/">SQL injections</a>) but it can be a little clumsy. On the other hand, most existing query builders assume direct access to the underlying DB, and so aren’t suitable to use with D1. So Cloudflare developer Gabriel Massadas designed a small, zero-dependency query builder called <code>workers-qb</code>:</p>
            <pre><code>import { D1QB } from 'workers-qb'
const qb = new D1QB(env.DB)

const fetched = await qb.fetchOne({
    tableName: "employees",
    fields: "count(*) as count",
    where: {
      conditions: "active = ?1",
      params: [true]
    },
})</code></pre>
            <p>Check out the project homepage for more information: <a href="https://workers-qb.massadas.com/">https://workers-qb.massadas.com/</a>.</p>
    <div>
      <h3>D1 console</h3>
      <a href="#d1-console">
        
      </a>
    </div>
    <p>While you can interact with D1 through both Wrangler and the dashboard, Cloudflare Community champion, Isaac McFadyen created the very first D1 console where you can quickly execute a series of queries right through your terminal. With the D1 console, you don’t need to spend time writing the various Wrangler commands we’ve created – just execute your queries.</p><p>This includes all bells and whistles you would expect from a modern database console including multiline input, command history, validation for things D1 may not yet support, and ability to save your Cloudflare credentials for later use.</p><p>Check out the full project on <a href="https://github.com/isaac-mcfadyen/d1-console">GitHub</a> or <a href="https://www.npmjs.com/package/d1-console">NPM</a> for more information.</p>
    <div>
      <h3>Miniflare test Integration</h3>
      <a href="#miniflare-test-integration">
        
      </a>
    </div>
    <p>The <a href="https://miniflare.dev/">Miniflare project,</a> which powers Wrangler’s local development experience, also provides fully-fledged test environments for popular JavaScript test runners, <a href="https://miniflare.dev/testing/jest">Jest</a> and <a href="https://miniflare.dev/testing/vitest">Vitest</a>. With this comes the concept of <a href="https://miniflare.dev/testing/jest#isolated-storage"><i>Isolated Storage</i></a>, allowing each test to run independently, so that changes made in one don’t affect the others. Brendan Coll, creator of Miniflare, guided the D1 test implementation to give the same benefits:</p>
            <pre><code>import Worker from ‘../src/index.ts’
const { DB } = getMiniflareBindings();

beforeAll(async () =&gt; {
  // Your D1 starts completely empty, so first you must create tables
  // or restore from a schema.sql file.
  await DB.exec(`CREATE TABLE entries (id INTEGER PRIMARY KEY, value TEXT)`);
});

// Each describe block &amp; each test gets its own view of the data.
describe(‘with an empty DB’, () =&gt; {
  it(‘should report 0 entries’, async () =&gt; {
    await Worker.fetch(...)
  })
  it(‘should allow new entries’, async () =&gt; {
    await Worker.fetch(...)
  })
])

// Use beforeAll &amp; beforeEach inside describe blocks to set up particular DB states for a set of tests
describe(‘with two entries in the DB’, () =&gt; {
  beforeEach(async () =&gt; {
    await DB.prepare(`INSERT INTO entries (value) VALUES (?), (?)`)
            .bind(‘aaa’, ‘bbb’)
            .run()
  })
  // Now, all tests will run with a DB with those two values
  it(‘should report 2 entries’, async () =&gt; {
    await Worker.fetch(...)
  })
  it(‘should not allow duplicate entries’, async () =&gt; {
    await Worker.fetch(...)
  })
])</code></pre>
            <p>All the databases for tests are run in-memory, so these are lightning fast. And fast, reliable testing is a big part of building maintainable real-world apps, so we’re thrilled to extend that to D1.</p>
    <div>
      <h2>Want access to the private beta?</h2>
      <a href="#want-access-to-the-private-beta">
        
      </a>
    </div>
    <p>Feeling inspired?</p><p>We love to see what our beta users build or want to build especially when our products are at an early stage. As we march toward an open beta, we’ll be looking specifically for your feedback. We are slowly letting more folks into the beta, but if you haven’t received your “golden ticket” yet with access, sign up <a href="https://www.cloudflare.com/lp/d1/">here</a>! Once you’ve been invited in, you’ll receive an official welcome email.</p><p>As always, happy building!</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Database]]></category>
            <category><![CDATA[D1]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">nODp0eoC5szCr7aW59sde</guid>
            <dc:creator>Nevi Shah</dc:creator>
            <dc:creator>Glen Maddern</dc:creator>
        </item>
        <item>
            <title><![CDATA[Build your next big idea with Cloudflare Pages]]></title>
            <link>https://blog.cloudflare.com/big-ideas-on-pages/</link>
            <pubDate>Fri, 05 Aug 2022 16:30:00 GMT</pubDate>
            <description><![CDATA[ We believe every developer deserves to dream big without breaking the bank. That's why on Cloudflare Pages you can get unlimited requests, bandwidth, seats and projects --- for free! ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Have you ever had a surge of inspiration for a project? That feeling when you have a great idea – a big idea — that you just can’t shake? When all you can think about is putting your hands to your keyboard and hacking away? Building a website takes courage, creativity, passion and drive, and with <a href="/cloudflare-pages-ga/">Cloudflare Pages</a> we believe nothing should stand in the way of that vision.</p><p><b>Especially not a price tag.</b></p>
    <div>
      <h3>Big ideas</h3>
      <a href="#big-ideas">
        
      </a>
    </div>
    <p>We built Pages to be at the center of your developer experience – a way for you to get started right away without worrying about the heavy lift of setting up a fullstack app.  A quick commit to your git provider or direct upload to our platform, and your rich and powerful site is deployed to our <a href="/mid-2022-new-cities/">network of 270+ data centers in <b>seconds</b></a>. And above all, we built Pages to scale with you as you grow exponentially without getting hit by an unexpected bill.</p>
    <div>
      <h3>The limit does not exist</h3>
      <a href="#the-limit-does-not-exist">
        
      </a>
    </div>
    <p>We’re a platform that’s invested in your vision – no matter how wacky and wild (the best ones usually are!). That’s why for many parts of Pages we want your experience to be <i>limitless</i>.</p><p><b>Unlimited requests</b>: As your idea grows, so does your traffic. While thousands and millions of end users flock to your site, Pages is prepared to handle all of your traffic with no extra cost to you – even when millions turn to <i>billions.</i></p><p><b>Unlimited bandwidth:</b> As your traffic grows, you’ll need more bandwidth – and with Pages, we got you. If your site takes off in popularity one day, the next day shouldn’t be a cause for panic because of a nasty bill. It should be a day of celebration and pride. We’re giving unlimited bandwidth so you can keep your eyes focused on moving up and to the right.</p><p><b>Unlimited free seats:</b> With a rise in demand for your app, you’re going to need more folks working with you. We know from experience that more great ideas don’t just come from one person but a strong team of people. We want to be there every step of the way along with every person you want on this journey with you. Just because your team grows doesn’t mean your bill has to.</p><p><b>Unlimited projects</b>: With one great idea, means many more to follow. With Pages, you can deploy as many projects as you want – keep them coming! Not every idea is going to be the right one – we know this! Prove out your vision in private org-owned repos for free! Try out a plethora of development frameworks until you’ve found the perfect combination for your idea. Test your changes locally using our <a href="/wrangler-v2-beta/">Wrangler integration</a> so you can be confident in whatever you choose to put out into the world.</p>
    <div>
      <h3>Quick, easy and free integrations</h3>
      <a href="#quick-easy-and-free-integrations">
        
      </a>
    </div>
    <p><b>Workers:</b> Take your idea from static to dynamic with Pages’ native <a href="https://developers.cloudflare.com/pages/platform/functions/">integration with Cloudflare Workers</a>, our serverless functions offering. Drop your functions into your <b>functions</b> folder and deploy them alongside your static assets no extra configuration required! We announced <a href="/cloudflare-pages-goes-full-stack/">built-in support for Cloudflare Workers</a> back in November and have since announced framework integrations with Remix, Sveltekit and Qwik, and are working on fullstack support for Next.js within the year!</p><p><b>Cloudflare Access:</b> Working with more than just a team of developers? Send your staging changes to product managers and marketing teams with a unique preview URL for every deployment. And what’s more? You can enable protection for your preview links using our native integration with <a href="https://www.cloudflare.com/products/zero-trust/access/">Cloudflare Access</a> at no additional cost. With one click, send around your latest version without fear of getting into the wrong hands.</p><p><b>Custom domains:</b> With every Pages project, get a free <code>pages.dev</code> subdomain to deploy your project under. When you’re ready for the big day, with built in <a href="https://www.cloudflare.com/ssl-for-saas-providers/">SSL for SaaS</a>, bring that idea to life with a custom domain of its own!</p><p><b>Web Analytics:</b> When launch day comes around, check out just how well it’s going with our deep, privacy-first integration with <a href="https://www.cloudflare.com/web-analytics/">Cloudflare’s Web Analytics</a>. Track every single one of your sites’ progress and performance, including metrics about your traffic and core web vitals with just one click – completely on us!</p>
    <div>
      <h3>Wicked fast performance</h3>
      <a href="#wicked-fast-performance">
        
      </a>
    </div>
    <p>And the best part? Our generous free tier never means compromising <a href="/cloudflare-pages-is-lightning-fast/">site performance</a>. Bring your site closer to your users on your first deployment no matter where they are in the world. The Cloudflare network spans across 270+ cities around the globe and your site is distributed to each of them faster than you can say “it’s go time”. There’s also no need to choose regions for your deployments, we want you to have them all and get even more granular, so your big idea can truly go global.</p>
    <div>
      <h3>What else?</h3>
      <a href="#what-else">
        
      </a>
    </div>
    <p>Building on Pages is just the start of what your idea could grow to become. In the coming months you can expect deep integrations with our new Cloudflare storage offerings like <a href="https://www.cloudflare.com/developer-platform/products/r2/">R2</a>, our <a href="https://www.cloudflare.com/learning/cloud/what-is-object-storage/">object storage</a> service with zero <a href="https://www.cloudflare.com/learning/cloud/what-are-data-egress-fees/">egress fees</a> (open beta), and <a href="/introducing-d1/">D1</a> our first SQL database on the edge (private beta).</p><p>We’ve talked a lot about building your entire platform on Cloudflare. We’re reimagining this experience to be even easier and even more powerful.</p><p>Using just Cloudflare, you’ll be able to build big projects – like an entire store! You can use R2 to host the images, D1 to store product info, inventory data and user details, and Pages to seamlessly build and deploy. A frictionless dev experience for a full stack app that can live and work entirely from the edge. Best of all, don’t worry about getting hung up on cost, we’ll always have a generous free tier so you can get started right away.</p><p>At Cloudflare, we believe that every developer deserves to dream big. For the developers who love to build, who are curious, who explore, let us take you there – no surprises! Leave the security and scalability to us, so you can put your fingers to the keyboard and do what you do best!</p>
    <div>
      <h3>Give it a go</h3>
      <a href="#give-it-a-go">
        
      </a>
    </div>
    <p><a href="https://pages.cloudflare.com/">Learn more about Pages</a> and check out our <a href="https://developers.cloudflare.com/pages">developer documentation</a>. Be sure to join our active <a href="https://discord.com/invite/cloudflaredev">Cloudflare Developer Discord</a> and meet our community of developers building on our platform. You can chat directly with our product and engineering teams and get exclusive access to our offered betas!</p> ]]></content:encoded>
            <category><![CDATA[Cloudflare Pages]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Edge]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[Developers]]></category>
            <guid isPermaLink="false">5gp6Zu82o0DkQgrDq0pKHK</guid>
            <dc:creator>Nevi Shah</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing Pages Plugins]]></title>
            <link>https://blog.cloudflare.com/cloudflare-pages-plugins/</link>
            <pubDate>Thu, 12 May 2022 12:58:49 GMT</pubDate>
            <description><![CDATA[ Introducing Pages Plugins – reusable and customizable chunks of runtime code that can be incorporated anywhere within your Pages application. Try one of the officially supported Plugins from our partners or build your own ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Last November, we <a href="/cloudflare-pages-goes-full-stack/">announced</a> that Pages is now a full-stack development platform with our open beta integration with Cloudflare Workers. Using file-based routing, you can drop your Pages Functions into a <code>/functions</code> folder and deploy them alongside your static assets to add dynamic functionality to your site. However, throughout this beta period, we observed the types of projects users have been building, noticed some common patterns, and identified ways to make these users more efficient.</p><p>There are certain functionalities that are shared between projects; for example, validating authorization headers, creating an API server, reporting errors, and integrating with third-party vendors to track aspects like performance. The frequent need for these patterns across projects made us wonder, “What if we could provide the ready-made code for developers to add to their existing project?”</p><p>Introducing Pages Plugins!</p>
    <div>
      <h2>What’s a Pages Plugin?</h2>
      <a href="#whats-a-pages-plugin">
        
      </a>
    </div>
    <p>With <a href="/cloudflare-pages-goes-full-stack/">Pages Functions</a>, we introduced file-based routing, so users could avoid writing their own routing logic, significantly reducing the amount of boilerplate code a typical application requires. Pages Plugins aims to offer a similar experience!</p><p>A Pages Plugin is a reusable – and customizable – chunk of runtime code that can be incorporated anywhere within your Pages application. A Plugin is effectively a composable Pages Function, granting Plugins the full power of Functions (and therefore, Workers), including the ability to set up middleware, parameterized routes, and static assets.</p>
    <div>
      <h2>How does it work?</h2>
      <a href="#how-does-it-work">
        
      </a>
    </div>
    <p>Today, Pages Plugins is launching with a couple of ready-made solutions for Sentry, Honeycomb, and Stytch (more below), but it’s important to note that developers anywhere can create and share their Pages Plugins, too! You just need to install a Plugin, mount it to a route within the <code>/functions</code> directory, and configure the Plugin according to its needs.</p><p>Let’s take a look at a Plugins example for a hypothetical ACME logger:</p><p>Assume you find an <code>@acme/pages-plugin-logger</code> package on npm and want to use it within your application – you’d install, import, and invoke it as you would any other npm module. After passing through the required (hypothetical) configuration and mounting it as the top-level middleware’s <code>onRequest</code> export, the ACME logger will be reporting on all incoming requests:</p>
            <pre><code>// file: /functions/_middleware.ts

import MyLogger from "@acme/pages-plugin-logger";

// Setup logging for all URL routes &amp; methods
export const onRequest = MyLogger({
 endpoint: "https://logs.acme.com/new",
 secret: "password",
});</code></pre>
            <p>You can help grow the Plugins ecosystem by building and sharing your Plugins on <a href="https://www.npmjs.com/">npm</a> and our <a href="https://developers.cloudflare.com/pages/platform/functions/plugins/community-plugins/">developer documentation</a>, and you can immediately get started by using one of Cloudflare’s official launch partner Plugins today.</p>
    <div>
      <h2>Introducing our Plugins launch partners</h2>
      <a href="#introducing-our-plugins-launch-partners">
        
      </a>
    </div>
    <p>With Pages, we’re always working to see how we can best cater to user workflows by integrating directly with users’ preferred tools. We see Plugins as an excellent opportunity to collaborate with popular third-party observability, monitoring, and authentication providers to provide their own Pages Plugins.</p><p>Today, we’re proud to launch our Pages Plugins with <a href="https://sentry.io/welcome/">Sentry</a>, <a href="https://www.honeycomb.io/">Honeycomb</a> and <a href="https://stytch.com/">Stytch</a> as official partners!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6UfnNcBSdnluYtxgQIpI4v/943ae59eecd5d8705836d705ae2ceaf7/image2-22.png" />
            
            </figure>
    <div>
      <h3><a href="https://sentry.io/welcome/">Sentry</a></h3>
      <a href="#">
        
      </a>
    </div>
    <p><a href="http://sentry.io/">Sentry</a> provides developer-first application monitoring for real-time insights into your production deployments. With Sentry you can see the errors, crashes, or latencies experienced while using your app and get the deep context needed to solve issues quickly, like the line of code where the error occurred, the developer or commit that introduced the error, or the API call or database query causing the slowdown. The <a href="https://developers.cloudflare.com/pages/platform/functions/plugins/sentry">Sentry Plugin</a> automatically captures any exceptions in your Pages Functions and sends them to Sentry where you can aggregate, analyze, and triage any issues your application encounters.</p>
            <pre><code>// ./functions/_middleware.ts

import sentryPlugin from "@cloudflare/pages-plugin-sentry";

export const onRequest = sentryPlugin({
 dsn: "YOUR_SENTRY_DSN",
});</code></pre>
            
    <div>
      <h3><a href="https://www.honeycomb.io/">Honeycomb</a></h3>
      <a href="#">
        
      </a>
    </div>
    <p>Similarly, Honeycomb is also an observability and monitoring platform meant to visualize, analyze and improve application quality and performance to help you find patterns and outliers in your application data. The <a href="https://developers.cloudflare.com/pages/platform/functions/plugins/honeycomb">Honeycomb Plugin</a> creates traces for every request that your Pages application receives and automatically sends that information to Honeycomb for analysis.</p>
            <pre><code>// ./functions/_middleware.ts

import honeycombPlugin from "@cloudflare/pages-plugin-honeycomb";

export const onRequest = honeycombPlugin({
 apiKey: "YOUR_HONEYCOMB_API_KEY",
 dataset: "YOUR_HONEYCOMB_DATASET_NAME",
});</code></pre>
            
    <div>
      <h3><a href="https://stytch.com/?utm_source=cloudflare&amp;utm_medium=blog">Stytch</a></h3>
      <a href="#">
        
      </a>
    </div>
    <p>Observability is just one use case of how Pages Plugins can help you build a more powerful app. Stytch is an API-first platform that improves security and promotes a better user experience with <a href="https://www.cloudflare.com/learning/security/threats/what-is-passwordless-authentication/">passwordless authentication</a>. Our <a href="https://developers.cloudflare.com/pages/platform/functions/plugins/stytch">Stytch Plugin</a> transparently validates user sessions, allowing you to easily protect parts of your application behind a Stytch login.</p>
            <pre><code>// ./functions/_middleware.ts

import stytchPlugin from "@cloudflare/pages-plugin-stytch";
import { envs } from "@cloudflare/pages-plugin-stytch/api";

export const onRequest = stytchPlugin({
  project_id: "YOUR_STYTCH_PROJECT_ID",
  secret: "YOUR_STYTCH_PROJECT_SECRET",
  env: envs.live
});</code></pre>
            
    <div>
      <h2>More Plugins, more fun!</h2>
      <a href="#more-plugins-more-fun">
        
      </a>
    </div>
    <p>As a developer platform, it’s crucial to build relationships with the creators of the tooling and frameworks you use alongside Pages, and we look forward to growing our partnership ecosystem even more in the future. However, beyond partnerships, we realize there are some more extremely useful Plugins that we built out to get you started!</p><ul><li><p><b>Google Chat:</b> creates a Google Chat bot which can respond to messages. It also includes an API for interacting with Google Chat (for example, for creating messages) without the need for user input. This API is useful for situations such as alerts.</p></li><li><p><b>Cloudflare Access:</b> a middleware to validate Cloudflare Access JWT assertions. It also includes an API to lookup additional information about a given user's JSON Web Token.</p></li><li><p><b>Static forms</b>: intercepts static HTML form submissions and can perform actions such as storing the data in KV.</p></li><li><p><b>GraphQL</b>: creates a GraphQL API for a given schema. It also ships with <a href="https://github.com/graphql/graphql-playground">the GraphQL Playground</a> to simplify development and help you test out your API.</p></li></ul><p>Over the next couple of months we will be working to build out some of the most requested Plugins relevant to your projects. For now, you can find all officially supported Plugins in our <a href="https://developers.cloudflare.com/pages/platform/functions/plugins/">developer documentation</a>.</p>
    <div>
      <h2>No time to wait? Author your own!</h2>
      <a href="#no-time-to-wait-author-your-own">
        
      </a>
    </div>
    <p>But don’t let us be your bottleneck! The beauty of Plugins is how easy they are to create and distribute. In fact, we <b>encourage</b> you to try out our <a href="https://developers.cloudflare.com/pages/platform/functions/plugins/">documentation</a> in order to create and share your own Plugin because chances are if you’re building a Plugin for your own project, there is someone else who would benefit greatly from it too!</p><p>We're excited to see Plugins from the community solving their own common use-cases or as integrations with their favorite platforms. Once you’ve built a Plugin, you can surface your work if you choose by creating a PR against <a href="https://developers.cloudflare.com/pages/platform/functions/plugins/community-plugins/">the Community Plugins page in our documentation</a>. This way any Pages user can read about your Plugin and mount it in their own Pages application.</p>
    <div>
      <h2>What’s next for Pages Functions</h2>
      <a href="#whats-next-for-pages-functions">
        
      </a>
    </div>
    <p>As you try out Plugins and take advantage of our Functions offering, it’s important to note there are some truly exciting updates coming soon. As we march toward the Functions general availability launch, we will provide proper analytics and logging, so you can have better insight into your site’s performance and visibility into issues for debugging. Additionally, with R2 now in open beta, and <a href="https://www.cloudflare.com/developer-platform/products/d1/">D1</a> in the works, we’re excited to provide support for R2 and D1 bindings for your full stack Pages projects soon!</p><p>Of course, because Functions is still in open beta, we currently offer 100k requests per day for free, however, as we aim for general availability of Functions, you can expect a billing model similar to the <a href="https://developers.cloudflare.com/workers/platform/pricing/">Workers Paid</a> billing model.</p>
    <div>
      <h2>Share what you build</h2>
      <a href="#share-what-you-build">
        
      </a>
    </div>
    <p>While you begin building out your Plugin, be sure to reach out to us in our <a href="https://discord.gg/cloudflaredev">Cloudflare Developers Discord server</a> in the #pages-plugins channel. We’d love to see what you’re building and help you along the way!</p> ]]></content:encoded>
            <category><![CDATA[Platform Week]]></category>
            <category><![CDATA[Cloudflare Pages]]></category>
            <guid isPermaLink="false">sT8hM1mh7oDHKdzzd3F4R</guid>
            <dc:creator>Nevi Shah</dc:creator>
            <dc:creator>Greg Brimble</dc:creator>
        </item>
        <item>
            <title><![CDATA[A new era for Cloudflare Pages builds]]></title>
            <link>https://blog.cloudflare.com/cloudflare-pages-build-improvements/</link>
            <pubDate>Tue, 10 May 2022 13:01:10 GMT</pubDate>
            <description><![CDATA[ Announcing several build experience improvements for Cloudflare Pages including build times, logging and configuration ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Music is flowing through your headphones. Your hands are flying across the keyboard. You’re stringing together a masterpiece of code. The momentum is building up as you put on the finishing touches of your project. And at last, it’s ready for the world to see. Heart pounding with excitement and the feeling of victory, you push changes to the main branch…. only to end up waiting for the build to execute each step and spit out the build logs.</p>
    <div>
      <h2>Starting afresh</h2>
      <a href="#starting-afresh">
        
      </a>
    </div>
    <p>Since the launch of Cloudflare Pages, there is no doubt that the build experience has been its biggest source of criticism. From the amount of waiting to inflexibility of CI workflow, Pages had a lot of opportunity for growth and improvement. With Pages, our North Star has always been designing a developer platform that fits right into your workflow and oozes simplicity. User pain points have been and always will be our priority, which is why today we are thrilled to share a list of exciting updates to our build times, logs and settings!</p><p>Over the last three quarters, we implemented a new build infrastructure that speeds up Pages builds, so you can iterate quickly and efficiently. In February, we soft released the Pages Fast Builds Beta, allowing you to opt in to this new infrastructure on a per-project basis. This not only allowed us to test our implementation, but also gave our community the opportunity to try it out and give us direct feedback in <a href="https://discord.gg/cloudflaredev">Discord</a>. Today we are excited to announce the new build infrastructure is now generally available and automatically enabled for all existing and new projects!</p>
    <div>
      <h2>Faster build times</h2>
      <a href="#faster-build-times">
        
      </a>
    </div>
    <p>As a developer, your time is extremely valuable, and we realize Pages builds were slow. It was obvious that creating an infrastructure that built projects faster and smarter was one of our top requirements.</p><p>Looking at a Pages build, there are four main steps: (1) initializing the build environment, (2) cloning your git repository, (3) building the application, and (4) deploying to Cloudflare’s global network. Each of these steps is a crucial part of the build process, and upon investigating areas suitable for optimization, we directed our efforts to cutting down on build initialization time.</p><p>In our old infrastructure, every time a build job was submitted, we created a new virtual machine to run that build, costing our users precious dev time. In our new infrastructure, we start jobs on machines that are ready and waiting to be used, taking a major chunk of time away from the build initialization step. This step previously ran for 2+ minutes, but with our new infrastructure update, projects are expected to see a build initialization time cut down to <b>2-3 SECONDS</b>.</p><p>This means less time waiting and more time iterating on your code.</p>
    <div>
      <h3>Fast and secure</h3>
      <a href="#fast-and-secure">
        
      </a>
    </div>
    <p>In our old build infrastructure, because we spun up a new virtual machine (VM) for every build, it would take several minutes to boot up and initialize with the Pages build image needed to execute the build. Alternatively, one could reuse a collection of VMs, assigning a new build to the next available VM, but containers share a kernel with the host operating system, making them far less isolated, posing a huge security risk. This could allow a malicious actor to perform a "container escape" to break out of their sandbox. We wanted the best of both worlds: the speed of a container with the isolation of a virtual machine.</p><p>Enter <a href="https://gvisor.dev/">gVisor</a>, a container sandboxing technology that drastically limits the attack surface of a host. In the new infrastructure, each container running with gVisor is given its own independent application "kernel,” instead of directly sharing the kernel with its host. Then, to address the speed, we keep a cluster of virtual machines warm and ready to execute builds so that when a new Pages deployment is triggered, it takes just a few seconds for a new gVisor container to start up and begin executing meaningful work in a secure sandbox with near native performance.</p>
    <div>
      <h2>Stream your build logs</h2>
      <a href="#stream-your-build-logs">
        
      </a>
    </div>
    <p>After we solidified a fast and secure build, we wanted to enhance the user facing build experience. Because a build may not be successful every time, providing you with the tools you need to debug and access that information as fast as possible is crucial. While we have a long list of future improvements for a better logging experience, today we are starting by enabling you to stream your build logs.</p><p>Prior to today, with the aforementioned build steps required to complete a Pages build, you were required to wait until the build completed in order to view the resulting build logs. Easily addressable issues like incorrectly inputting the build command or specifying an environment variable would have required waiting for the entire build to finish before understanding the problem.</p><p>Today, we’re giving you the power to understand your build issues as soon as they happen. Spend less time waiting for your logs and start debugging the events of your builds within a second or less after they happen!</p><div></div>
<p></p>
    <div>
      <h2>Control Branch Builds</h2>
      <a href="#control-branch-builds">
        
      </a>
    </div>
    <p>Finally, the build experience does not just include the events during execution but everything leading up to the trigger of a build. For our final trick, we’re enabling our users to have full control of the precise branches they’d like to include and exclude for automatic deployments.</p><p>Before today, Pages submitted builds for every commit in both production and preview environments, which led to queued builds and even more waiting if you exceeded your concurrent build limit. We wanted to provide even more flexibility to control your CI workflow. Now you can configure your build settings to specify branches to build, as well as skip ad hoc commits.</p>
    <div>
      <h3>Specify branches to build</h3>
      <a href="#specify-branches-to-build">
        
      </a>
    </div>
    <p>While “unlimited staging” is one of Pages’ greatest advantages, depending on your setup, sometimes automatic deployments to the preview environment can cause extra noise.</p><p>In the Pages build configuration setting, you can specify automatic deployments to be turned off for the production environment, the preview environment, or specific preview branches. In a more extreme case, you can even pause all deployments so that any commit sent to your git source will not trigger a new Pages build.</p><p>Additionally, in your project’s settings, you can now configure the specific Preview branches you would like to include and exclude for automatic deployments. To make this configuration an even more powerful tool, you can use wildcard syntax to set rules for existing branches as well as any newly created preview branches.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7fw9Ltufs0OqoXuByAcKdD/8e871205590c8270f36eb33627a13ae9/image1-15.png" />
            
            </figure><p><a href="https://developers.cloudflare.com/pages/platform/branch-build-controls/">Read more in our Pages docs</a> on how to get started with configuring automatic deployments with Wildcard Syntax.</p>
    <div>
      <h3>Using CI Skip</h3>
      <a href="#using-ci-skip">
        
      </a>
    </div>
    <p>Sometimes commits need to be skipped on an ad hoc basis. A small update to copy or a set of changes within a small timespan don’t always require an entire site rebuild. That’s why we also implemented a CI Skip command for your commit message, signaling to Pages that the update should be skipped by our builder.</p><p>With both CI Skip and configured build rules, you can keep track of your site changes in Pages’ deployment history.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Nm9Zxx2FDkDz1OAvBq3OE/d349e0628a51eed8036b81db1cadf21d/image2-10.png" />
            
            </figure>
    <div>
      <h2>Where we’re going</h2>
      <a href="#where-were-going">
        
      </a>
    </div>
    <p>We’re extremely excited to bring these updates to you today, but of course, this is only the beginning of improving our build experience. Over the next few quarters, we will be bringing more to the build experience to create a seamless developer journey from site inception to launch.</p>
    <div>
      <h3>Incremental builds and caching</h3>
      <a href="#incremental-builds-and-caching">
        
      </a>
    </div>
    <p>From beta testing, we noticed that our new infrastructure can be less impactful on larger projects that use heavier frameworks such as Gatsby. We believe that every user on our developer platform, regardless of their use case, has the right to fast builds. Up next, we will be implementing incremental builds to help Pages identify only the deltas between commits and rebuild only files that were directly updated. We will also be implementing other caching strategies such as caching external dependencies to save time on subsequent builds.</p>
    <div>
      <h3>Build image updates</h3>
      <a href="#build-image-updates">
        
      </a>
    </div>
    <p>Because we’ve been using the same build image we launched Pages with back in 2021, we are going to make some major updates. Languages release new versions all the time, and we want to make sure we update and maintain the latest versions. An updated build image will mean faster builds, more security and of course supporting all the latest versions of languages and tools we provide. With new build image versions being released, we will allow users to opt in to the updated builds in order to maintain compatibility with all existing projects.</p>
    <div>
      <h3>Productive error messaging</h3>
      <a href="#productive-error-messaging">
        
      </a>
    </div>
    <p>Lastly, while streaming build logs helps you to identify those easily addressable issues, the infamous “Internal error occurred” is sometimes a little more cryptic to decipher depending on the failure. While we recently published a “<a href="https://developers.cloudflare.com/pages/platform/debugging-pages/">Debugging Cloudflare Pages</a>” guide, in the future we’d like to provide the error feedback in a more productive manner, so you can easily identify the issue.</p>
    <div>
      <h2>Have feedback?</h2>
      <a href="#have-feedback">
        
      </a>
    </div>
    <p>As always, your feedback defines our roadmap. With all the updates we’ve made to our build experience, it’s important we hear from you! You can get in touch with our team directly through <a href="https://discord.gg/cloudflaredev">Discord</a>. Navigate to our Pages specific section and check out our various channels specific to different parts of the product!</p>
    <div>
      <h3>Join us at Cloudflare Connect!</h3>
      <a href="#join-us-at-cloudflare-connect">
        
      </a>
    </div>
    <p>Interested in learning more about building with Cloudflare Pages? If you’re based in the New York City area, join us on Thursday, May 12th for a series of workshops on how to build a full stack application on Pages! Follow along with a fully hands-on lab, featuring Pages in conjunction with other products like Workers, Images and Cloudflare Gateway, and hear directly from our product managers. <a href="https://events.www.cloudflare.com/flow/cloudflare/connect2022nyc/landing/page/page">Register now</a>!</p> ]]></content:encoded>
            <category><![CDATA[Platform Week]]></category>
            <category><![CDATA[Cloudflare Pages]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Speed]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">2oh3ffXctAGXfS6sDKaqSB</guid>
            <dc:creator>Nevi Shah</dc:creator>
            <dc:creator>Josh Wheeler</dc:creator>
            <dc:creator>Jacob Hands</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing Direct Uploads for Cloudflare Pages]]></title>
            <link>https://blog.cloudflare.com/cloudflare-pages-direct-uploads/</link>
            <pubDate>Tue, 10 May 2022 13:01:06 GMT</pubDate>
            <description><![CDATA[ Pages now supports direct uploads to give you more power to build and iterate how you want and with the tools you want ]]></description>
            <content:encoded><![CDATA[ <p></p><p>With Pages, we are constantly looking for ways to improve the developer experience. One of the areas we are keen to focus on is removing any barriers to entry for our users regardless of their use case or existing set up. Pages is an all-in-one solution with an automated Continuous Integration (CI) pipeline to help you build and deploy your site with one commit to your projects’ repositories hosted on GitHub or GitLab.</p><p>However, we realize that this excluded repositories that used a source control provider that Pages didn’t yet support and required varying build complexities. Even though Pages continues to build first-class integrations – for example, we <a href="/cloudflare-pages-partners-with-gitlab/">added GitLab support</a> in November 2021 – there are numerous providers to choose from, some of which use `git` alternatives like <a href="https://subversion.apache.org/">SVN</a> or <a href="https://www.mercurial-scm.org/">Mercurial</a> for their version control systems. It’s also common for larger companies to self-host their project repositories, guarded by a mix of custom authentication and/or proxy protocols.</p><p>Pages needed a solution that worked regardless of the repository’s source location and accommodate build project’s complexity. Today, we’re thrilled to announce that Pages now supports direct uploads to give you more power to build and iterate how you want and with the tools you want.</p>
    <div>
      <h2>What are direct uploads?</h2>
      <a href="#what-are-direct-uploads">
        
      </a>
    </div>
    <p>Direct uploads enable you to push your build artifacts directly to Pages, side-stepping the automatic, done-for-you CI pipeline that Pages provides for GitHub and GitLab repositories. This means that connecting a Pages project to a git repository is optional. In fact, using git or any version control system is optional!</p><p>Today, you can bring your assets directly to Pages by dragging and dropping them into our dashboard or pushing them through Wrangler CLI. You also have the power to use your own CI tool whether that’s something like <a href="http://developers.cloudflare.com/pages/how-to/use-direct-upload-with-continuous-integration/">GitHub Actions or CircleCI</a> to handle your build. Taking your output directory you can bring these files directly to Pages to create a new project and all subsequent deployments after that. Every deployment will be distributed right to the Cloudflare network within seconds.</p>
    <div>
      <h2>How does it work?</h2>
      <a href="#how-does-it-work">
        
      </a>
    </div>
    <p>After using your preferred CI tooling outside of Pages, there are two ways to bring your pre-built assets and create a project with the direct uploads feature:</p><ol><li><p>Use the Wrangler CLI</p></li><li><p>Drag and drop them into the Pages interface</p></li></ol>
    <div>
      <h3>Wrangler CLI</h3>
      <a href="#wrangler-cli">
        
      </a>
    </div>
    <p>With an estimated 43k weekly Wrangler downloads, you too can use it to iterate quickly on your Pages projects right through the command line. With Wrangler (now with brand-new <a href="/10-things-I-love-about-wrangler">updates</a>!), you can both create your project and new deployments with a single command.</p><p>After Wrangler is installed and authenticated with your Cloudflare account, you can execute the following command to get your site up and running:</p>
            <pre><code>npx wrangler pages publish &lt;directory&gt;</code></pre>
            <div></div>
<p></p><p>Integration with Wrangler provides not only a great way to publish changes in a fast and consecutive manner, but also enables a seamless workflow between CI tooling for building right to Pages for deployment. Check out our tutorials on using <a href="http://developers.cloudflare.com/pages/how-to/use-direct-upload-with-continuous-integration/">CircleCI and GitHub Actions</a> with Pages!</p>
    <div>
      <h3>Drag and drop</h3>
      <a href="#drag-and-drop">
        
      </a>
    </div>
    <p>However, we realize that sometimes you just want to get your site deployed instantaneously without any additional set up or installations. In fact, getting started with Pages shouldn’t have to require extensive configuration. The drag and drop feature allows you to take your pre-built assets and virtually drag them onto the Pages UI. With either a zip file or a single folder of assets, you can watch your project deploy in just a few short seconds straight to the 270+ cities in our network.</p><div></div>
<p></p>
    <div>
      <h2>What can you build?</h2>
      <a href="#what-can-you-build">
        
      </a>
    </div>
    <p>With this ease of deploying projects, the possibilities of what you can build are still endless. You can enjoy the fruits of Pages in a project created with direct uploads including but not limited to unique preview URLs, integration with Workers, Access and Web Analytics, and custom redirects/headers.</p><p>In thinking about your developer setup, direct uploads provide the flexibility to build the way you want such as:</p><ul><li><p>Designing and building your own CI workflow</p></li><li><p>Utilizing the CI tooling of your choice</p></li><li><p>Accommodating complex monorepo structures</p></li><li><p>Implementing custom CI logic for your builds.</p></li></ul>
    <div>
      <h2>Migrating from Workers Sites</h2>
      <a href="#migrating-from-workers-sites">
        
      </a>
    </div>
    <p>We’ll have to admit, the idea of publishing assets directly to our network came from a sister product to Pages called <a href="/workers-sites/">Workers Sites</a> and the resemblance is striking! However, Pages affords many feature enhancements to the developer experience that show as a pain point on Workers Sites.</p><p>With Pages direct uploads, you can enjoy the freedom and flexibility of customizing your workflow that Workers Sites provides while including an interface to track and share changes and manage production/preview environments. <a href="https://developers.cloudflare.com/pages/migrations/migrating-from-workers/">Check out our tutorial</a> on how to migrate over from Workers Sites.</p><p>This release immediately unlocks a broad range of use cases, allowing the most basic of projects to the most advanced to start deploying their websites to Pages today. Refer to our <a href="https://developers.cloudflare.com/pages/platform/direct-upload/">developer documentation</a> for more technical details. As always, head over to the <a href="https://discord.gg/cloudflaredev">Cloudflare Developers Discord</a> server and let us know what you think in the #direct-uploads-beta channel.</p>
    <div>
      <h2>Join us at Cloudflare Connect!</h2>
      <a href="#join-us-at-cloudflare-connect">
        
      </a>
    </div>
    <p>Calling all New York City developers! If you’re interested in learning more about Cloudflare Pages, join us for a series of workshops on how to build a full stack application on Thursday, May 12th. Follow along with demonstrations of using Pages alongside other products like Workers, Images and Cloudflare Gateway, and hear directly from our product managers. <a href="https://events.www.cloudflare.com/flow/cloudflare/connect2022nyc/landing/page/page">Register now</a>!</p> ]]></content:encoded>
            <category><![CDATA[Platform Week]]></category>
            <category><![CDATA[Cloudflare Pages]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Wrangler]]></category>
            <guid isPermaLink="false">54zX3KuZvT6IeXghtXaDt6</guid>
            <dc:creator>Nevi Shah</dc:creator>
            <dc:creator>Greg Brimble</dc:creator>
            <dc:creator>John Fawcett</dc:creator>
            <dc:creator>Sid Chatterjee</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare Pages Goes Full Stack]]></title>
            <link>https://blog.cloudflare.com/cloudflare-pages-goes-full-stack/</link>
            <pubDate>Wed, 17 Nov 2021 13:59:32 GMT</pubDate>
            <description><![CDATA[ Cloudflare Pages with Functions is now in open beta! ]]></description>
            <content:encoded><![CDATA[ <p></p><p>When we announced Cloudflare Pages as <a href="/cloudflare-pages-ga/#:~:text=In%20December%2C%20we%20announced%20the,powerful%20tool%20in%20developers'%20hands.">generally available</a> in April, we promised you it was just the beginning. The journey of our platform started with support for static sites with small bits of dynamic functionality like setting <a href="/custom-headers-for-pages/">redirects and custom headers</a>. But we wanted to give even more power to you and your teams to begin building the unimaginable. We envisioned a future where your entire application — frontend, APIs, storage, data — could all be deployed with a single commit, easily testable in staging and requiring a single merge to deploy to production. So in the spirit of “Full Stack” Week, we’re bringing you the tools to do just that.</p><p>Welcome to the future, everyone. We’re thrilled to announce that Pages is now a Full Stack platform with help from <a href="https://workers.cloudflare.com/?&amp;_bt=521144407143&amp;_bk=&amp;_bm=b&amp;_bn=g&amp;_bg=123914288844&amp;_placement=&amp;_target=&amp;_loc=9067609&amp;_dv=c&amp;awsearchcpc=1&amp;gclid=Cj0KCQiAsqOMBhDFARIsAFBTN3eyQsvbPzy3y3BOeCnYZMDVjSd8QkaoPbOfFiFWxSK8zEm9lSCNAJsaAnfkEALw_wcB&amp;gclsrc=aw.ds">Cloudflare Workers</a>!</p>
    <div>
      <h2>But how?</h2>
      <a href="#but-how">
        
      </a>
    </div>
    <p>It works the exact same way Pages always has: write your code, <code>git push</code> to your git provider (<a href="/cloudflare-pages-partners-with-gitlab/">now supporting GitLab</a>!) and we’ll deploy your entire site for you. The only difference is, it won’t just be your frontend but your backend too using Cloudflare Workers to help deploy serverless functions.</p>
    <div>
      <h3>The integration you’ve been waiting for</h3>
      <a href="#the-integration-youve-been-waiting-for">
        
      </a>
    </div>
    <p>Cloudflare Workers provides a serverless execution environment that allows you to create entirely new applications or augment existing ones without configuring or maintaining infrastructure. Before today, it was <i>possible</i> to connect Workers to a Pages project—installing Wrangler and manually deploying a Worker by writing your app in both Pages and Workers. But we didn’t just want “possible”, we wanted something that came as second nature to you so you wouldn’t have to think twice about adding dynamic functionality to your site.</p>
    <div>
      <h2>How it works</h2>
      <a href="#how-it-works">
        
      </a>
    </div>
    <p>By using your repo’s filesystem convention and exporting one or more function handlers, Pages can leverage Workers to deploy serverless functions on your behalf. To begin, simply add a <code>./functions</code> directory in the root of your project, and inside a JavaScript or TypeScript file, export a function handler. For example, let’s say in your <code>./functions</code> directory, you have a file, <code>hello.js</code>, containing:</p>
            <pre><code>// GET requests to /filename would return "Hello, world!"
export const onRequestGet = () =&gt; {
  return new Response("Hello, world!")
}

// POST requests to /filename with a JSON-encoded body would return "Hello, &lt;name&gt;!"
export const onRequestPost = async ({ request }) =&gt; {
  const { name } = await request.json()
  return new Response(`Hello, ${name}!`)
}</code></pre>
            <p>If you perform a <code>git commit</code>, it will trigger a new Pages build to deploy your dynamic site! During the build pipeline, Pages traverses your directory, mapping the filenames to URLs relative to your repo structure.</p><p>Under the hood, Pages generates Workers which include all your routing and functionality from the source.  Functions supports deeply-nested routes, wildcard matching, middleware for things like authentication and error-handling, and more! To demonstrate all of its bells and whistles, we’ve created a blog post to walk through an <a href="/building-full-stack-with-pages">example full stack application</a>.</p>
    <div>
      <h2>Letting you do what you do best</h2>
      <a href="#letting-you-do-what-you-do-best">
        
      </a>
    </div>
    <p>As your site grows in complexity, with Pages’ new full stack functionality, your developer experience doesn’t have to. You can enjoy the workflow you know and love while unlocking even more depth to your site.</p>
    <div>
      <h3>Seamlessly build</h3>
      <a href="#seamlessly-build">
        
      </a>
    </div>
    <p>In the same way we’ve handled builds and deployments with your static sites — with a <code>git commit</code> and <code>git push</code> — we’ll deploy your functions for you automatically. As long as your directory follows the proper structure, Pages will identify and deploy your functions to our network with your site.</p>
    <div>
      <h3>Define your bindings</h3>
      <a href="#define-your-bindings">
        
      </a>
    </div>
    <p>While bringing your Workers to Pages, bindings are a big part of what makes your application a <b><i>full stack</i></b> application**.** We’re so excited to bring to Pages all the bindings you’ve previously used with regular Workers!</p><ul><li><p><b>KV namespace:</b> Our serverless and globally accessible key-value storage solution. Within Pages, you can integrate with any of the KV namespaces you set in your Workers dashboard for your Pages project.</p></li><li><p><b>Durable Object namespace:</b> Our strongly consistent coordination primitive that makes connecting WebSockets, handling state and building entire applications a breeze. As with KV, you can set your namespaces within the Workers dashboard and choose from that list within the Pages interface.</p></li><li><p><b>R2 (coming soon!):</b> Our <a href="https://www.cloudflare.com/developer-platform/solutions/s3-compatible-object-storage/">S3-compatible Object Storage solution</a> that’s slashing <a href="https://www.cloudflare.com/learning/cloud/what-are-data-egress-fees/">egress fees</a> to zero.</p></li><li><p><b>Environment Variable: </b> An injected value that can be accessed by your functions and is stored as plain-text. You can set your environment variables directly within the Pages interface for both your production and preview environments at build-time and run-time.</p></li><li><p><b>Secret (coming soon!): </b> An encrypted environment variable, which cannot be viewed by wrangler or any dashboard interfaces. Secrets are a great home for sensitive data including passwords and API tokens.</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6AIqWYs5VMYZhxNRAGoLvY/3b3c1572fba8a42b73f4712091d1c7a7/image2-15.png" />
            
            </figure>
    <div>
      <h3>Preview deployments — now for your backend too</h3>
      <a href="#preview-deployments-now-for-your-backend-too">
        
      </a>
    </div>
    <p>With the deployment of your serverless functions, you can still enjoy the ease of collaboration and testing like you did previously. Before you deploy to production, you can easily deploy your project to a preview environment to stage your changes. Even with your functions, Pages lets you keep a version history of every commit with a unique URL for each, making it easy to gather feedback whether it’s from a fellow developer, PM, designer or marketer! You can also enjoy the same infinite staging privileges that you did for static sites, with a consistent URL for the latest changes.</p>
    <div>
      <h3>Develop and preview locally too</h3>
      <a href="#develop-and-preview-locally-too">
        
      </a>
    </div>
    <p>However, we realize that building and deploying with every small change just to stage your changes can be cumbersome at times if you’re iterating quickly. You can now develop full stack Pages applications with the latest release of our wrangler CLI. Backed by Miniflare, you can run your entire application locally with support for mocked secrets, environment variables, and KV (Durable Objects support coming soon!). Point wrangler at a directory of static assets, or seamlessly connect to your existing tools:</p>
            <pre><code># Install wrangler v2 beta
npm install wrangler@beta

# Serve a folder of static assets
npx wrangler pages dev ./dist

# Or automatically proxy your existing tools
npx wrangler pages dev -- npx react-scripts start</code></pre>
            <p>This is just the beginning of Pages' integrations with wrangler. Stay tuned as we continue to enhance your developer experience.</p>
    <div>
      <h2>What else can you do?</h2>
      <a href="#what-else-can-you-do">
        
      </a>
    </div>
    <p>Everything you can do with HTTP Workers today!</p><p>When deploying a Pages application with functions, Pages is compiling and deploying first class Workers on your behalf. This means there is zero functionality loss when deploying a Worker within your Pages application — instead, there are only new benefits to be gained!</p>
    <div>
      <h3>Integrate with SvelteKit — out of the box!</h3>
      <a href="#integrate-with-sveltekit-out-of-the-box">
        
      </a>
    </div>
    <p><a href="https://github.com/sveltejs/kit">SvelteKit</a> is a web framework for building Svelte applications. It’s built and maintained by the Svelte team, which makes it the Svelte user’s go-to solution for all their application needs. Out of the box, SvelteKit allows users to build projects with complex API backends.</p><p>As of today, SvelteKit projects can attach and configure the <a href="https://github.com/sveltejs/kit"><code>@sveltejs/adapter-cloudflare</code></a> package. After doing this, the project can be added to Pages and is ready for its first deployment! With Pages, your SvelteKit project(s) can deploy with API endpoints and full server-side rendering support. Better yet, the entire project — including the API endpoints — can enjoy the benefits of preview deployments, too! This, even on its own, is a huge victory for advanced projects that were previously on the Workers adapter. Check out this <a href="http://github.com/lukeed/pages-fullstack">example to see the SvelteKit adapter</a> for Pages in action!</p>
    <div>
      <h3>Use server-side rendering</h3>
      <a href="#use-server-side-rendering">
        
      </a>
    </div>
    <p>You are now able to intercept any request that comes into your Pages project. This means that you can define Workers logic that will receive incoming URLs and, instead of serving static HTML, your Worker can render fresh HTML responses with dynamic data.</p><p>For example, an application with a product page can define a single <code>product/[id].js</code> file that will receive the <code>id</code> parameter, retrieve the product information from a Workers KV binding, and then generate an HTML response for that page. Compared to a static-site generator approach, this is more succinct and easier to maintain over time since you do not need to build a static HTML page <i>per product</i> at build-time… which may potentially be tens or even hundreds of thousands of pages!</p>
    <div>
      <h2>Already have a Worker? We’ve got you!</h2>
      <a href="#already-have-a-worker-weve-got-you">
        
      </a>
    </div>
    <p>If you already have a single Worker and want to bring it right on over to Pages to reap the developer experience benefits of our platform, our announcement today also enables you to do precisely that. Your build can generate an ES module Worker called <code>_worker.js</code> in the output directory of your project, perform your git commands to deploy, and we’ll take care of the rest! This can be especially advantageous to you if you’re a framework author or have a more complex use case that doesn’t follow our provided file structure.</p>
    <div>
      <h2>Try it at no cost — for a limited time only</h2>
      <a href="#try-it-at-no-cost-for-a-limited-time-only">
        
      </a>
    </div>
    <p>We’re thrilled to be releasing our open beta today for everyone to try at no additional cost to your Cloudflare plan. While we will still have <a href="https://developers.cloudflare.com/pages/platform/functions#pricing-and-limits">limits</a> in place, we are using this open beta period to learn more about how you and your teams are deploying functions with your Pages projects. For the time being, we encourage you to lean into your creativity and build out that site you’ve been thinking about for a long time — without the worry of getting billed.</p><p>In just a few short months, when we announce General Availability, you can expect our billing to reflect that of the Workers Bundled plan — after all, these are just Workers under the hood!</p>
    <div>
      <h2>Coming up…</h2>
      <a href="#coming-up">
        
      </a>
    </div>
    <p>As we’re only announcing this release as an open beta, we have some really exciting things planned for the coming weeks and months. We want to improve on the quick and easy Pages developer experience that you're already familiar with by adding support for integrated logging and more analytics for your deployed functions.</p><p>Beyond that, we'll be expanding our first-class support for the next generation of frontend frameworks. As we've shown with SvelteKit, Pages' ability to seamlessly deploy both static and dynamic code together enables unbeatable end-user performance &amp; developer ease, and we're excited to unlock that for more people. Fans of similar frameworks &amp; technologies, such as NextJS, NuxtJS, React Server Components, Remix, Hydrogen, etc., stay tuned to this blog for more announcements. Or better yet, come <a href="https://www.cloudflare.com/careers/">join us</a> and help make it happen!</p><p>Additionally, as we’ve done with SvelteKit, we’re looking to include more first-class integration with existing frameworks, so Pages can become the primary home for your preferred frameworks of choice. Work is underway on making NextJS, NuxtJS, React Server Components, Shopify Hydrogen and more integrate seamlessly as you develop your full stack apps.</p><p>Finally, we’re working to speed up those build times, so you can focus on pushing changes and iterating quickly — without the wait!</p>
    <div>
      <h2>Getting started</h2>
      <a href="#getting-started">
        
      </a>
    </div>
    <p>To get started head over to our <a href="https://developers.cloudflare.com/pages/platform/functions">Pages docs</a> and check out our <a href="/building-full-stack-with-pages">demo blog</a> to learn more about how to deploy serverless functions to Pages using Cloudflare Workers.</p><p>Of course, what we love most is seeing what you build! Pop into <a href="https://discord.com/invite/cloudflaredev">our Discord</a> and show us how you’re using Pages to build your full stack apps.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5TghCmJGOGyp3tdbWO6xmV/9cb9456f183c182837b9b0fd19d6b692/image3-21.png" />
            
            </figure>
    <div>
      <h3>Watch on Cloudflare TV</h3>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <div></div><p></p> ]]></content:encoded>
            <category><![CDATA[Full Stack Week]]></category>
            <category><![CDATA[Cloudflare Pages]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Full Stack]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">34bHu85gjHcwSanuNv6VQ8</guid>
            <dc:creator>Nevi Shah</dc:creator>
            <dc:creator>Glen Maddern</dc:creator>
            <dc:creator>Cina Saffary</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare Pages now partners with your favorite CMS]]></title>
            <link>https://blog.cloudflare.com/cloudflare-pages-headless-cms-partnerships/</link>
            <pubDate>Wed, 17 Nov 2021 13:58:49 GMT</pubDate>
            <description><![CDATA[ Cloudflare Pages partners up with some of the biggest headless CMSs ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Interest in headless CMSes has seen spectacular growth over the past few years with many businesses looking to adopt the tooling. As audiences consume content through new interfaces taking different forms — smartphones, wearables, personal devices — the idea of decoupling content with its backend begins to provide a better experience both for developing teams and end users. Because of this, we believe there are and will be more opportunities in the future to utilize headless CMSes which is why today, we’re thrilled to announce our partnerships with <a href="https://sanity.io/">Sanity</a> and <a href="https://strapi.io/">Strapi</a> and also share existing integrations with <a href="https://www.contentful.com/">Contentful</a> and <a href="https://wordpress.org/">WordPress</a> — all your favorite CMS providers.</p>
    <div>
      <h3>A little on headless CMSes</h3>
      <a href="#a-little-on-headless-cmses">
        
      </a>
    </div>
    <p>Headless CMSes are one of the most common API integrations we’ve seen so far among you and your teams — whether it’s for your marketing site, blog or <a href="https://www.cloudflare.com/ecommerce/">e-commerce site</a>. It provides your teams the ability to input the contents of your site through a user-friendly interface and store them in a database, so that updates can easily be made to your site without touching the code base. As a Jamstack platform, a big part of our roadmap is understanding how we can build our own tools or provide integrations for tools that fit in with your development ecosystem and Pages, which is why in August this year we <a href="/introducing-deploy-hooks-for-cloudflare-pages/">announced Pages support for Deploy Hooks</a>.</p>
    <div>
      <h3>What’s a hook got to do with it?</h3>
      <a href="#whats-a-hook-got-to-do-with-it">
        
      </a>
    </div>
    <p>Deploy Hooks are the key to what allows you to connect and trigger deployments in Pages via updates made in your headless CMS. As developers, instead of getting pinged several times a day to make content updates to your site, your marketing team can update the site directly within the headless CMS’s interface by way of a Deploy Hook. This is a URL created on Pages that accepts an HTTP POST request to trigger new deployments outside the realm of your git commands. You can configure settings within your CMS to accept the Deploy Hook so that anytime content is updated within your CMS, a new deployment is started in the Pages dashboard automatically — it couldn’t be any easier!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7Ga9mYZKafjYTaWyk9Pyof/58187824144d2e7ad4066898b2a88272/image2-18.png" />
            
            </figure>
    <div>
      <h3>How can I create a Deploy Hook?</h3>
      <a href="#how-can-i-create-a-deploy-hook">
        
      </a>
    </div>
    <p>Within the Pages interface, there are two things you need to do to create your Deploy Hook:</p><ol><li><p><b>Choose your Deploy Hook name:</b> You can name your deploy hook anything you’d like</p></li><li><p><b>Select the Branch to Build:</b> You can specify which branch will be built and deployed when the URL is requested with the Deploy Hook.</p></li></ol><div></div><p>Once you are given your Deploy Hook, you’re all set to set up a webhook within your chosen CMS where you will paste your Deploy Hook.</p><p>That’s it! Now leave it to your marketing team to update their rich content and watch the builds trigger automatically to update your site!</p>
    <div>
      <h3>Our partners</h3>
      <a href="#our-partners">
        
      </a>
    </div>
    <p>Of course, Deploy Hooks is just a starting point of ways we can provide a better dev experience for your team when using the headless CMS of your choice with your Pages site. But our story of integrations does not stop here. Introducing our CMS partners and integrations: <a href="https://sanity.io/">Sanity</a>, <a href="https://strapi.io/">Strapi</a>, <a href="https://www.contentful.com/">Contentful</a>, and <a href="https://wordpress.org/">WordPress</a>!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4cHjlUzTb0cWXGCgL1rrbk/0b23895d03dfd20c477fed63199c9ed4/image1-38.png" />
            
            </figure><p>We continue to see the highest usage rates of these four CMSes on Pages among you and your teams, and in the months to come we’ll be working closely with our partners to build even more for you.</p><blockquote><p><i>We’re delighted to partner with Cloudflare and excited by this new release from Cloudflare Pages. At Sanity, we care deeply about people working with content on our platform. Cloudflare’s new deploy hooks allow developers to automate builds for static sites based on content changes, which is a huge improvement for content creators. Combining these with structured content and our GROQ-powered Webhooks, our customers can be strategic about when these builds should happen. We’re stoked to be part of this release and can’t wait to see what the community will build with Sanity and Cloudflare!</i>- <b>Even Westvang, Co-founder, Sanity.io</b></p></blockquote><p>Check out <a href="https://www.sanity.io/blog/deploying-a-next-js-site-on-cloudflare-pages-with-webhooks">Sanity’s video tutorial</a> on how to build your site using Pages and Sanity!</p><blockquote><p><i>At Strapi, we’re excited about this partnership with Cloudflare because it enables developers to abstract away the complexity of deploying changes to production for content teams. By using the Deploy Hook for Strapi, everyone can push new content and updates quickly and autonomously.</i>- <b>Pierre Burgy, CEO, Strapi.io</b></p></blockquote><blockquote><p>With this integration, our customers can work more efficiently and cross-functionally with their teams. Marketing teams can update Contentful directly to automatically trigger deployments without relying on their developers to update any of their code base, which results in a better, more productive experience for all teams involved.- <b>Jeff Blattel, Director of Technical Partnerships at Contentful</b></p></blockquote>
    <div>
      <h3>Get started</h3>
      <a href="#get-started">
        
      </a>
    </div>
    <p>For now, to learn more about how you can connect your Pages project to one of our partner CMSes, check out our <a href="https://developers.cloudflare.com/pages/platform/deploy-hooks">Deploy Hooks documentation</a> to deploy your first project today!</p>
    <div>
      <h3>Watch on Cloudflare TV</h3>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <div></div><p></p> ]]></content:encoded>
            <category><![CDATA[Full Stack Week]]></category>
            <category><![CDATA[Cloudflare Pages]]></category>
            <category><![CDATA[JAMstack]]></category>
            <category><![CDATA[Serverless]]></category>
            <guid isPermaLink="false">1eW2QQJIAbIQYiIuqUuz31</guid>
            <dc:creator>Nevi Shah</dc:creator>
            <dc:creator>Abhi Das</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare Pages now offers GitLab support]]></title>
            <link>https://blog.cloudflare.com/cloudflare-pages-partners-with-gitlab/</link>
            <pubDate>Wed, 17 Nov 2021 13:58:44 GMT</pubDate>
            <description><![CDATA[ Cloudflare Pages partners up with GitLab for full git integration. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>In the early stages of our ideation of Pages, we set out to build a platform with a smooth developer experience that integrates seamlessly with your existing workflow. However, after <a href="/cloudflare-pages-ga/">announcing Pages’ general availability</a>, we realized our platform may not actually be usable by every developer. Before today, only those of you who used GitHub as your source code management tool could take advantage of the Pages experience.</p><p>As part of Full Stack Week, we’re opening the doors of our platform to even more users by announcing our <a href="https://gitlab.com/">integration with GitLab</a> — <a href="https://gitlab.com/">the DevOps platform</a>! You can now create new Pages projects by connecting your repos stored on GitLab and make site changes there via your usual git commands. And what’s more? We’re also launching an official partnership with GitLab to bring you even better integrations with the git provider in the months to come.</p>
    <div>
      <h3>Why GitLab?</h3>
      <a href="#why-gitlab">
        
      </a>
    </div>
    <p>As a <a href="https://www.cloudflare.com/the-net/jamstack-websites/">Jamstack platform</a>, our goal is to enable you, the developer, to focus on what you do best — code, code, code — without the heavy lifting! Not only does this mean giving you all the tools you need to build out a <a href="/cloudflare-pages-goes-full-stack">full stack site</a> but also provide you with integrations that fit your development needs. By expanding our platform ecosystem to GitLab, Cloudflare can now serve the needs of a broader developer community collaborating on their sites.</p><p>Since our April launch, one of the most common questions and pieces of feedback we’ve received in customer calls, on <a href="https://discord.com/invite/cloudflaredev">Discord</a>/<a href="https://twitter.com/CloudflareDev">Twitter</a>, and on our <a href="https://community.cloudflare.com/">community threads</a> centered around GitLab. We knew our git integration story couldn’t just stop at one provider, especially given the diversity in tooling we see among our community. So it became glaringly obvious we needed to extend Pages to the GitLab community.</p>
    <div>
      <h3>Our partnership</h3>
      <a href="#our-partnership">
        
      </a>
    </div>
    <p>Today, we’re proud to now be <a href="https://about.gitlab.com/partners/technology-partners/">official technology partners</a> with GitLab Inc. In addition to our git integration, the goal of our partnership is to improve existing and develop future integrations, so your teams can seamlessly collaborate and accelerate site delivery and updates at scale. As you begin using Pages with GitLab, our teams will be working closely together in a cross-collaborative approach for new integrations.</p><blockquote><p><i>Developers can be more productive when they create, test, secure and deploy software from a single devops application instead of bouncing between multiple different tools. Cloudflare Pages’ integration with GitLab makes it easier for joint users to develop and deploy new code to Cloudflare’s network using the same syntax and git commands they’re already comfortable using.</i>— Michael LeBeau, Alliance Manager at GitLab</p></blockquote>
    <div>
      <h3>Get started</h3>
      <a href="#get-started">
        
      </a>
    </div>
    <p>To set up your first project with GitLab, just create a new project in the <a href="https://dash.cloudflare.com/">Pages dashboard</a>. Select “GitLab” and Pages will bring you to your GitLab sign-in screen where you can sign in to your account. Then, select the repo with which you’d like to create your project, configure your build settings, and deploy! From here, you can begin making changes to your site directly via commits to GitLab, triggering a new build every time.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2HsCbBWpGhaEPdpzvysfeK/3c5f09439aae1ae7c8aecf9225e8540b/image2-16.png" />
            
            </figure><p>Have questions? To get started, check out the <a href="https://developers.cloudflare.com/pages/">Pages docs</a> and be sure to leave us some feedback by clicking the “Give Feedback” button there. Show us what you build by joining the chatter in our Discord channel.</p><p>Happy developing!</p>
    <div>
      <h3>Watch on Cloudflare TV</h3>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <div></div><p></p> ]]></content:encoded>
            <category><![CDATA[Full Stack Week]]></category>
            <category><![CDATA[Cloudflare Pages]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[JAMstack]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">4XWE8zcAlcsyvCbdbnQDPW</guid>
            <dc:creator>Nevi Shah</dc:creator>
            <dc:creator>Sean Brant</dc:creator>
        </item>
        <item>
            <title><![CDATA[Custom Headers for Cloudflare Pages]]></title>
            <link>https://blog.cloudflare.com/custom-headers-for-pages/</link>
            <pubDate>Wed, 27 Oct 2021 13:00:15 GMT</pubDate>
            <description><![CDATA[ We're excited to announce that Pages now natively supports custom headers on your projects! Simply create a _headers file in the build directory of your project and within it, define the rules you want to apply. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Until today, Cloudflare Workers has been a great solution to setting headers, but we wanted to create an even smoother developer experience. Today, we're excited to announce that Pages now natively supports custom headers on your projects! Simply create a <code>_headers</code> file in the build directory of your project and within it, define the rules you want to apply.</p>
            <pre><code>/developer-docs/*
  X-Hiring: Looking for a job? We're hiring engineers
(https://www.cloudflare.com/careers/jobs)</code></pre>
            
    <div>
      <h2>What can you set with custom headers?</h2>
      <a href="#what-can-you-set-with-custom-headers">
        
      </a>
    </div>
    <p>Being able to set custom headers is useful for a variety of reasons — let’s explore some of your most popular use cases.</p>
    <div>
      <h3>Search Engine Optimization (SEO)</h3>
      <a href="#search-engine-optimization-seo">
        
      </a>
    </div>
    <p>When you create a Pages project, a <code>pages.dev</code> deployment is created for your project which enables you to <a href="https://developers.cloudflare.com/pages/get-started">get started immediately</a> and easily <a href="https://developers.cloudflare.com/pages/platform/preview-deployments">preview changes</a> as you iterate. However, we realize this poses an issue — publishing multiple copies of your website can harm your rankings in search engine results. One way to solve this is by disabling indexing on all <code>pages.dev</code> subdomains, but we see many using their <code>pages.dev</code> subdomain as their primary domain. With today’s announcement you can attach headers such as <a href="https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#xrobotstag"><code>X-Robots-Tag</code></a> to hint to Google and other search engines how you'd like your deployment to be indexed.</p><p>For example, to prevent your <code>pages.dev</code> deployment from being indexed, you can add the following to your <code>_headers</code> file:</p>
            <pre><code>https://:project.pages.dev/*
  X-Robots-Tag: noindex</code></pre>
            
    <div>
      <h3>Security</h3>
      <a href="#security">
        
      </a>
    </div>
    <p>Customizing headers doesn’t just help with your site’s search result ranking — a number of browser security features can be configured with headers. A few headers that can enhance your site’s security are:</p><ul><li><p><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options"><code><b>X-Frame-Options</b></code></a>: You can prevent <a href="https://owasp.org/www-community/attacks/Clickjacking">click-jacking</a> by informing browsers not to embed your application inside another (e.g. with an <code>&lt;iframe&gt;</code>).</p></li><li><p><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options"><code><b>X-Content-Type-Option: nosniff</b></code></a><b>:</b> To prevent browsers from interpreting a response as any other content-type than what is defined with the <code>Content-Type</code> header.</p></li><li><p><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy"><code><b>Referrer-Policy</b></code></a>: This allows you to customize how much information visitors give about where they're coming from when they navigate away from your page.</p></li><li><p><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy"><code><b>Permissions-Policy</b></code></a>: Browser features can be disabled to varying degrees with this header (recently renamed from <code>Feature-Policy</code>).</p></li><li><p><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy"><code><b>Content-Security-Policy</b></code></a>: And if you need fine-grained control over the content in your application, this header allows you to configure a number of security settings, including similar controls to the <code>X-Frame-Options</code> header.</p></li></ul><p>You can configure these headers to protect an <code>/app/*</code> path, with the following in your <code>_headers</code> file:</p>
            <pre><code>/app/*
  X-Frame-Options: DENY
  X-Content-Type-Options: nosniff
  Referrer-Policy: no-referrer
  Permissions-Policy: document-domain=()
  Content-Security-Policy: script-src 'self'; frame-ancestors 'none';</code></pre>
            
    <div>
      <h3>CORS</h3>
      <a href="#cors">
        
      </a>
    </div>
    <p>Modern browsers implement a security protection called <i>CORS</i> or Cross-Origin Resource Sharing. This prevents one domain from being able to force a user's action on another. Without CORS, a malicious site owner might be able to do things like make requests to unsuspecting visitors' banks and initiate a transfer on their behalf. However, with CORS, requests are prevented from one origin to another to stop the malicious activity.</p><p>There are, however, some cases where it is safe to allow these cross-origin requests. So-called, "<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests">simple requests</a>" (such as linking to an image hosted on a different domain) are permitted by the browser. Fetching these resources dynamically is often where the difficulty arises, and the browser is sometimes overzealous in its protection. Simple static assets on Pages are safe to serve to any domain, since the request takes no action and there is no visitor session. Because of this, a domain owner can attach CORS headers to specify exactly which requests can be allowed in the <code>_headers</code> file for fine-grained and explicit control.</p><p>For example, the use of the asterisk will enable any origin to request any asset from your Pages deployment:</p>
            <pre><code>/*
  Access-Control-Allow-Origin: *</code></pre>
            <p>To be more restrictive and limit requests to only be allowed from a 'staging' subdomain, we can do the following:</p>
            <pre><code>https://:project.pages.dev/*
  Access-Control-Allow-Origin: https://staging.:project.pages.dev</code></pre>
            
    <div>
      <h2>How we built support for custom headers</h2>
      <a href="#how-we-built-support-for-custom-headers">
        
      </a>
    </div>
    <p>To support all these use cases for custom headers, we had to build a new engine to determine which rules to apply for each incoming request. Backed, of course, by Workers, this engine supports splats and placeholders, and allows you to include those matched values in your headers.</p><p>Although we don't support all of its features, we've modeled this matching engine after the <a href="https://wicg.github.io/urlpattern/">URLPattern specification</a> which was recently shipped with Chrome 95. We plan to be able to fully implement this specification for custom headers once URLPattern lands in the Workers runtime, and there should hopefully be no breaking changes to migrate.</p>
    <div>
      <h2>Enhanced support for redirects</h2>
      <a href="#enhanced-support-for-redirects">
        
      </a>
    </div>
    <p>With this same engine, we’re bringing these features to your <code>_redirects</code> file as well. You can now configure your redirects with splats, placeholders and status codes as shown in the example below:</p>
            <pre><code>/blog/* https://blog.example.com/:splat 301
/products/:code/:name /products?name=:name&amp;code=:code
/submit-form https://static-form.example.com/submit 307</code></pre>
            
    <div>
      <h2>Get started</h2>
      <a href="#get-started">
        
      </a>
    </div>
    <p>Custom <a href="https://developers.cloudflare.com/pages/platform/headers">headers</a> and <a href="https://developers.cloudflare.com/pages/platform/redirects">redirects</a> for Cloudflare Pages can be configured today. Check out <a href="https://developers.cloudflare.com/pages/platform">our documentation</a> to get started, and let us know how you're using it in <a href="https://discord.gg/cloudflaredev">our Discord server</a>. We'd love to hear about what this unlocks for your projects!</p>
    <div>
      <h2>Coming up...</h2>
      <a href="#coming-up">
        
      </a>
    </div>
    <p>And finally, if a <code>_headers</code> file and enhanced support for <code>_redirects</code> just isn't enough for you, we also have something <i>big</i> coming very soon which will give you the power to build even more powerful projects. Stay tuned!</p> ]]></content:encoded>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Cloudflare Pages]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[SEO]]></category>
            <guid isPermaLink="false">2Svf2ExXnAO2AwvgiHaSDg</guid>
            <dc:creator>Nevi Shah</dc:creator>
            <dc:creator>Greg Brimble</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare Pages is Lightning Fast]]></title>
            <link>https://blog.cloudflare.com/cloudflare-pages-is-lightning-fast/</link>
            <pubDate>Sat, 18 Sep 2021 12:59:46 GMT</pubDate>
            <description><![CDATA[ With Cloudflare’s extensive network, consisting of 250+ cities, your Pages site is deployed directly to the edge in seconds.  ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7WXwiTakxjOEmmARnhETy/4b2105c46beb5c7de33c8240a3a43534/image1-25.png" />
            
            </figure><p>When we announced <a href="/cloudflare-pages-ga/">Cloudflare Pages</a> in April, our goal wasn’t to bring just <i>any</i> web development tool to the table. As a front-end developer, it’s your responsibility to bring the ideas of your marketing, product and engineering teams to life by crafting a beautifully engaging experience for every customer. With all the hard work that goes into the development process — turning mock-ups to code, getting input from your team, staging and testing changes — you want the best performance possible for your site to showcase your work and optimize your customers’ experience.</p><p>Cloudflare Pages is the most secure and most scalable Jamstack platform to build and deploy your sites on the <a href="https://www.cloudflare.com/learning/serverless/glossary/what-is-edge-computing/">edge</a>. But <i>how</i> is Pages so fast?</p><p>It comes down to three key reasons:</p><ul><li><p>Pages is built on one of the fastest networks in the world, putting us within <a href="/last-mile-insights/">50 ms</a> of 95% of the world’s Internet-connected population. Delivering Pages from this network is the basis of our speed.</p></li><li><p>Cloudflare helps define and implement next generation standards, like QUIC + HTTP/3 and Early Hints, that push Pages performance to the next level.</p></li><li><p>Pages has a killer developer experience that makes it easy to build the fastest websites on the planet.</p></li></ul>
    <div>
      <h2>Pages is delivered from one of the fastest networks in the world</h2>
      <a href="#pages-is-delivered-from-one-of-the-fastest-networks-in-the-world">
        
      </a>
    </div>
    <p>After all the sweat, finger cramps, and facepalms you’ve managed to survive through development, the last thing you need is poor performance and load times for your site. This not only drives off frustrated customers, but if the site is a storefront, it can also have <a href="https://www.cloudflare.com/learning/performance/more/website-performance-conversion-rates/">revenue implications</a>.</p><p>We’ve got you covered! With Cloudflare’s extensive <a href="https://www.cloudflare.com/network/">network</a>, consisting of <a href="/250-cities-is-just-the-start/">250+ cities</a>, your Pages site is deployed directly to the edge in seconds. With even more optimizations to our network routing, your customers are routed to the best data center, ensuring optimal loading and performance globally.</p>
    <div>
      <h3>How does our performance compare?</h3>
      <a href="#how-does-our-performance-compare">
        
      </a>
    </div>
    <p>Optimized routing, a giant <a href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/">CDN network</a>, support for the latest standards, more performance enhancements — these all sound great! But let’s put them to the ultimate test: benchmarking. How do our Pages sites’ performance compare to those of our competitors?</p>
    <div>
      <h3>The TTFB test</h3>
      <a href="#the-ttfb-test">
        
      </a>
    </div>
    <p>We deployed the same static site on Pages and on two other popular deployment platforms for comparison. We understand that benchmark tools like Google Lighthouse may introduce some geographic bias; performing a benchmarking analysis from San Francisco and hitting a local data center doesn’t tell us much about performance on a global scale. We wanted to create a simulation to run tests from different locations to give us a globally accurate representation. Using a tool called <a href="https://www.catchpoint.com/">Catchpoint</a>, we executed our test from 35 different cities around the world to measure the Time to First Byte (TTFB) for different providers. To give as accurate a reading as possible, we ran our test up to eight times, and averaged the result per city and per provider.</p>
    <div>
      <h3>Around the world in 80ms</h3>
      <a href="#around-the-world-in-80ms">
        
      </a>
    </div>
    <p>It’s common to see good performance in regions like the US and Europe, but at Cloudflare, we think even more globally. Cloudflare’s network allows you to reach a myriad of regions around the world without any additional effort or cost. Everytime our map grows, your global reach does too.</p><p>In our TTFB comparison, Cloudflare Pages is leading the race to your customers against two leading providers.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/JM3wLMSCp6SBN3Pcjozi1/4f15d8ca1742a43ebddac1248c11acd1/image2-30.png" />
            
            </figure>
    <div>
      <h2>Pages gets early access to the latest, greatest, and fastest standards and network protocols</h2>
      <a href="#pages-gets-early-access-to-the-latest-greatest-and-fastest-standards-and-network-protocols">
        
      </a>
    </div>
    <p>But it’s not just our network. We are proud of both driving and adopting the latest web standards. Our mission has always been to help build a better Internet, and collaborating on the latest standards is an essential part of that goal, especially when thinking about your Pages sites.</p><p><b>TLS 1.3:</b> As the new encryption protocol, TLS 1.3 sets out to improve both speed and security for Internet users everywhere. With 1.3, during the course of that infamous “TLS handshake” you hear so much about, only one round trip, or back and forth communication, is required instead of two, thus shortening the process by milliseconds. A huge step forward for web security and performance, TLS 1.3 is available to all Pages users with no additional action required --- let the client and server handle it all.</p><p><b>IPv6:</b> Today it’s extremely common for every person to have more than one Internet connected device, making the shift to IPv6 extremely crucial, now more than ever. Not only is IPv6 the answer to the “no more addresses” issue, but is also another added layer for performance and security with its ability to handle packets more efficiently, getting faster and faster as adoption of the standard increases.</p><p><b>QUIC &amp; HTTP/3:</b> The new internet transport protocol, QUIC &amp; HTTP/3, team up to enable faster, reliable and more secure connections for your customers to web endpoints like your Pages site. QUIC, a transport layer protocol, aims to reduce connection and transport latency and avoid congestion and runs underneath HTTP/3. Enabled by default on every <b>pages.dev</b> domain, <a href="/last-call-for-quic/">QUIC &amp; HTTP/3</a> work in tandem to provide improved performance and security so long as the client complies.</p><p>With support for the latest standards like <a href="https://www.cloudflare.com/learning/performance/what-is-http3/">HTTP/3</a> and IPv6, as we work on support for dynamic frameworks, we will be able to offer response streaming, a feature other platforms don’t provide.</p><blockquote><p><b>"Pages gives us more confidence than other providers, making it easier to migrate our app over and build new products that can easily scale with growing traffic."</b> — <i>David Simpson, COO at</i> <a href="http://designed.org/"><i>Designed.org</i></a></p></blockquote><p>But we know that speed doesn’t just matter from a user perspective. It also matters from a developer perspective, too — and we’ve worked to make that just as great an experience.</p>
    <div>
      <h2>A developer experience that we’d want to have</h2>
      <a href="#a-developer-experience-that-wed-want-to-have">
        
      </a>
    </div>
    <p>Generally speaking, performance of anything on the web is only as fast as the weakest link. A fast network, or support for the latest standards, doesn’t mean very much if we make it hard for a developer to do their job, or to optimize their code. So we knew the developer experience had to be a priority, too.</p>
    <div>
      <h3>Fast for your users. Fast for you, too.</h3>
      <a href="#fast-for-your-users-fast-for-you-too">
        
      </a>
    </div>
    <p>We set out to simplify every step of your developer experience by looking for ways to integrate into your existing publishing workflow. With Pages’ full git integration, grab your repo, tell us your framework and go! Collaborate with all members of your team — developers, PMs, marketers — quickly and efficiently with a protected preview URL per deployment to speed up the turnaround time for feedback. A simple <b>Git commit</b> and <b>git push</b>, and we’ll have your site up and running in seconds, and ready for you to share with your team or your customers.</p><p>Of course, even with lightning fast set-up and collaboration, we realize there’s more to the productivity of you and your team. From the time we launched Pages, we’ve been working on making our build times faster every day. Today, Pages builds are 3x faster than they were when we first launched the platform, but we’re not done yet. We’re aiming to have the fastest build times, so you can focus on what you do best — code, test, deploy, repeat — minus any wait.</p>
    <div>
      <h3>Performance tuning, built in</h3>
      <a href="#performance-tuning-built-in">
        
      </a>
    </div>
    <p>In May of last year, Google announced a new program — <a href="https://web.dev/vitals/#core-web-vitals">Web Core Vitals</a> — to provide unified guidance on how to measure the quality of a website, and to identify areas of improvement for developers, business owners, and marketers to deliver a better user experience. There are three key metrics as part of the program:</p><ul><li><p><b>Largest Contentful Paint</b>: measures loading performance</p></li><li><p><b>First Input Delay</b>: measure interactivity</p></li><li><p><b>Cumulative Layout Shift</b>: measures visual stability</p></li></ul><p>Fast-forward a year to 2021, Google <a href="https://developers.google.com/search/blog/2020/05/evaluating-page-experience">officially announced</a> that performance on these metrics will now be incorporated into Google Search results.</p><p>Performance is becoming an ever important aspect of the success of any site on the web.</p><p>We recognize this, and it’s part of why we’re so relentlessly focused on making sites hosted on Pages so fast. But you don’t need to just take our word for it. In addition to providing you with stellar performance across the globe, our Web Analytics tool is available to Pages customers with one click — so you can track your site’s Web Core Vitals and understand specific areas of improvement. As an example, here’s the Web Analytics on our very own <a href="https://developers.cloudflare.com/">Cloudflare Docs</a> site.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/p0YSeN6MtJkwiEDrdQipY/d3e74072d7ff6d8458dac5a1fa1f9d02/image3-27.png" />
            
            </figure><p>We’re big believers in dogfooding — running our Docs site on Pages, and then using our Web Analytics to identify areas of improvement. It’s a big part of the Cloudflare ethos, and it’s how we can be confident in recommending our products to you.</p>
    <div>
      <h2>What’s Next</h2>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>With the increasing momentum behind the Jamstack movement, it’s a great time to be in the field. With Pages, you can rest easy knowing you’re taken care of every step of the way. We are so excited about the future of Cloudflare Pages --- integrating with Cloudflare Workers, supporting monorepos, enabling more sources of repo integration --- and how it brings a fresh perspective on how you build and deploy your sites on the web.</p><p>Check our <a href="https://developers.cloudflare.com/pages/">docs</a> to get started on Cloudflare Pages today!</p> ]]></content:encoded>
            <category><![CDATA[Speed Week]]></category>
            <category><![CDATA[Cloudflare Pages]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">zlO0uw9U10hKqv1SYwdpB</guid>
            <dc:creator>Nevi Shah</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing Deploy Hooks for Cloudflare Pages]]></title>
            <link>https://blog.cloudflare.com/introducing-deploy-hooks-for-cloudflare-pages/</link>
            <pubDate>Fri, 06 Aug 2021 12:59:11 GMT</pubDate>
            <description><![CDATA[ Today, we are proud to announce a new way to connect your Pages application with your headless CMSs and databases: introducing Deploy Hooks for Pages. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>With Cloudflare Pages, deploying your Jamstack applications is easier than ever — integrate with GitHub and a simple <b>git push</b> deploys your site within minutes. However, one of the limitations of Pages was that triggering deployments to your site only happens within the confines of committing to GitHub. We started thinking about how users who author content consistently on their site — our bloggers and writers — may not always be editing their copy directly via the code but perhaps through a different service. Headless content management systems (CMSs) are a simple solution to solve this problem, allowing users to store their backend content through an editing interface as a service for an application like Pages.</p><p>It made us wonder: what if we could trigger deployments based on updates made in other places rather than just via GitHub? Today, we are proud to announce a new way to connect your Pages application with your headless CMSs and databases: introducing Deploy Hooks for Pages.</p>
    <div>
      <h2>What’s a headless CMS?</h2>
      <a href="#whats-a-headless-cms">
        
      </a>
    </div>
    <p>Headless CMSs such as Contentful, Ghost and Sanity.io allow optimization of content formatting for any type of interface. With tools like these, you can leverage a “decoupled” content management model where all you need to focus on is writing your content within the CMS editing interface and let its API handle the rest!</p><p>Sounds great! What’s the catch?</p><p>We started thinking about the implications for those of you who integrate with these headless tools and what your workflow might look like as it relates to Pages. You would build, for example, your blog application on Pages but update all of your content directly on your headless CMS and may make changes to your content three to four times a day. So how exactly does the data from your CMS show up on your Pages site and stay in sync? Enter Deploy Hooks!</p>
    <div>
      <h2>What are Deploy Hooks?</h2>
      <a href="#what-are-deploy-hooks">
        
      </a>
    </div>
    <p>Deploy Hooks are URLs created on Pages that accept an HTTP POST request to trigger new deployments outside the realm of a git command. Instead of manually redeploying your site via another git push, any time you update the content within your chosen headless CMS, the Deploy Hook will automatically send a real-time update to Pages. On the Pages side, once these updates are received, a new site build will be triggered to include any new data or content detected. It’s that easy!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1jXpb7v05PztkuBu93qOdE/78f1f20b9f3b94c8609cdf23ed5c64c9/Group-842-1.png" />
            
            </figure>
    <div>
      <h2>How can I create a Deploy Hook?</h2>
      <a href="#how-can-i-create-a-deploy-hook">
        
      </a>
    </div>
    <p>To set up your deploy hook, navigate to the <b>Deploy Hooks</b> section in your Pages project’s settings. In this section there are two input parameters needed to properly configure your deploy hook and obtain your URL:</p><ol><li><p><b>Deploy Hook Name:</b> You can name your deploy hook something like “Contentful” or “My Blog” to identify which source the Deploy Hook is monitoring. A unique name for each deploy hook will also help you to differentiate hooks in the event that you create multiple Deploy Hooks for your Pages site.</p></li><li><p><b>Branch to Build:</b> You can specify which branch will be built and deployed when the URL is requested with the Deploy Hook. This is especially helpful if you’d like to stage your changes first instead of pushing directly to your production branch.</p></li></ol>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2rWVd8MfMqpRQgwZQi6HqX/787affba910093e2d52046f6a1ba4eb3/deployhooks.gif" />
            
            </figure>
    <div>
      <h2>How can I use a Deploy Hook with my headless CMS?</h2>
      <a href="#how-can-i-use-a-deploy-hook-with-my-headless-cms">
        
      </a>
    </div>
    <p>You can put the unique URL provided in the dashboard into just about any service that accepts a Deploy Hook URL. In a headless CMS, you can create and configure a new webhook and, depending on the tool, you can sometimes choose which events you’d like to trigger deployments. Once you’ve configured this webhook, you can paste the Deploy Hook URL provided by Pages to connect your chosen CMS with your Pages project. After that, you’re all set to update content in your headless tool.</p>
    <div>
      <h2>What else can I do with a Deploy Hook?</h2>
      <a href="#what-else-can-i-do-with-a-deploy-hook">
        
      </a>
    </div>
    <p>After creating your Deploy Hook, Pages also provides you with the HTTP POST request snippet with your URL that looks something like this:</p>
            <pre><code>curl -X POST "https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/ 66c5dd3a-989f-4ba7-a6e2-6d2695524d7”</code></pre>
            <p>Every time you execute the snippet, you will trigger a new build to your Pages site. In addition to utilizing this snippet for a forced deployment within your command line, you can also customize your <a href="https://www.cloudflare.com/learning/serverless/glossary/what-is-ci-cd/">CI/CD pipeline</a> and trigger deployments only under certain conditions. For example, you only want to deploy if there were changes within specific directories and only after an extensive test suite passes. Additionally, this snippet is useful for scheduling a CRON trigger to initiate builds on a specific timeline or cadence. Read more about how to use Pages deploy hooks in our <a href="https://developers.cloudflare.com/pages/platform/deploy-hooks">docs</a>.</p>
    <div>
      <h2>Try it for yourself!</h2>
      <a href="#try-it-for-yourself">
        
      </a>
    </div>
    <p>Sound like fun? Try it for yourself using our tutorial, <a href="https://developers.cloudflare.com/pages/tutorials/build-a-blog-using-nuxt-and-sanity">How to Build a Blog Using Nuxt.js and Sanity.io on Cloudflare Pages</a> or create your own. We can’t wait to see what you build on Pages with Deploy Hooks!</p>
    <div>
      <h2>P.S. — we’re hiring!</h2>
      <a href="#p-s-were-hiring">
        
      </a>
    </div>
    <p>Want to help us shape the future of development on the web? <a href="https://www.cloudflare.com/careers/">Join our team</a>!</p> ]]></content:encoded>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Cloudflare Pages]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">3KSX8QV5Cwt1i76uGWaRzf</guid>
            <dc:creator>Nevi Shah</dc:creator>
            <dc:creator>Christian Sparks</dc:creator>
        </item>
    </channel>
</rss>