Private File Upload Throughput — Signed Download Architecture for App Users
Short answer: for large per-tenant backups, keep the objects private and let the browser transfer them directly with short-lived signed upload and download grants, but make throughput a restore constraint rather than an upload benchmark: the application must choose the tenant's US or EU placement, bind each grant to one opaque object key, and admit a snapshot for restore only after independent verification.
The useful number is therefore not peak megabytes per second. It is the largest snapshot that can be uploaded, verified, retained, selected, and restored inside the service's recovery objective without weakening tenant isolation or leaving the audit record ambiguous. Direct transfer removes the application server from the byte path; it doesn't remove the application from the authorization path.
That distinction matters.
Failure has three clocks
A beginner-friendly design can begin with three clocks: how long authority remains valid, how long bytes take to arrive, and how long recovery may take. Maximum snapshot size, the slowest supported client uplink, and grant lifetime shape the first two; the restore objective bounds the third. Add concurrency per tenant and per region once the single-transfer path is understood. These are workload inputs, not universal constants, and I'm not sure a vendor's headline throughput result says anything useful until the same file sizes, client locations, interruption pattern, and concurrency have been tested against the application's deadline.
For example, a 40 GiB snapshot and a 30-minute restore objective create a very different system from a 200 MiB document archive, even though both may use private object storage. The larger case makes resumability, bounded parallelism, integrity verification, and abandoned-transfer cleanup part of correctness. It also exposes an accounting mistake that is easy to miss: an upload can finish from the browser's perspective while the snapshot is still ineligible for restore because the control plane has not verified and recorded it. Measure those intervals separately. Calling both of them "upload latency" erases the exact delay an operator will need to explain during recovery.
Write the acceptance condition as an inequality before selecting an implementation:
transfer time + verification time + authorization delay < restore deadline
This isn't a promise of exactly-once network delivery. Networks retry, browser tabs disappear, and multipart transfers may resend a part. The exactly-once boundary belongs in the metadata: one tenant, one immutable snapshot identifier, one accepted object identity, and one authoritative restore eligibility decision. A repeated completion request with the same idempotency key and the same canonical claims should return the recorded outcome; reusing that key for different claims should be rejected, for example as 409 Conflict. That error code is an application design choice, but the conflict must be machine-visible and auditable.
How should app users upload private files to US and EU object storage?
Split the system into a small control plane and a large data plane. The authenticated application resolves the tenant, chooses the policy-approved region, allocates an opaque object key, records the expected size and integrity attributes, and issues an operation-scoped signed grant. The browser then sends bytes directly to storage. It cannot choose a tenant prefix or switch the object into another region merely by changing request data.
On completion, the browser reports the transfer identifier rather than declaring success as fact. The application checks the stored object's expected metadata through its trusted storage integration, records the verification outcome, and only then makes the snapshot selectable. Download is a new authorization decision: the app receives a snapshot identifier, checks tenant ownership and lifecycle state, records the decision, and creates a separate read grant. Don't reuse an upload grant or expose durable storage credentials to the browser.
OWASP's File Upload Cheat Sheet recommends allow-listing extensions, validating file type rather than trusting the client-provided Content-Type, changing filenames, enforcing size limits, authorizing uploaders, and storing uploaded material away from the webroot or on a separate host. A backup service may accept archive formats that an avatar service would refuse, so its allow-list will differ; the principle does not. Display names and MIME declarations are metadata to inspect, not authority. The opaque key selected by the server is the authority-bearing identity.
Signed grants are bearer capabilities — anyone possessing an unexpired one may be able to exercise its narrow permission — so logs should record issuance without recording the full signed URL. OWASP's secrets guidance treats expiration, rotation, access control, and auditing as lifecycle concerns. Apply that mindset to signing credentials and to the operational access that can inspect them. A useful audit event includes tenant ID, snapshot ID, actor, request ID, operation, region, expiry, policy decision, and outcome; it excludes reusable secrets and sensitive query strings.
The lifetime of a grant deserves measurement, not folklore. Five minutes may be comfortable for one file and impossible for another. A short grant limits the replay window, while a long transfer needs enough time to complete or renew under the storage system's documented mechanism. Record completion distributions by size and region, then choose and review the margin. Your mileage may vary — substantially — because client uplink and distance are outside the application's control.
Reconciliation makes retries uneventful
The domain layer should describe transfer intent and commitment without embedding a commercial SDK type. It can require the adapter to support a resumable transfer while keeping tenant and placement decisions above that adapter. The following contract deliberately contains no public HTTP routes; route names belong to the application, while this interface captures the invariant that matters.
package snapshots import ( "context" "errors" "time" ) var ErrIdempotencyConflict = errors.New("idempotency key has different claims") type Intent struct { TenantID string SnapshotID string ObjectKey string Region string ExpectedBytes int64 ExpectedHash string ExpiresAt time.Time } type Grant struct { URL string ExpiresAt time.Time } type ObjectMetadata struct { Bytes int64 Hash string } type TransferStore interface { CreateOrReplay(ctx context.Context, key string, intent Intent) (Intent, error) RecordVerified(ctx context.Context, intent Intent, object ObjectMetadata) error } type PrivateObjectStore interface { BeginResumableUpload(ctx context.Context, intent Intent) (Grant, error) Inspect(ctx context.Context, region, objectKey string) (ObjectMetadata, error) SignDownload(ctx context.Context, region, objectKey string, expiry time.Time) (Grant, error) } CreateOrReplay compares a canonical fingerprint of the security-relevant claims. If a browser loses the response and retries, identical input resolves to the original intent instead of allocating a second snapshot. Different bytes, region, or object key under the same idempotency key are a conflict. RecordVerified must likewise be idempotent: receiving the same verified observation twice cannot produce two restorable records or two audit histories.
Keep an append-only decision trail alongside the current snapshot view. The current row answers "can this be restored now?" quickly; events answer "why did the system decide that?" later. Neither proves that a restore actually works, which is why a scheduled restore exercise must read the object through the ordinary authorization path and verify its recorded integrity attributes. Auditability without rehearsal is paperwork.
Retries are normal.
Test the recovery path under interrupted load
Large-file qualification should inject uncertainty at named boundaries and demand durable evidence afterward. A happy-path throughput run can show that bytes move quickly while missing duplicate commitment, cross-tenant authorization, or a restore that stalls behind verification. Use fixed snapshot fixtures and preserve the control-plane record, object metadata, and audit events from every run.
| Injection | Required observation | Evidence to retain |
|---|---|---|
| Interrupt the first, middle, and final transfer portions | Resume does not create a second eligible snapshot | Intent ID, part or transfer ID, object identity, final verification |
| Replay an identical completion claim | The recorded outcome remains singular and stable | Idempotency fingerprint and both request IDs |
| Reuse the key with different size or hash claims | The control plane rejects the conflict | Original claims, conflicting claims, policy outcome |
| Request another tenant's snapshot | No read authority is issued | Actor, tenant, snapshot ID, authorization decision |
| Restore concurrently in each assigned region | Completed reads meet the recovery objective and integrity check | Region, timing intervals, bytes, recorded and observed hash |
The catch is that direct browser transfer is not suitable when policy requires every byte to pass through an application-owned inspection process before it may persist and the chosen storage flow cannot provide an equivalent quarantine boundary. Use a controlled ingestion path in that case. Stick with application-proxied download when every response requires dynamic transformation or inline inspection that a signed object read cannot perform. These aren't edge cases to hide; they are decision rules.
Also exercise an expired grant and a declared size that differs from verified metadata. The goal isn't to manufacture a perfect success rate; it is to prove that uncertainty never promotes an unverified object and that an operator can reconcile every accepted snapshot.
GDPR cannot be reduced to an EU field in an object key. Regional placement is one enforceable technical control, while lawful basis, retention, deletion, processor relationships, and international-transfer analysis remain organization-specific compliance work. Counsel and the data map must set those constraints. The architecture's job is narrower: resolve placement server-side before issuing authority, keep the decision queryable, and make retention and deletion states reconcilable with actual objects.
Cost comes after those constraints. Model stored bytes over retention, incomplete multipart data, requests, retrieval, any required replication, and network transfer; then compare the shapes using the same workload. A low storage rate does not rescue a design that misses the restore deadline or cannot establish which tenant owned the object.
A one-region restore is the rollout gate
Start with one tenant cohort, one assigned region, and a documented rollback point. Mirror the control-plane records needed for comparison, reconcile verified object metadata against the snapshot view, and alert on expired intents, verification mismatches, unauthorized restore attempts, and deletion work that exceeded policy. Do not expand merely because uploads look fast.
Then perform the ordinary user restore: select an immutable snapshot, authorize it under current tenant policy, issue a read grant, transfer the object, verify its recorded integrity attributes, and append the outcome to the audit trail. Repeat after interruption and under the expected concurrency. Only after this proof is repeatable should another region or a larger tenant cohort enter the rollout.
The resulting architecture is intentionally modest. Browsers carry the large bytes; private storage holds them; the application owns identity, regional policy, idempotency, verification, retention, and evidence. That division is worthwhile only while the measured transfer and restore path stays inside the agreed recovery budget.