com.atproto.sync.getBlob and redirects

Does the com.atproto.sync.getBlob XRPC method allow redirects?

In the Possible Future Changes section of the HTTP API (XRPC) documentation is this comment:

An explicit decision about whether HTTP redirects are supported.

I have a moderately strong feeling that it should support redirects, mainly to allow PDS and XRPC implementations to support content delivery and signed URLs. I know that some clients support this and that it is also implemented and done in the wild, but the spec is ambiguous and the documentation needs to be updated so clients implement this behavior consistently.

Use case #1: content delivery networks

A PDS / XRPC implementation may want to allow blobs to be served by a CDN. It may serve as the “origin”, with actual delivery offloaded to other servers.

Use case #2: large files

Although a PDS may support large file upload, it could want to offload or partition them to alternative storage, like object storage. In that case, the XRPC implementation may use signed URLs that are valid for a limited period of time (30 minutes) or use requester-pays.

1 Like

I’m with you Nick – in both use cases. The immediate other use case I can think of is storing files in private S3 or other blob storage buckets, where the impl returns a redirect to a signed URL that is valid for 1 or 5 or 10 minutes or some other reasonable timeframe.

2 Likes