AB-Law / AB-Law/Pluck-It

Implement Cloudflare CDN Proxy for Blob Storage Egress

Đang mở
#80 0 bình luận 0 reaction 1 người được giao Được @AB-Law nhận Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Merge trung bình
16 phút
Pull request đã merge (30 ngày)
1

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.