Skip to content

Make a cached copy of Replay resources for playback #18154

@benjackwhite

Description

@benjackwhite

Is your feature request related to a problem?

Some resources for a replay are not always available at playback either due to CORS reasons or bundle reasons (new release creates a new ID for an image etc, deleting the old one.

Describe the solution you'd like

We already have a WIP CORS proxy handling fonts. We could consider extending this to all resources and include a caching mechanism. In my mind it would work something like:

  1. On ingestion, we detect resources that should be downloaded (fonts, images, css etc.) and write them to some sort of processing queue
  2. The processing queue will attempt to download that respource if it doesn't already exist and write it to an S3 bucket keys like {team_id}/{base64(url)}
  3. On playback we swap out these URLs for our proxy service (we already do this ) to instead call our proxy service
  4. The proxy service goes to S3 for the data if we have it, otherwise attempts to proxy to the original url

What makes this hard?

The main thing here is protecting from abuse, either purposeful or accidental. We don't want to end up downloading outrageous amounts of data from 3rd parties.

We could limit this risk by

  1. Only enabling this for paying users
  2. Having a strict size limit on these resources (1mb or maybe even lower)
  3. Sensible TTLs on the assets

Additional context

Customer request

Thank you for your feature request – we love each and every one!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions