Web Accelerator

This is a method to cache 502 (Bad Gateway) and 504 (Gateway Timeout) errors using the Sakura Cloud Web Accelerator. High access to non-cacheable content or even cacheable content can cause the origin server to return 502 (Bad Gateway) or 504 (Gateway Timeout) errors due to high server load. Normally, error responses from nginx do not include Cache-Control headers, so they are not cached, which means the load on the origin server continues.
I tried using the newly integrated feature that allows linking Sakura Cloud’s Web Accelerator with Object Storage. Web Accelerator Now Supports Object Storage Integration This blog is a static site generated by Hugo, so I wanted to distribute this site using Object Storage and Web Accelerator. Currently, it is being distributed via Web Accelerator + Sakura Rental Server. Creating a Bucket in Object Storage For pricing information, please check here
This article is the 13th entry in the Sakura Internet Advent Calendar 2020. Content Protection Using One-Time URL When distributing content to a specific group, it often involves downloading content after password authentication. However, when using it with a CDN, BASIC authentication might not be available, and changing the URL can result in the cache being treated as a different entity, making CDN utilization difficult. Web Accelerator has a One-Time URL feature, which I’ll introduce for content protection.
This content was moved from Qiita. While it’s common to deliver images and other content with S3 + CloudFront, if the delivery target is limited to Japan, it might be cheaper to use S3 + Sakura Cloud’s CDN service, Web Accelerator. So, let’s set it up. I haven’t verified if the actual billing will be cheaper. The delivery fee for CloudFront is 0.140 USD (15.8 yen as of December 28, 2017) per GiB in Japan, so Web Accelerator, which costs 5 yen (including tax) per GiB, seems cheaper.
This content has been moved from Qiita. Let’s use Let’s Encrypt with Sakura Cloud Web Accelerator. Update (2021/01/29) The Web Accelerator now has an auto-renewal feature for Let’s Encrypt, so there’s no need for the following efforts anymore! 🎉 Announcing Automatic Renewal of Let’s Encrypt Certificates on Web Accelerator Using Automatic Renewal Certificates for Let’s Encrypt on Web Accelerator Overview When using a custom domain with Sakura Cloud Web Accelerator, you can enable SSL (including HTTP2 support) by installing an SSL certificate.