AB-Law / AB-Law/Pluck-It

Implement Cloudflare CDN Proxy for Blob Storage Egress

未关闭
#80 0 条评论 0 个 reaction 已指派 1 人 已被 @AB-Law 认领 在 GitHub 查看
主要语言
TypeScript
星标
0
派生
0
平均合并
16 分钟
30 天内合并 PR
1

描述

Problem
Even with stable SAS URLs, all image traffic currently flows directly from Azure Blob Storage to the user's browser. Azure Storage charges for data egress, and latency is dependent on the user's distance from the Azure region. Without a CDN, every single "Wardrobe" view results in a direct hit to the origin storage, even if the image hasn't changed in months.

Impact
| Factor | Impact |
| :--- | :--- |
| Cost | 100% of image bandwidth is billed as Azure Egress (after the 100GB free tier). |
| Latency | Users far from the data center experience slower image load times. |
| Origin Load | High volume of unnecessary GET requests to the Azure Storage account. |

Proposed Fix
Route all blob traffic through a Cloudflare CDN layer using a custom domain (e.g., cdn.pluckit.com).
Set up Cloudflare DNS with a CNAME pointing to the Azure Storage endpoint.
Update BlobSasService.cs to swap the host portion of the generated URL from *.blob.core.windows.net to the custom CDN domain.
Configure Cloudflare "Cache Everything" rules to respect the SAS token duration.

Functionality Impact
Users will see images served from cdn.pluckit.com instead of the Azure URL. Load times will improve significantly on repeat visits, and Azure egress traffic will drop toward zero for cached assets.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。