Skip to content

Improve Cloudflare storage caching observability and cost efficiency #156

Description

@Polyterative

Is your feature request related to a problem? Please describe.

The Cloudflare image proxy is serving public storage paths, but we do not yet have reliable cache-hit/origin-fetch telemetry to prove that it is reducing Supabase egress and avoiding wasted resources. The app also generates marketplace-listings proxy URLs while the Worker allowlist currently omits that bucket, producing 404 responses.

Describe the solution you\x27d like

  • Add marketplace-listings consistently to the Cloudflare Worker allowlist/configuration.
  • Add Cloudflare cache/origin-fetch observability and a measurable Supabase egress baseline.
  • Compare proxy cache performance with Supabase\x27s existing CDN cache before adding more infrastructure.
  • Prefer versioned/content-addressed media filenames so longer TTLs are safe and purges are rarely needed.
  • Reassess R2 only after measured Cloudflare savings and confirmation that storage capacity—not merely egress—is the limiting cost.

A local account with access to the relevant Cloudflare/Supabase dashboards is available for the operator verification work. Do not add credentials or secrets to the repository or issue.

Describe alternatives you\x27ve considered

  • Continue relying only on Supabase\x27s CDN cache, after measuring whether Cloudflare provides meaningful additional savings.
  • Defer R2 migration until the proxy and cost telemetry are validated.

Additional context

Current rapid diagnosis:

  • Cloudflare module image proxy request: 200 with max-age=604800 and s-maxage=2592000.
  • Direct Supabase storage request: 200 with cf-cache-status: HIT and max-age=3600.
  • Marketplace proxy path tested: 404 because the bucket is not currently allowlisted.
  • Dashboard snapshot: 13,237 total requests in 24 hours; Storage 1,127 requests, 3 warnings, 0 errors.

No infrastructure or application changes are included in this issue creation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions