{"id":104962,"date":"2022-03-02T05:55:12","date_gmt":"2022-03-02T13:55:12","guid":{"rendered":"https:\/\/www.backblaze.com\/blog\/?p=104962"},"modified":"2023-07-11T10:03:13","modified_gmt":"2023-07-11T17:03:13","slug":"building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge","status":"publish","type":"post","link":"https:\/\/www.backblaze.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/","title":{"rendered":"Building a Multiregion Origin Store With Backblaze B2 + Fastly Compute@Edge"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-104973 size-full\" title=\"Building a Multiregion Origin Store With Backblaze B2 + Fastly Compute@Edge\" src=\"https:\/\/www.backblaze.com\/blog\/wp-content\/uploads\/2022\/02\/bb-bh-Fastly-Compute@Edge.png\" alt=\"Backblaze B2 + Compute@Edge by Fastly\" width=\"1440\" height=\"820\" srcset=\"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/bb-bh-Fastly-Compute@Edge.png 1440w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/bb-bh-Fastly-Compute@Edge-300x171.png 300w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/bb-bh-Fastly-Compute@Edge-1024x583.png 1024w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/bb-bh-Fastly-Compute@Edge-768x437.png 768w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/bb-bh-Fastly-Compute@Edge-560x319.png 560w\" sizes=\"auto, (max-width: 1440px) 100vw, 1440px\" \/><\/p>\n<p id=\"bzdropcap\">Backblaze B2 Cloud Storage customers have long leveraged our partner Fastly&#8217;s Deliver@Edge CDN as an essential component of a modern, scalable web architecture. Complementing Deliver@Edge, <a href=\"https:\/\/www.fastly.com\/products\/edge-compute\/serverless\" target=\"_blank\" rel=\"noopener\">Compute@Edge<\/a> is a serverless computing environment built on the same caching platform to provide a general-purpose compute layer between the cloud and end users. Today, we&#8217;re excited to celebrate Fastly&#8217;s announcement of its <a href=\"https:\/\/www.fastly.com\/partner-edge-ecosystem\" target=\"_blank\" rel=\"noopener\">Compute@Edge partner ecosystem<\/a>.<\/p>\n<p>Serverless computing is quickly gaining popularity among developers for its simplicity, agility, and functionality. In the serverless model, cloud providers allocate resources to applications on demand, managing the compute infrastructure on behalf of their customers. The term, \u201cserverless,\u201d is a little misleading: The servers are actually still there, but customers don\u2019t have to get involved in their provisioning, configuration, maintenance, or scaling.<\/p>\n<p>Fastly\u2019s Compute@Edge represents the next generation of serverless computing\u2014purpose-built for better performance, reduced latency, and enhanced visibility and security. Using Fastly\u2019s tools, a developer can create an edge application, test it locally, then with one command, deploy it to the Compute@Edge platform. When a request for that application reaches any of Fastly\u2019s global network of edge servers, the application is launched and running in microseconds and can instantly scale to tens of thousands of requests per second.<\/p>\n<p>It\u2019s difficult to overstate the power and flexibility this puts in your hands as a developer\u2014your application can be running on <em>every<\/em> edge server, with access to <em>every<\/em> attribute of its incoming requests, assembling responses in <em>any<\/em> way you choose. For an idea of the possibilities, check out the <a href=\"https:\/\/developer.fastly.com\/solutions\/demos\/\" target=\"_blank\" rel=\"noopener\">Compute@Edge demos<\/a>, in particular, the <a href=\"https:\/\/developer.fastly.com\/solutions\/demos\/doom\/\" target=\"_blank\" rel=\"noopener\">implementation of the video game classic, \u201cDoom.\u201d<\/a><\/p>\n<p>We don\u2019t have space in a single blog post to explore an edge application of that magnitude, but read on for a simple example of how you can combine Fastly\u2019s Compute@Edge with Backblaze B2 to improve your website\u2019s user experience, directing requests to the optimal origin store end point based on the user\u2019s location. Or watch me walk through the process in the video below:<\/p>\n<p><iframe loading=\"lazy\" title=\"Building a Multiregion Origin Store With Backblaze B2 + Fastly\u2019s Compute@Edge\" width=\"750\" height=\"422\" src=\"https:\/\/www.youtube.com\/embed\/oPgMq4EM5tk?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<h2><strong>The Case for a Multiregion Origin Store<\/strong><\/h2>\n<p>Although the CDN caches resources to improve performance, if a requested resource is not present in the edge server cache, it must be fetched from the origin store. When the edge server is close to the origin store, the increase in latency is minimal. If, on the other hand, the edge server is on a different continent from the origin store, it can take significantly longer to retrieve uncached content. In most cases, this additional delay is hardly noticeable, but for websites with many resources that are frequently updated, it can add up to a sluggish experience for users. A solution is for the origin store to maintain multiple copies of a website\u2019s content, each at an end point in a different region. This approach can dramatically reduce the penalty for cache misses, improving the user experience.<\/p>\n<p>There is a problem here, though: How do we ensure that a given CDN edge server directs requests to the \u201cbest\u201d end point? The answer: build an application that uses the edge server\u2019s location to select the end point. I\u2019ll explain how I did just that, creating a Fastly Compute@Edge application to proxy requests to Backblaze B2 buckets.<\/p>\n<h2><strong>Creating an Application on Fastly Compute@Edge<\/strong><\/h2>\n<p>The <a href=\"https:\/\/developer.fastly.com\/learning\/compute\/\" target=\"_blank\" rel=\"noopener\">Fastly Compute@Edge developer documentation<\/a> did a great job of walking me through creating a Compute@Edge application. As part of the process, I had to choose a starter kit\u2014a simple working application targeting a specific use case. The <a href=\"https:\/\/github.com\/fastly\/compute-starter-kit-rust-static-content\" target=\"_blank\" rel=\"noopener\">Static Content<\/a> starter kit was the ideal basis for my application\u2014it demonstrates many useful techniques, such as generating an AWS V4 Signature and manipulating the request\u2019s <code>Host<\/code> HTTP header to match the origin store.<\/p>\n<p>The <a href=\"https:\/\/github.com\/Backblaze-B2-Samples\/fastly-compute-b2-demo\/blob\/main\/src\/main.rs#L20\" target=\"_blank\" rel=\"noopener\">core of the application<\/a> is just a few lines written in the <a href=\"https:\/\/www.rust-lang.org\" target=\"_blank\" rel=\"noopener\">Rust<\/a> programming language:<\/p>\n<pre>#[fastly::main]\r\n\r\nfn main(mut req: Request) -&gt; Result&lt;Response, Error&gt; {\r\n    \/\/ 1. Where is the application running?\r\n    let pop = get_pop(&amp;req);\r\n\r\n    \/\/ 2. Choose the origin based on the edge server (pop) -\r\n    \/\/ default to US if there is no match on the pop\r\n    let origin = POP_ORIGIN.get(pop.as_str()).unwrap_or(&amp;US_ORIGIN);\r\n\r\n    \/\/ 3. Remove the query string to improve cache hit ratio\r\n    req.remove_query();\r\n\r\n    \/\/ 4. Set the `Host` header to the bucket name + host rather than\r\n    \/\/ our Compute@Edge endpoint\r\n    let host = format!(\"{}.{}\", origin.bucket_name, origin.endpoint);\r\n    req.set_header(header::HOST, &amp;host);\r\n\r\n    \/\/ 5. Copy the modified client request to form the backend request\r\n    let mut bereq = req.clone_without_body();\r\n\r\n    \/\/ 6. Set the AWS V4 authentication headers\r\n    set_authentication_headers(&amp;mut bereq, &amp;origin);\r\n\r\n    \/\/ 7. Send the request to the backend and assign its response to `beresp`\r\n    let mut beresp = bereq.send(origin.backend_name)?;\r\n\r\n    \/\/ 8. Set a response header indicating the origin that we used\r\n    beresp.set_header(\"X-B2-Host\", &amp;host);\r\n\r\n    \/\/ 9. Return the response to the client\r\n    return Ok(beresp);\r\n}<\/pre>\n<p>In step one, the <code>get_pop<\/code> function returns the three-letter abbreviation for the edge server, or point of presence (POP). For the purposes of testing, you can specify a POP as a query parameter in your HTTP request. For example, <code>https:\/\/three.interesting.words.edgecompute.app\/image.png?pop=AMS<\/code> will simulate the application running on the Amsterdam POP. Next, in step two, the application looks up the POP in a <a href=\"https:\/\/github.com\/Backblaze-B2-Samples\/fastly-compute-b2-demo\/blob\/main\/src\/config.rs#L43\" target=\"_blank\" rel=\"noopener\">mapping of POPs to Backblaze B2 end points<\/a>. There are about a hundred Fastly POPs spread around the world; I simply took the list generated by running the <a href=\"https:\/\/developer.fastly.com\/reference\/cli\/\" target=\"_blank\" rel=\"noopener\">Fastly command-line tool<\/a> with the <a href=\"https:\/\/developer.fastly.com\/reference\/cli\/pops\/\" target=\"_blank\" rel=\"noopener\">POPs argument<\/a>, and assigned POPs to Backblaze B2 end points based on their location:<\/p>\n<ul>\n<li>POPs in North America, South America, and Asia\/Pacific map to the U.S. end point.<\/li>\n<li>POPs in Europe and Africa map to the EU end point.<\/li>\n<\/ul>\n<p>I won\u2019t step through the rest of the logic in detail here\u2014the comments in the code sample above cover the basics; feel free to <a href=\"https:\/\/github.com\/Backblaze-B2-Samples\/fastly-compute-b2-demo\" target=\"_blank\" rel=\"noopener\">examine the code in detail on GitHub<\/a> if you\u2019d like a closer look.<\/p>\n<h2><strong>Serve Your Own Data From Multiple Backblaze B2 Regions<\/strong><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-104974 size-large\" title=\"Serve Your Own Data From Multiple Backblaze B2 Regions\" src=\"https:\/\/www.backblaze.com\/blog\/wp-content\/uploads\/2022\/02\/Deploy-to-Fastly-1024x693.png\" alt=\"Backblaze B2 \/ Fastly Compute@Edge Demo\" width=\"1024\" height=\"693\" srcset=\"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Deploy-to-Fastly-1024x693.png 1024w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Deploy-to-Fastly-300x203.png 300w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Deploy-to-Fastly-768x520.png 768w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Deploy-to-Fastly-1536x1040.png 1536w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Deploy-to-Fastly-560x379.png 560w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Deploy-to-Fastly.png 1999w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>As you can see in the screenshot above, Fastly has implemented a <a href=\"https:\/\/www.fastly.com\/blog\/introducing-cloud-deploy-kickstarting-a-compute-edge-project-just-got-easier\" target=\"_blank\" rel=\"noopener\">Deploy to Fastly<\/a> button. You can use this to create your own copy of the Backblaze B2 Compute@Edge demo application in just a couple of minutes. You\u2019ll need to gather a few prerequisites before you start:<\/p>\n<ul>\n<li>You must create Backblaze B2 accounts in both the U.S. and EU regions. If you have an existing account and you\u2019re not sure which region it\u2019s in, just take a look at the end point for one of your buckets. For example, this bucket is in the U.S. West region:<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-104975 size-large\" src=\"https:\/\/www.backblaze.com\/blog\/wp-content\/uploads\/2022\/02\/Fastly-Bucket-1024x489.png\" alt=\"fastly-demo-us screenshot\" width=\"1024\" height=\"489\" srcset=\"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Fastly-Bucket-1024x489.png 1024w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Fastly-Bucket-300x143.png 300w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Fastly-Bucket-768x367.png 768w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Fastly-Bucket-560x268.png 560w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Fastly-Bucket.png 1364w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/>To create your second account, go to the <a href=\"https:\/\/www.backblaze.com\/b2\/sign-up.html?referrer=nopref\" target=\"_blank\" rel=\"noopener\">Sign Up page<\/a>, and click the <strong>Region<\/strong> drop-down on the right under the big, red Sign Up button:<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-104976 size-large\" src=\"https:\/\/www.backblaze.com\/blog\/wp-content\/uploads\/2022\/02\/Backblaze-Sign-Up-page-1024x549.png\" alt=\"Cloud Storage that's Astonishingly Easy\" width=\"1024\" height=\"549\" srcset=\"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Backblaze-Sign-Up-page-1024x549.png 1024w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Backblaze-Sign-Up-page-300x161.png 300w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Backblaze-Sign-Up-page-768x411.png 768w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Backblaze-Sign-Up-page-1536x823.png 1536w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Backblaze-Sign-Up-page-560x300.png 560w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/Backblaze-Sign-Up-page.png 1999w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/>Pick the region in which you <strong>don\u2019t<\/strong> already have an account, and enter an email and password. Remember, your new account comes with 10GB of storage, free of charge, so there\u2019s no need to enter your credit card details.\n<p>Note: You\u2019ll need to use a different email address from your existing account. If you don\u2019t have a second email address, you can use the <a href=\"https:\/\/support.google.com\/a\/users\/answer\/9308648?hl=en\" target=\"_blank\" rel=\"noopener\">plus trick<\/a> (officially known as sub-addressing) and reuse an existing email address. For example, if you used <code>janedoe@gmail.com<\/code> for your existing B2 Cloud Storage account in the U.S. region, you can use <code>janedoe+eu@gmail.com<\/code> for your new EU account. Mail will be routed to the same inbox, and Backblaze B2 will be satisfied that it\u2019s a different email address. This technique isn\u2019t limited to Gmail, by the way, it works with many email providers.<\/li>\n<li>Create a private bucket in each account, and use your tool of choice to copy the same data into each of them. Make a note of the end point for each bucket.<\/li>\n<li>Create an application key with read access to each bucket.<\/li>\n<li><a href=\"https:\/\/www.fastly.com\/signup\/edge-compute\" target=\"_blank\" rel=\"noopener\">Sign up for a free Fastly account<\/a> if you don\u2019t already have one. Right now, this includes free credits for Compute@Edge.<\/li>\n<li><a href=\"https:\/\/github.com\/join\" target=\"_blank\" rel=\"noopener\">Sign up for a free GitHub account.<\/a><\/li>\n<li>Go to the <a href=\"https:\/\/github.com\/Backblaze-B2-Samples\/fastly-compute-b2-demo\" target=\"_blank\" rel=\"noopener\">Backblaze B2\/Fastly Compute@Edge Demo<\/a> GitHub repository, click the Deploy to Fastly button, and follow the prompts. The repository will be forked to your GitHub account and then deployed to Fastly.<\/li>\n<li>Important: There is one post-deploy step you <strong>must<\/strong> complete before your application will work! In your new GitHub repository, navigate to <code>src\/config.rs<\/code> and hit the pencil icon near the top right to edit the file. Change the origin configuration in lines 18-31 to match your buckets and their end points. Alternatively, you can, of course, clone the repository to your local machine, edit it there, and push the changes back to GitHub.<\/li>\n<\/ul>\n<p>Once you have your accounts and buckets created, it takes just a few minutes to deploy the application.<\/p>\n<h2><strong>What Can You Do With Fastly\u2019s Compute@Edge and Backblaze B2?<\/strong><\/h2>\n<p>My simple demo application only scratches the surfaces of Compute@Edge. How could you combine Fastly\u2019s edge computing platform with Backblaze B2 to create a new capability for your website? Check out <a href=\"https:\/\/developer.fastly.com\/solutions\/examples\/\" target=\"_blank\" rel=\"noopener\">Fastly\u2019s collection of over 100 Compute@Edge code samples<\/a> for inspiration. If you come up with something neat and share it on GitHub, let me know in the comments and I\u2019ll round up a bundle of Backblaze-branded goodies, just for you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fastly&#8217;s Compute@Edge partner ecosystem is here, putting more power and flexibility in your hands. Check out a simple example of how you can use it with Backblaze B2 to optimize content delivery from different regions.<\/p>\n","protected":false},"author":174,"featured_media":104973,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[481,7,483,479],"tags":[468],"class_list":["post-104962","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cdn","category-cloud-storage","category-tech-lab","category-technology","tag-b2cloud","entry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Building a Multiregion Origin Store With Backblaze B2 + Fastly Compute@Edge<\/title>\n<meta name=\"description\" content=\"How can you combine Fastly\u2019s edge computing platform with Backblaze B2 to create a new capability for your website? Let&#039;s take a look.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.backblaze.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building a Multiregion Origin Store With Backblaze B2 + Fastly Compute@Edge\" \/>\n<meta property=\"og:description\" content=\"How can you combine Fastly\u2019s edge computing platform with Backblaze B2 to create a new capability for your website? Let&#039;s take a look.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/\" \/>\n<meta property=\"og:site_name\" content=\"Backblaze Blog | Cloud Storage &amp; Cloud Backup\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/backblaze\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-02T13:55:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-11T17:03:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/bb-bh-Fastly-Compute@Edge.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1440\" \/>\n\t<meta property=\"og:image:height\" content=\"820\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Pat Patterson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@backblaze\" \/>\n<meta name=\"twitter:site\" content=\"@backblaze\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pat Patterson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building a Multiregion Origin Store With Backblaze B2 + Fastly Compute@Edge","description":"How can you combine Fastly\u2019s edge computing platform with Backblaze B2 to create a new capability for your website? Let's take a look.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.backblaze.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/","og_locale":"en_US","og_type":"article","og_title":"Building a Multiregion Origin Store With Backblaze B2 + Fastly Compute@Edge","og_description":"How can you combine Fastly\u2019s edge computing platform with Backblaze B2 to create a new capability for your website? Let's take a look.","og_url":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/","og_site_name":"Backblaze Blog | Cloud Storage &amp; Cloud Backup","article_publisher":"https:\/\/www.facebook.com\/backblaze","article_published_time":"2022-03-02T13:55:12+00:00","article_modified_time":"2023-07-11T17:03:13+00:00","og_image":[{"width":1440,"height":820,"url":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/bb-bh-Fastly-Compute@Edge.png","type":"image\/png"}],"author":"Pat Patterson","twitter_card":"summary_large_image","twitter_creator":"@backblaze","twitter_site":"@backblaze","twitter_misc":{"Written by":"Pat Patterson","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/#article","isPartOf":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/"},"author":{"name":"Pat Patterson","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#\/schema\/person\/a724a8aee97b6451107442747cd101a4"},"headline":"Building a Multiregion Origin Store With Backblaze B2 + Fastly Compute@Edge","datePublished":"2022-03-02T13:55:12+00:00","dateModified":"2023-07-11T17:03:13+00:00","mainEntityOfPage":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/"},"wordCount":1412,"commentCount":0,"publisher":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#organization"},"image":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/#primaryimage"},"thumbnailUrl":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/bb-bh-Fastly-Compute@Edge.png","keywords":["B2Cloud"],"articleSection":["CDN","Cloud Storage","Tech Lab","Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/","url":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/","name":"Building a Multiregion Origin Store With Backblaze B2 + Fastly Compute@Edge","isPartOf":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/#primaryimage"},"image":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/#primaryimage"},"thumbnailUrl":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/bb-bh-Fastly-Compute@Edge.png","datePublished":"2022-03-02T13:55:12+00:00","dateModified":"2023-07-11T17:03:13+00:00","description":"How can you combine Fastly\u2019s edge computing platform with Backblaze B2 to create a new capability for your website? Let's take a look.","breadcrumb":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/#primaryimage","url":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/bb-bh-Fastly-Compute@Edge.png","contentUrl":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/bb-bh-Fastly-Compute@Edge.png","width":1440,"height":820,"caption":"Backblaze B2 + Compute@Edge by Fastly"},{"@type":"BreadcrumbList","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/building-a-multiregion-origin-store-with-backblaze-b2-fastly-computeedge\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Building a Multiregion Origin Store With Backblaze B2 + Fastly Compute@Edge"}]},{"@type":"WebSite","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#website","url":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/","name":"Backblaze Cloud Solutions Blog","description":"Cloud Storage &amp; Cloud Backup","publisher":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#organization","name":"Backblaze","url":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.backblaze.com\/blog\/wp-content\/uploads\/2017\/12\/backblaze_icon_transparent.png?fit=512%2C512&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.backblaze.com\/blog\/wp-content\/uploads\/2017\/12\/backblaze_icon_transparent.png?fit=512%2C512&ssl=1","width":512,"height":512,"caption":"Backblaze"},"image":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/backblaze","https:\/\/x.com\/backblaze","https:\/\/www.youtube.com\/user\/Backblaze","https:\/\/en.wikipedia.org\/wiki\/Backblaze"]},{"@type":"Person","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#\/schema\/person\/a724a8aee97b6451107442747cd101a4","name":"Pat Patterson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/01\/PatPatterson1920px-150x150.png","url":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/01\/PatPatterson1920px-150x150.png","contentUrl":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/01\/PatPatterson1920px-150x150.png","caption":"Pat Patterson"},"description":"Pat Patterson is the former chief technical evangelist at Backblaze. Over his three decades in the industry, Pat has built software and communities at Sun Microsystems, Salesforce, StreamSets, and Citrix. In his role at Backblaze, he creates and delivers content tailored to the needs of the hands-on technical professional, acts as the \u201cvoice of the developer\u201d on the Product team, and actively participates in the wider technical community. Outside the office, Pat runs far, having completed ultramarathons up to the 50 mile distance. Catch up with Pat via Bluesky or LinkedIn.","url":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/author\/pat\/"}]}},"jetpack_featured_media_url":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2022\/02\/bb-bh-Fastly-Compute@Edge.png","_links":{"self":[{"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/posts\/104962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/users\/174"}],"replies":[{"embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/comments?post=104962"}],"version-history":[{"count":0,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/posts\/104962\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/media\/104973"}],"wp:attachment":[{"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/media?parent=104962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/categories?post=104962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/tags?post=104962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}