Short answer: for private document downloads in a tenant-scoped catalog export, choose a signed URL design only after a Go load test proves that large product images can move at the required throughput without unbounded memory, retry amplification, or one tenant monopolizing the worker pool. Object storage provider egress terms matter, but flow control is the first decision because a cheap byte that repeatedly crosses the network is neither cheap nor operationally correct.
The awkward constraint is that a catalog export is simultaneously a batch job and an interactive promise. A merchant clicks once, yet the backend may have to enumerate thousands of private objects, assemble a stable manifest, and let several large transfers proceed for minutes. A signed URL moves the data plane away from the application, which is useful, but it doesn't remove admission control, fairness, expiry planning, or reconciliation from the application. It merely changes where those obligations sit.
Throughput comes first.
Start with a byte budget, not a provider matrix
A defensible capacity model has four separate rates: bytes read while producing the export, bytes written to object storage, bytes delivered to the client, and bytes repeated because a transfer was interrupted. Requests per second hide all four. A 20 KB thumbnail and a 2 GB original count as one request each, while their effects on memory pressure, connection duration, and egress are plainly different. Use object-size percentiles and destination regions from the intended workload, then model the slow client as deliberately as the fast one.
For each tenant, reserve a bounded number of concurrent parts and a bounded byte allowance. The global scheduler can then use weighted fairness instead of a single FIFO queue: small catalogs keep moving while a large catalog consumes only its allocation. This is the same discipline used around a ledger writer. Work may be delivered at least once, but its identity, byte expectation, and terminal state must be durable enough that a retry cannot silently become a second chargeable export.
Do not buffer the archive in application memory. Stream fixed-size parts, retain only the checksums and completion metadata needed to resume, and stop reading upstream when the storage writer slows down. Amazon S3 documents multipart upload as initiate, upload parts, and complete operations, with abort available for an upload that will not finish. That lifecycle is useful far beyond one provider because it exposes the exact places where an export worker needs durable state.
A compact planning equation is enough to catch bad assumptions:
package capacity import "time" type Plan struct { ObjectBytes int64 ExpectedRetries float64 ConcurrentParts int SustainedBytesSec int64 } func (p Plan) TransferWindow() time.Duration { // ExpectedRetries is a planning multiplier, measured in the load test. bytes := float64(p.ObjectBytes) * (1 + p.ExpectedRetries) return time.Duration(bytes/float64(p.SustainedBytesSec)) * time.Second } This isn't a benchmark. It is a prompt to measure the variables that matter. Keep the part count and retry multiplier beside the test result, because a throughput number without those inputs cannot be reproduced.
How should signed URLs handle private document downloads and object storage egress?
First, separate authorization from delivery. The export service authorizes the tenant against an immutable manifest, records an issuance event, and asks the storage adapter for a time-limited download capability. The object store then serves the bytes. A signed URL is a bearer capability, so possession is enough to use it until expiry; it must not contain a human-readable customer email, SKU, or other identifier that needlessly leaks through logs and browser history.
Expiry must cover queue delay plus transfer time, not an arbitrary round number. Suppose a load test shows that the slow-client transfer window can approach the configured expiry. Raising the expiry may improve completion but lengthens the replay window — a real security trade-off. Proxying every byte through an authenticated gateway gives stronger per-request control, but it puts bandwidth, range requests, and connection pressure back on infrastructure you operate. There is no universal winner.
The application should issue a capability only after the manifest is ready, and repeated issuance for the same request should share an idempotency key. Record the manifest digest, tenant, opaque object key, object version when available, expiry, and request identifier. Never record the complete signed query string. If a process restarts after storage completes but before the database transition commits, reconciliation should verify the completed object and append the missing state transition once; generating another archive would convert an uncertain commit into duplicated work.
The adapter can remain intentionally small:
package exports import ( "context" "errors" "time" ) var ErrNotReady = errors.New("export is not ready") type Store interface { SignedGet(ctx context.Context, objectKey string, ttl time.Duration) (string, error) } type Export struct { TenantID string ObjectKey string ManifestHash string Ready bool } func Issue(ctx context.Context, store Store, export Export, tenantID string, ttl time.Duration) (string, error) { if export.TenantID != tenantID || !export.Ready || export.ManifestHash == "" { return "", ErrNotReady } return store.SignedGet(ctx, export.ObjectKey, ttl) } The interface deliberately says nothing about a vendor's route shape. Each implementation maps the generic operation to its provider's documented signing mechanism, while contract tests enforce the same expiry, range-request, and authorization expectations.
Make the load test adversarial
A happy-path download proves very little. Build the test corpus from the actual product-image distribution, including the largest accepted object, then mix new exports with resumed transfers and deliberately slow readers. Cancel clients after different byte offsets. Repeat an idempotency key. Let one tenant request enough work to hit its quota while other tenants continue. The assertions should cover bounded resident memory, bounded queued bytes, stable per-tenant progress, and eventual cleanup of multipart uploads that are intentionally abandoned.
Test the audit trail too. For each logical export, reconcile the manifest's expected byte count against completed storage work and capability issuance; do not pretend that a URL issuance proves a completed download. Storage access logs and billing data can arrive through different systems and at different times, so name that uncertainty in the schema instead of overwriting it. An issued event, a storage-side transfer observation, and a provider invoice line represent different evidence.
One short failure is especially revealing: configure the capability to expire while a client is still queued. The correct result is a controlled re-authorization against the same immutable manifest, not a fresh archive build. Your mileage may vary on the exact expiry because client bandwidth and geography change it; the load-test percentile and the acceptable replay window should settle the policy together.
Use fault injection at the boundaries you own — cancellation, process restart, disk pressure, and database commit timing — without treating a provider incident as the test plan. A passing run should demonstrate that worker concurrency stays capped, checksums survive restart, and the ready transition occurs once after completed storage state is verified. Exactly-once delivery over a network isn't a promise this design can make. Exactly-once accounting remains a useful and testable mindset.
Compare provider boundaries after measuring the workload
Only now is a product comparison meaningful. Amazon S3 documents multipart upload and presigned URLs, which makes it possible to evaluate its signing and large-object lifecycle against the test contract. Cloudflare R2 documents an S3-compatible API and presigned URLs; compatibility can reduce adapter differences, but account terms and the workload's destination paths still require separate review. Supabase Storage integrates storage authorization with project policies backed by Postgres. Firebase Storage integrates Google Cloud Storage objects with Firebase Security Rules. Backblaze B2 publishes storage, transaction, and download pricing dimensions on its pricing page.
These are different control surfaces, not a ranking. An e-commerce team already expressing tenant policy in database migrations may value one integration shape, while a service built around an S3-compatible multipart adapter may value another. Compliance also constrains the shortlist: region availability, retention, log export, access-review evidence, and contractual requirements must be verified for the actual account and jurisdiction. I'm not sure a public comparison can answer those account-specific questions; a dated architecture decision record and a representative proof run can.
| Evidence to collect | What it decides |
|---|---|
| Sustained bytes per second by object-size percentile | Whether the export meets its completion target |
| Peak memory and queued bytes under slow readers | Whether backpressure is genuinely bounded |
| Multipart resume and abort behavior | How much interrupted work is repeated or retained |
| Signed capability scope, expiry, and range behavior | Whether direct delivery fits the security policy |
| Destination-specific transfer terms | How egress enters the workload model |
| Region, retention, and audit controls | Whether the design can satisfy compliance review |
Do not collapse these observations into a single score. Weight them against a declared requirement, preserve the raw results, and rerun the same corpus when a provider configuration or workload distribution changes.
Roll out by tenant and preserve an exit path
Begin with shadow manifests: enumerate objects, calculate expected bytes, and exercise scheduling without issuing download capabilities. Next, enable one internal tenant, compare manifest totals with the completed object, and verify that a repeated request resolves to the same export identity. Expand by tenant cohort while watching queue age, retry bytes, orphaned multipart state, memory, and egress observations. A kill switch should stop new admission while allowing already authorized transfers to reach a recorded terminal state.
The catch is that direct signed downloads are not suitable when policy requires immediate revocation or inspection of every byte-range request after issuance. Use an authenticated gateway in that case, accepting the bandwidth and operational load it restores. Stick with direct object-store delivery when immutable exports, bounded expiry, and evidence at issuance satisfy the threat model. For very small, infrequent exports, multipart state and a fairness scheduler may also cost more complexity than they remove; a simpler streamed upload can be the honest choice.
Keep the portable contract narrow: opaque object keys, immutable manifests, idempotent export identities, checksums, bounded concurrency, and a signing interface. Then migration is a controlled replay of the same load corpus and reconciliation rules, not a rewrite of tenant authorization. The provider can change. The byte budget and audit invariants should not.
References
- https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html
- https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-presigned-url.html
- https://developers.cloudflare.com/r2/api/s3/presigned-urls/
- https://supabase.com/docs/guides/storage
- https://firebase.google.com/docs/storage
- https://www.backblaze.com/cloud-storage/pricing